[En-Nut-Discussion] Problem writing interrupt handler

Sigurd Kleppan sigurd at wlink.no
Fri Nov 19 21:31:19 CET 2004


Hello Pete!

I use this code to run timer0. It works for me.


#pragma interrupt_handler timer0_handler:11
void timer0_handler(void)
 {  
...when timer overflows....

}


main(){
//Running timer0
 NutEnterCritical();
 TCCR2 = BV(CS22) | BV(CS20); 
 TIMSK = BV(TOIE2);
 TIFR  = BV(TOV2);
 NutExitCritical();

}



Regards
_____________________________

Sigurd Kleppan
Mail: sigurd at wlink.no
Web: http://wlink.no/sigurd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20041119/7e263c23/attachment.html>


More information about the En-Nut-Discussion mailing list