JKaiser
- 11th December 2014, 17:38
Could someone please help me get the baud-rates correct for 9600. I have been using the following defines for 115200 and works great.
DEFINE OSC 64
DEFINE LOADER_USED 1
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_CLROERR 1
DEFINE HSER_SPBRG 138
SPBRGH = 0
BAUDCON.3 = 1
I tried changing DEFINE HSER_SPBRG 138 to 1666 per the data sheet but does not seem to matter. Also tried changing HSER_TXSTA 24h to 20h.
John
DEFINE OSC 64
DEFINE LOADER_USED 1
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_CLROERR 1
DEFINE HSER_SPBRG 138
SPBRGH = 0
BAUDCON.3 = 1
I tried changing DEFINE HSER_SPBRG 138 to 1666 per the data sheet but does not seem to matter. Also tried changing HSER_TXSTA 24h to 20h.
John