So your PIC have a Hardware USART, use it and use it's interrupts.
Use HSERIN instead of SERIN as it use the PIC Usart.
Maybe the following may help.
http://www.picbasic.co.uk/forum/show...1&postcount=11
You just need to set you USART register for the Right baudrate
something like
Code:
RCSTA = $90 ' Enable serial port & continuous receive
TXSTA = $20 ' Enable transmit, BRGH = 0
SPBRG = 64 ' 9600 Baud @ 0.16%
OR
Code:
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0
DEFINE HSER_SPBRG 64 ' 9600 Baud @ 0.16%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks