Quantcast
Viewing all articles
Browse latest Browse all 20606

EASY TCP/IP : Timer 0 ,2 : NEWTOPIC

Hi I know there are lots of posts and info about timers and interrupts but I have a problem with Timer 0 ,2 I use timer 1 as a pwm timer so that leave me Timer 0 or timer 2 for periodic system interrupt, I also use Config Clock = Soft to use time functions The cpu is an at90can32 or 128 My problem is that the timer0 count does not increment , and if I try to use timer2 I get the error : 249 ISR already defined SOFTCLOCK Here is the timer0 config part : Config Timer0 = Timer , Prescale = 1024 On Ovf0 Time0e Enable Timer0 Enable Interrupts The isr Time0e: Toggle Yellowled Return In the main loop I have : Print #2 , Tcnt0 for debugging and the value stay on " 0 " - it does not increment , and also the LED does not toggle . What am I missing to get this running. The plan is to get an interrupt each time the timer 0 overflow , with a 16 MHz crystal and 1024 prescale and 8 bit count it should be about 60Hz ? Cheers Nico

Viewing all articles
Browse latest Browse all 20606

Trending Articles



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