PDA

View Full Version : How to code Baud 38400



chai98a
- 18th December 2005, 14:57
I try to conect PIC to PC with Max232 we need to connect at 38400 baud rate
microcode studio ,PBP 2.45

mister_e
- 18th December 2005, 17:23
PIC?
OSC speed?

Did you read the PBP manual in SEROUT, DEBUG,SEROUT2, HSEROUT section?

Charles Linquis
- 18th December 2005, 17:30
I don't know if PBP has a DEFINE that goes that high, but in any case you can always directly set the SPBRG register. The exact setting depends on your oscillator frequency, but if you are running at 20Mhz, you can set
SPBRG = 32 to give you 38.4Kbaud.
You will have to consult the datasheet if you are running at a different frequency.