Originally posted by Bruce
Well I just learned a few things about PBP USART defines.

1. If you use PBP USART defines like DEFINE HSER_TXSTA 24h, but do "not" use HSEROUT or HSERIN somewhere in the program, these defines don't configure the USART like one might assume.

In this case you need to write directly to USART registers to setup everything.

TXSTA = $24 ' Enable TXEN and BRGH=1
RCSTA = $90 ' SPEN & CREN = 1
SPBRG = 129 ' SPBRG val for 19,200bps
That's interesting ! Thanks Bruce!

egberttheone
ok, that are the settings for the 16f628 but what do i need to set for a pic18f452 running @ 40mhz? the data sheet says N/A


In fact it make sense that a PIC who run @40MHZ provide slow serial com. The slowest you can do @40MHZ is 9600 Bauds

Everything is in the datasheet! @40 MHZ for 9600 bauds SPBRG=64 TXSTA=20h, RCSTA=90h