Last active
August 29, 2015 13:56
-
-
Save kingcoyote/8939904 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// interrupt service routine to handle all interrupts | |
void interrupt main_isr(void) { | |
// if Timer 0's interrupt flag has been raised | |
if (TMR0IF) { | |
// increment the millisecond counter | |
milliseconds++; | |
// set the Timer 0 value to 65536 - 2000 = 63536 | |
TMR0 = 63536; | |
// lower the interrupt flag | |
TMR0IF = 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment