// EasyPIC7 code for PIC18F45K22 8MHz xtal x4 PLL gives 32MHz
// 6 hour delay
void del6(){
unsigned long n;
for(n=21600 ; n > 0 ; n--){ // 6 hours in seconds is 21600
Delay_ms(1000); // 1 second delay
}
}
void main(){
ANSELC = 0; // all digital
TRISC = 0; // all output
PORTC = 2; // start with PC1 high, PC2 low
while(1){
PORTC = 2; // PC1 high, PC2 low
del6();
PORTC = 4; // PC1 low, PC2 high
del6();
}
}