Datasheet
Debugging the program
17
Figure 2.22. Download program button
2.5. Debugging the program
2.6. Documenting the program
/* Exercise01_main.c - Blink an LED */
#include <xc.h>
int main()
{
 /* Set the LED pin to be an output */
 TRISDbits.TRISD1 = 0;
 /* Keep doing this a very long time */
 while( 1 )
 {
 /* Turn the LED on */
 LATDbits.LATD1 = 0;
 /* Turn the LED off */
 LATDbits.LATD1 = 1;
 }
}
Figure 2.23. MPLAB-X










