Labs/Lab6/Watkins_William_Lab6_Part2.c
// <editor-fold defaultstate="collapsed" desc="aliveLED()">
/******************************************************************************
 * aliveLED function
 *
 * Blinks LED when CCP3 triggered
 ******************************************************************************/

aliveLED function

Blinks LED when CCP3 triggered
aliveLED function Blinks LED when CCP3 triggered
void aliveLED() {
    if(LATDbits.LATD4 == 1)
    {
        LATDbits.LATD4 = 0;
        currentCCPR3 += timeOFF;
    }
    else
    {
        LATDbits.LATD4 = 1;
        currentCCPR3 += timeON;
    }
    CCPR3X = currentCCPR3>>16 & 0xFF;
    CCPR3H = currentCCPR3>>8 & 0xFF;
    CCPR3L = currentCCPR3 & 0xFF;
}
void aliveLED ( ) { if ( LATDbits . LATD4 == 1 ) { LATDbits . LATD4 = 0 ; currentCCPR3 += timeOFF ; } else { LATDbits . LATD4 = 1 ; currentCCPR3 += timeON ; } CCPR3X = currentCCPR3 >> 16 & 0xFF ; CCPR3H = currentCCPR3 >> 8 & 0xFF ; CCPR3L = currentCCPR3 & 0xFF ; }
<editor-fold defaultstate="collapsed" desc="aliveLED()">
 aliveLED function
<editor - fold defaultstate = " collapsed " desc = " aliveLED () " > aliveLED function
// Toggle the LED // Load in new CCPR