Datasheet
CHAPTER 16 MANCHESTER CODE GENERATOR
User’s Manual U18698EJ1V0UD
420
<2> Error of baud rate
The baud rate error can be calculated by the following expression.
• Error (%) = − 1 × 100 [%]
Caution Keep the baud rate error during transmission to within the permissible error range at the
reception destination.
Example: Frequency of base clock = 2.5 MHz = 2,500,000 Hz
Set value of MC0BRS4 to MC0BRS0 bits of MC0CTL2 register = 10000B (k = 16)
Target baud rate = 76,800 bps
Baud rate = 2.5 M/(2 × 16)
= 2,500,000/(2 × 16) = 78125 [bps]
Error = (78,125/76,800 − 1) × 100
= 1.725 [%]
<3> Example of setting baud rate
fPRS = 10.0 MHz fPRS = 8.38 MHz fPRS = 8.0 MHz fPRS = 6.0 MHz
Baud
Rate
[bps]
MC0CKS2
to
MC0CKS0
k
Calculated
Value
ERR
[%]
MC0CKS2
to
MC0CKS0
k
Calculated
Value
ERR
[%]
MC0CKS2
to
MC0CKS0
k
Calculated
Value
ERR
[%]
MC0CKS2
to
MC0CKS0
k
Calculated
Value
ERR
[%]
4800 – – – – 5, 6, or 7 27 4850 1.03 5, 6, or 7 26 4808 0.16 5, 6, or 7 20 4688 –2.34
9600 5, 6, or 7 16 9766 1.73 4 27 9699 1.03 5, 6, or 7 13 9615 0.16 4 20 9375 –2.34
19200 5 8 19531 1.73 3 27 19398 1.03 4 13 19231 0.16 4 10 18750 –2.34
31250 4 10 31250 0 2 17 30809 –1.41 4 8 31250 0 2 24 31250 0
38400 4 8 39063 1.73 2 27 38796 1.03 3 13 38462 0.16 2 20 37500 –2.34
56000 3 11 56818 1.46 2 19 55132 –1.55 3 9 55556 –0.79 1 27 55556 –0.79
62500 2 20 62500 0 2 17 61618 –1.41 3 8 62500 0 2 12 62500 0
76800 2 16 78125 1.73 1 27 77592 1.03 2 13 76923 0.16 2 10 75000 –2.34
115200 1 22 113636 –1.36 2 9 116389 1.03 1 17 117647 2.12 1 13 115385 0.16
125000 1 20 125000 0 1 17 123235 –1.41 1 16 125000 0 1 12 125000 0
153600 1 16 156250 1.73 2 7 149643 –2.58 1 13 153846 0.16 1 10 150000 –2.34
1 8 261875 4.75250000 1 10 250000 0
0 17 246471 –1.41
1 8 250000 0 1 6 250000 0
Remark MC0CKS2 to MC0CKS0: Bits 2 to 0 of MCG control register 1 (MC0CTL1) (setting of base clock (f
XCLK))
k: Value set by bits 4 to 0 (MC0BRS4 to MC0BRS0) of MCG control register 2
(MC0CTL2) (k = 4, 5, 6, …, 31)
f
PRS: Peripheral hardware clock frequency
ERR: Baud rate error
Actual baud rate (baud rate with error)
Desired baud rate (correct baud rate)