HEHE i was right... I post a SPBRH Calc on this forum to help to figure out.
BTW here's a short explanation. Using the Calc @9600 baud with 40MHZ with TXSTA = $24 give a SPBRG of 255 with error % 1.725. If you decrease this value the error % increase, so increasing SPBRG will reduce the error %... as SPBRG is a Byte register, you can't or you'll be OUT OF RANGE
Warning[202] c:\pbp\pbppic18.lib 7695: Argument out of range. Least significant bits used.
This is where it's coming from
NOW using SPBRG=20 @40MHZ 9600 bauds gives a SPBRG=64 and error % 0.16
I'm Satisfied now
Last edited by mister_e; - 14th September 2005 at 17:10.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks