RS-232 Baud Rate Change - cont’d.
All baud rates are entered as hex numbers. To determine the decimal divisor use the following formula. The decimal number must be converted to hexadecimal before entering the number into byte 6 and 7. Baud rates faster than 57,600 are not supported.
UART clock = 7,372,800 Hz
Decimal Divisor = Clock frequency (7,372,800)
Baud output x 16
If you want a baud rate output of 300 baud:
Decimal Divisor = 7,372,800 300 x 16
Decimal Divisor = 1536 = 600 hex
Baud 1= 00
Baud 2= 06
Programming a baud rate change to 300 baud, 1 stop bit, 8 bit data, no parity.
Table 13. Baud Rate Setup
Byte | Byte | Byte 3 | Byte 4 |
|
| Byte 5 |
|
| Byte 6 |
|
| Byte 7 |
| |
1 | 2 | Nibble 2 | Nibble 1 | Nibble 2 | Nibble 1 |
| UB3 |
|
| Baud 1 |
|
| Baud 2 |
|
81 | 21 | 0010 | 0011 | 0000 | 0010 |
|
|
|
|
|
|
|
|
|
81 | 21 | 23 hex | 02 hex |
| 03 hex |
|
| 00 hex |
|
| 06 hex |
|
Table 13 is set to produce a baud rate of 300, 1stop bit, an 8 bit data word, and no parity.
10 | 1939STB4600 Manual | |
| B&B Electronics Mfg Co Inc – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph | - Fax |
| B&B Electronics Ltd – Westlink Commercial Park – Oranmore, Galway, Ireland – Ph +353 91 792444 | – Fax +353 91 792445 |