Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20563

BASCOM-AVR : ATMega 168 Fast PWM with Timer 2 : REPLY

$
0
0
Dear dave, now it works. This is my short program for testing. dim j as integer Config PORTC.3 = Output ' For Buzzer Config Portb.3 = Output ' Output OC2A TCCR2A= &B10000011 ' Fast PWM, 1 0 Clear OC2A on Compare Match, set OC2A at BOTTOM ' TCCR2B= &B00000001 ' No prescaling OCR2a=10 'Initial value Portc.3=1 ' Initial loud beep wait 1 portc.3=0 do portc.3=1 'acoustic signal indicating program running waitms 4 portc.3=0 j= ocr2a J=j +10 if j >254 then J=1 ocr2A =j wait 5 loop many thanks and best regards Christian

Viewing all articles
Browse latest Browse all 20563

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>