Quote Originally Posted by b1arrk5 View Post
Hi all,
I'm trying unsuccessfully to get an 18f4550 to run 38400 baud when set as follows:

Define OSC 48
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_SPBRG 77 ' 38400 Baud @ 0.16%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically

I'm using a 20Mhz crystal, Picbasic Pro 2.46, Mpasm 7.52. When it compiles it doesn't like the PBPPIC18.lib, it says the argument is out of range and only the least significant bits are used. If I change the OSC define to 20 it works fine, but then I can't use USB.

Thanks!

Jerry.
Have you tried HSER_BAUD 38400 instead?
Maybe SEROUT2 with a mode number of 6?
At least post the offending part of your .asm file so we can see which variables are causing the pain...