fork download
  1. #include <xc.h>
  2. #define _XTAL_FREQ 20000000 //define crystal frequency to 20MHz
  3.  
  4. void main(void)
  5. {
  6. TRISC0=0; //set RC0 pin as a digital output pin
  7. while(1)
  8. {
  9. RC0 = 1; // set RC0 pin to logic High & turn on
  10. __delay_ms(1000); //add delay of 1 second
  11. RC0 = 0; // set RC0 pin to logic low & turn off
  12. __delay_ms(1000); //add delay of 1 second
  13.  
  14. }
  15. return;
  16. }
Success #stdin #stdout 0.03s 25808KB
stdin
Standard input is empty
stdout
#include <xc.h>
#define _XTAL_FREQ 20000000 //define crystal frequency to 20MHz

void main(void) 
{
TRISC0=0; //set RC0 pin as a digital output pin
while(1)
{
   RC0 = 1;                  // set RC0 pin to logic High &  turn on 
   __delay_ms(1000);  //add delay of 1 second 
   RC0 = 0;                  // set RC0 pin to logic low & turn off
  __delay_ms(1000);  //add delay of 1 second

}
return;
}