[code]
#define FCY 4000000UL // Instruction cycle frequency, Hz - required for __delayXXX() to work
#include <libpic30.h>  // __delayXXX() functions macros defined here
int main(void)
{
// initialize the device
    SYSTEM_Initialize();
    OSCILLATOR_Initialize();


while (1)
    {
       IO_RD3_SetHigh(); //LED on
       __delay_ms(500);
       
       IO_RD3_SetLow(); //LED off
       __delay_ms(100);
        // Add your application code
    }
return -1;
}
[/code]