Re: 18LF4680 HSERIN and SEROUT hang my PIC!
smells of DMX project again 
that one do absolutely nothing, the spelling is wrong
try these defines
Code:
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_SPBRG 10 ' 115200 Baud @ 20MHz, -1.36%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
If it's really DMX, you really need to study the protocol first, HSERIN will be of next to none use for that. There's a nice DMX paper on microchip website. I know I already posted it somewhere in here.
Another thing, you may want to use a BaudrateVouched crystal for this baudrate. 1.36% err is not bad though.
Last edited by mister_e; - 18th May 2011 at 23:59.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks