Maker Pro
Maker Pro

resetting timer0 interrupt flag

foTONICS

Sep 30, 2011
332
Joined
Sep 30, 2011
Messages
332
So I was reading up on embedded C programming for the PIC and came across this code that uses the overflow flag of timer0 to trigger an interrupt. But don't you need to clear the flag before you exit the ISR, or does the compiler insert that bit of code by itself?

I've attached a screenshot of said code:
 

Attachments

  • Untitled.png
    Untitled.png
    55.2 KB · Views: 192

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I would be looking at the set_timer0() function. Does that clear the interrupt as a side-effect?

Page 6 of this tells more.
 
Top