Labs/Lab6/Watkins_William_Lab6_Part2.c
// <editor-fold defaultstate="collapsed" desc="TMR0Handler()">
/******************************************************************************
 * TMR0Handler interrupt service routine.
 *
 * Handles Alive LED Blinking via counter 
 ******************************************************************************/

TMR0Handler interrupt service routine.

Handles Alive LED Blinking via counter
TMR0Handler interrupt service routine . Handles Alive LED Blinking via counter
void TMR0Handler() {
    T0CONbits.TMR0ON = 0;   
    TMR0H = 0x0B;           
    TMR0L = 0xDC;
    LED_count++;
    if(LED_count > 3)
    {
        INTCONbits.TMR0IF = 0;
        LATD = 0;
        return;
    }
    oldLATD = ((char) LATD<<1);
    LATD = oldLATD;
    INTCONbits.TMR0IF = 0;  
    T0CONbits.TMR0ON = 1;   
}
void TMR0Handler ( ) { T0CONbits . TMR0ON = 0 ; TMR0H = 0x0B ; TMR0L = 0xDC ; LED_count ++ ; if ( LED_count > 3 ) { INTCONbits . TMR0IF = 0 ; LATD = 0 ; return ; } oldLATD = ( ( char ) LATD << 1 ) ; LATD = oldLATD ; INTCONbits . TMR0IF = 0 ; T0CONbits . TMR0ON = 1 ; }
<editor-fold defaultstate="collapsed" desc="TMR0Handler()">
 TMR0Handler interrupt service routine.
<editor - fold defaultstate = " collapsed " desc = " TMR0Handler () " > TMR0Handler interrupt service routine .
// Turn off timer 0 // Reloading for 0.5s delay // Clear flag and return to polling routine // Turn on timer 0