Datasheet
V850ES/JG3-H, V850ES/JH3-H CHAPTER 17 ASYNCHRONOUS SERIAL INTERFACE C (UARTC)
R01UH0042EJ0500 Rev.5.00 Page 757 of 1513
Aug 12, 2011
To set the baud rate, perform the following calculation for setting the UCnCTL1 and UCnCTL2 registers (when
using internal clock).
<1> Set k to fxx/2/(2 × target baud rate) and m to 0.
<2> If k is 256 or greater (k ≥ 256), reduce k to half (k/2) and increment m by 1 (m + 1).
<3> Repeat Step <2> until k becomes less than 256 (k < 256).
<4> Round off the first decimal point of k to the nearest whole number.
If k becomes 256 after round-off, perform Step <2> again to set k to 128.
<5> Set the value of m to UCnCTL1 register and the value of k to the UCnCTL2 register.
Example: When f
XX = 48 MHz and target baud rate = 153,600 bps
<1> k = 480,000,000/2/(2 × 153,600) = 78.125…, m = 0
<2>, <3> k = 78.125… < 256, m = 0
<4> Set value of UCnCTL2 register: k = 78 = 4EH, set value of UCnCTL1 register: m = 0
Actual baud rate = 48,000,000/2/(2 × 78)
= 153,846 [bps]
Baud rate error = {48,000,000/2/(2 × 78 × 153,600) − 1} × 100
= 0.160 [%]
The representative examples of baud rate settings are shown below.
Table 17-4. Baud Rate Generator Setting Data
fXX = 48 MHz fXX = 32 MHz fXX = 24 MHz
Baud Rate
(bps)
UCnCTL1 UCnCTL2 ERR (%) UCnCTL1 UCnCTL2 ERR (%) UCnCTL1 UCnCTL2 ERR (%)
300 08H 9CH 0.16 07H D0H 0.16 07H 9CH −2.3
600 07H 9CH 0.16 06H D0H 0.16 06H 9CH 0.16
1,200 06H 9CH 0.16 05H D0H 0.16 05H 9CH 0.16
2,400 05H 9CH 0.16 04H D0H 0.16 04H 9CH 0.16
4,800 04H 9CH 0.16 03H D0H 0.16 03H 9CH 0.16
9,600 03H 9CH 0.16 02H D0H 0.16 02H 9CH 0.16
19,200 02H 9CH 0.16 01H D0H 0.16 01H 9CH 0.16
31,250 01H C0H 0.00 01H 80H 0.00 00H C0H 0.00
38,400 01H 9CH 0.16 00H D0H 0.16 00H 9CH 0.16
76,800 00H 9CH 0.16 00H 68H 0.16 00H 4EH 0.16
153,600 00H 4EH 0.16 00H 34H 0.16 00H 27H 0.16
312,500 00H 26H 1.05 00H 1AH −1.54 00H 13H 1.05
625,000 00H 13H 1.05 00H 0DH −1.54 00H 0AH −4.00
1,000,000 00H 0CH 0.00 00H 08H 0.00 00H 06H 0.00
1,250,000 00H 0AH −4.00 Setting prohibited 00H 05H −4.00
2,000,000 00H 06H 0.00 00H 04H 0.00
2,500,000 00H 05H −4.00
3,000,000 00H 04H 0.00
Setting prohibited
Setting prohibited
Remark f
XX: Main clock frequency
ERR: Baud rate error (%)