Hi every1,
dis is my 1 time posted my problem. i encounter a problem when using de comman serin. my program working fine with baud rate 9600,8,N,1 but i do not know how 2 change de baud rate to 19200. any1 can help me out. thank you very much
Printable View
Hi every1,
dis is my 1 time posted my problem. i encounter a problem when using de comman serin. my program working fine with baud rate 9600,8,N,1 but i do not know how 2 change de baud rate to 19200. any1 can help me out. thank you very much
As far as i'm aware of, SERIN will never work @19200 bauds :(
You must use HSERIN with the internal USART
@4mhz
@8MHZCode:DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_SPBRG 12 ' 19200 Bauds
DEFINE HSER_CLOERR 1
@20MHZCode:DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_SPBRG 25 ' 19200 Bauds
DEFINE HSER_CLOERR 1
But there's an alternative that could work, see DEBUG in the PBP manualCode:DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_SPBRG 64 ' 19200 Bauds
DEFINE HSER_CLOERR 1