This is what gets me there on an 16f1828 @115,200 baud (16Mhz Osc)...
Code:
Osccon = %01111010 'sets the internal oscillator to 16Mhz
DEFINE OSC 16
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
DEFINE HSER_SPBRG 34 ' 115200 Baud @ 16MHz, -0.79%
SPBRGH = 0
BAUDCON.3 = 1 ' Enable 16 bit baudrate generator
RCSTA.7 = 1 ' Enable RB7 for TX USART (not sure if this is needed - needs removing one day to see!)
TrisB.7 = 0 ' set pin 10 RB7 to be an output
MrE's picmulticalc utility helps a lot wrt setting defines for your required serial speed...
http://www.picbasic.co.uk/forum/show...5639#post65639
your command usage looks fine - have you tried scoping the hserout pin?
Bookmarks