MIIP. You must set the oscillator to HS mode first.
try change your DEFINEs to those..
Code:
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_SPBRG 39 ' 31250 Bauds
using that, and with my calc, i promise it gives you 0% of error percentage... for a perfect 20MHZ clock so far. I don't know how PBP calculate it but try it first.
NOW, also try to change...
Code:
HSEROUT [HEX 144, HEX 71, HEX 127]
to
Code:
HSEROUT [$144, $71, $127]
about now?
Are you sure that 144 must be the a HEX value? Could those value be decimal?
Bookmarks