C Programming for Embedded Systems
Examples
Spring 2010
#include < pic.h> __CONFIG(FCMDIS & IESODIS & BORDIS & UNPROTECT & MCLRDIS & PWRTEN & WDTDIS & INTIO); int i; main () { PORTA = 0; CMCON0 = 7; ANSEL = 0; TRISA4 = 0; TRISA5 = 0; while (1==1) { for (i=0; i<25000; i++); RA4 = RA4 ^ 1; } }