Instructions

317 C-Control Pro IDE
© 2013 Conrad Electronic
divider = ( processor clock / baudrate / 16 ) -1
Example: 15 = (14745600 / 57600 / 16 ) -1
It is difficult to obtain the standard baudrates from the 16 MHz processor clock of the Mega128
CAN. Therefore are differences at higher baudrates between both divider tables.
DoubleClock Mode
If the High-Bit of the divider is set, the DoubleClock Mode is enabled. In this mode the divider value
must be doubled. E.g. for 57600 baud a divider value of 0f Hex (decimal 15) or 801e Hex (= 0x8000 +
2 * 15) can be used. For the MIDI baudrate (31250 baud) a divider of (14745600 / 31250 / 16 ) -1 =
28.49 has to be used. Since you can only pass integer values??, you get a better value in double clock
mode: 8039 Hex (= 8000 Hex + 2 * 28.5).
Table divider definition 14,7456 MHz (Mega32, Mega128):
divider
definition
baudrate
3071
SR_BD300
300bps
1535
SR_BD600
600bps
767
SR_BD1200
1200bps
383
SR_BD2400
2400bps
191
SR_BD4800
4800bps
95
SR_BD9600
9600bps
63
SR_BD14400
14400bps
47
SR_BD19200
19200bps
31
SR_BD28800
28800bps
8039 (Hex)
SR_BDMIDI
31250bps
23
SR_BD38400
38400bps
15
SR_BD57600
57600bps
11
SR_BD76800
76800bps
7
SR_BD115200
115200bps
3
SR_BD230400
230400bps
Table divider definition 16 MHz (Mega128 CAN):
divider
definition
baudrate
3332
SR_BD300
300bps
1666
SR_BD600
600bps
832
SR_BD1200
1200bps
416
SR_BD2400
2400bps
207
SR_BD4800
4800bps
103
SR_BD9600
9600bps
68
SR_BD14400
14400bps
51
SR_BD19200
19200bps
34
SR_BD28800
28800bps