Kod: Markera allt
#include <htc.h>
#define _XTAL_FREQ 4000000
// Config: ext reset, no code protect, no brownout detect, no watchdog,
// power-up timer enabled, 4MHz int clock
__CONFIG(MCLREN & UNPROTECT & BORDIS & WDTDIS & PWRTEN & INTIO);
void main()
{
TRISA = 0b11111101; // configure GP1 (only) as an output
for (;;) { // loop forever
RA1 = 1;
__delay_ms(500);
RA1 = 0;
__delay_ms(500);
}
}