To set up Hserin/Hserout use defines here is what the manual says.
The serial parameters and baud rate are specified using DEFINEs:
' Set receive register to receiver enabled
DEFINE HSER_RCSTA 90h
' Set transmit register to transmitter enabled
DEFINE HSER_TXSTA 20h
' Set baud rate
DEFINE HSER_BAUD 2400
' Set SPBRG, SPBRGH directly
' (better to set HSER_BAUD instead)
DEFINE HSER_SPBRG 25
DEFINE HSER_SPBRGH 0
This is the way I use it but I know there are always alternatives.
Bookmarks