Maker Pro
Maker Pro

resetting timer0 interrupt flag

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
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