raceman
Newbie level 4
hi all,
i am using a PIC16F628A chip in a serial communication project but I have a problem,
this code doesn't work, could anyone till me what is the problem with it??
CMCON = 7 ' Dis able the analog comparator
TRISA = 0
TRISB = %00000010
define HSER_RCSTA 90h
DEFINE HSER_TXSTA 20h
DEFINE HSER_BAUD 2400
DEFINE HSER_SPBRG 25
B VAR BYTE
MAIN:
HSERIN [DEC B]
PORTA = B
GOTO MAIN
END
i am using a PIC16F628A chip in a serial communication project but I have a problem,
this code doesn't work, could anyone till me what is the problem with it??
CMCON = 7 ' Dis able the analog comparator
TRISA = 0
TRISB = %00000010
define HSER_RCSTA 90h
DEFINE HSER_TXSTA 20h
DEFINE HSER_BAUD 2400
DEFINE HSER_SPBRG 25
B VAR BYTE
MAIN:
HSERIN [DEC B]
PORTA = B
GOTO MAIN
END