void main() {
adcon1=0b00000111; //pcfg settings: all digital I/O
cmcon= 0b00000111; //comparators off
cvrcon=0; //voltage comparators off
txsta=0b00000100; //8-bit, Async mode, Hi-Speed,
intcon=0b11000000; //enable all peripheral interrupts
spbrg=129; //9.6 kBps
trise=0x07; //porte=input, pspmode_bit=0;
trisa=0b100000; //ra5=input
trisd=0xff; //rd4=input, rest output
trisb=0; //portb=output
trisc=0b10111111; //input for keypads and RX=input/TX=0utput
spen_bit=1; // serial port enable
portb=0;
porta=0;
while (1){
txreg=0xAA;
txen_bit=1;
}
}