7902 Group User’s Manual
12-37
SERIAL I/O
12.4 Clock asynchronous serial I/O (UART) mode
12.4.1 Transfer rate (Frequency of transfer clock)
The transfer rate is determined by the BRGi (addresses 3116, 3916).
When “n” is set into BRGi, BRGi divides the count source frequency by (n + 1). The BRGi’s output is further divided
by 16, and the resultant clock becomes the transfer clock. Accordingly, “n” is expressed by the following formula.
n =
— 1
F
16 ! B
n: Value set in BRGi (0016 to FF16)
F: BRGi’s count source frequency (Hz)
B: Transfer rate (bps)
An internal clock or an external clock can be selected as the BRGi’s count source with the internal/external
clock select bit (bit 3 at addresses 3016, 3816). When an internal clock is selected, the clock selected with
the BRG count source select bits (bits 0 and 1 at addresses 3416, 3C16) becomes the BRGi’s count source.
When an external clock is selected, the clock input to the CLKi pin becomes the BRGi’s count source.
Be sure to set the same transfer rate for both transmitter and receiver sides. Tables 12.4.3 and 12.4.4 list
the setting examples of transfer rate.
Each of the values, listed in these tables, realizes the actual transfer rate of which error toward an ideal
transfer rate is within 1 %.
Table 12.4.3 Setting examples of transfer rate (1)
BRGi’s set
value: n (Note)
63 (3F16)
127 (7F16)
63 (3F16)
31 (1F16)
127 (7F16)
63 (3F16)
41 (2916)
31 (1F16)
15 (0F16)
Actual time
(bps)
300.00
600.00
1200.00
2400.00
4800.00
9600.00
14628.57
19200.00
38400.00
BRGi’s
count source
f64
f16
f8
f2
BRGi’s set
value: n (Note)
64 (4016)
129 (8116)
64 (4016)
129 (8116)
64 (4016)
42 (2A16)
19 (1316)
Actual time
(bps)
300.48
600.96
1201.92
2403.85
4807.69
9615.38
14534.88
31250.00
BRGi’s
count source
f64
f16
f2
fsys = 20 MHz
fsys = 19.6608 MHz
Transfer
rate (bps)
300
600
1200
2400
4800
9600
14400
19200
31250
38400
BRGi’s set
value: n (Note)
35 (2316)
71 (4716)
35 (2316)
18 (1216)
71 (4716)
35 (2316)
23 (1816)
17 (1116)
11 (0B16)
10 (0A16)
8 (0816)
5 (0516)
3 (0316)
Actual time
(bps)
300.00
600.00
1200.00
2400.00
4800.00
9600.00
14400.00
19200.00
28800.00
31418.18
38400.00
57600.00
115200.00
BRGi’s
count source
f64
f16
f2
fsys = 11.0592 MHz
Transfer
rate (bps)
300
600
1200
2400
4800
9600
14400
19200
28800
31250
38400
57600
115200
Table 12.4.4 Setting examples of transfer rate (2)
Note: This applies when the peripheral
device’s clock select bits 1, 0 (bits 7,
6 at address BC16) = “002.”