Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. // Setup LED on Pin 2 (RA0)
  2. AD1PCFGL = 0xFFFF;              // disable analog function on pins
  3. TRISAbits.TRISA0 = 0;           // configure direction for output
  4. LATAbits.LATA0   = 1;           // turn on LED
  5. LATAbits.LATA0   = 0;           // turn off LED
  6. LATAbits.LATA0   = ~LATAbits.LATA0;     // toggle LED