You can easily run that baud rate if you use the hardware serial port, but why are you reading the receive register directly?
Why not use HSERIN?
You can easily run that baud rate if you use the hardware serial port, but why are you reading the receive register directly?
Why not use HSERIN?
Charles Linquist
Where is the difference between reading the receive register by x = rcreg or hserin?
Does hserin do a little more than only shift the receive buffer in a variable?
Not much more - if you are receiving only one byte, but it does a good job of checking CREN and clearing it, if necessary. That is something your code doesn't do and the hardware doesn't automatically clear the bit. The CLOERR define in your header does nothing in your case.
Charles Linquist
Bookmarks