fork download
  1. #include <xc.h>
  2. #define _XTAL_FREQ 4000000
  3. #define LED PORTCbits.RC0
  4.  
  5. void main(void)
  6. {
  7. OSCCON = 0xEF; // Internal oscillator with 4MHz
  8. TRISCbits.TRISC0 = 0; // RC0 as Output
  9. while(1)
  10. {
  11. LED = 0;
  12. __delay_ms(500);
  13. LED = 1;
  14. __delay_ms(500);
  15. }
  16. return;
  17. }
Success #stdin #stdout 0.02s 25708KB
stdin
Standard input is empty
stdout
#include <xc.h>
#define _XTAL_FREQ 4000000
#define LED PORTCbits.RC0

void main(void) 
{
    OSCCON = 0xEF;       // Internal oscillator with 4MHz
    TRISCbits.TRISC0 = 0; // RC0 as Output
    while(1)
    {
        LED = 0;
        __delay_ms(500);
        LED = 1;
        __delay_ms(500);
    }
    return;
}