Datasheet

Chapter 2. First Program - Blink an LED
18
// Ex02.c - Blink an LED
#include <xc.h>
int main (void)
{
_TRISD3 = 0;
while (1)
{
_LATD3 = 1;
_LATD3 = 0;
}
}
Provides definitions for the dsPIC registers.
Sets the pin connected to the LED to be an output.
It will take some time before one becomes zero.
Turns off the LED.
Turns on the LED.