CHAPTER 10 SERIAL INTERFACE FUNCTION
User’s Manual U14492EJ3V0UD
476
(c) Prescaler compare registers 1, 2 (PRSCM1, PRSCM2)
PRSCMn is an 8-bit compare register that sets the value of the 8-bit timer counter (n = 1, 2).
These registers can be read/written in 8-bit units.
Cautions 1. The internal timer counter is cleared by writing to the PRSCMn register. Therefore,
do not overwrite the PRSCMn register during transmission operation.
2. Perform PRSCMn register settings prior to setting the UARTCEn bit to 1. If the
contents of the PRSCMn register are overwritten when the value of the UARTCEn bit
is 1, the cycle of the baud rate signal is not guaranteed.
7
PRSCM7
PRSCM1
6
PRSCM6
5
PRSCM5
4
PRSCM4
3
PRSCM3
2
PRSCM2
1
PRSCM1
0
PRSCM0
Address
FFFFFA30H
Initial value
00H
7
PRSCM7
PRSCM2
6
PRSCM6
5
PRSCM5
4
PRSCM4
3
PRSCM3
2
PRSCM2
1
PRSCM1
0
PRSCM0
Address
FFFFFA50H
Initial value
00H
(d) Baud rate generation
First, when the UARTCEn bit of the PRSMn register is overwritten with 1, the 8-bit timer counter for baud
rate signal generation starts counting up with the clock selected with bits BGCS1 and BGCS0 of the
PRSMn register. The count value of the 8-bit timer counter is compared with the value of the PRSCMn
register, and if these values match, a timer count clock pulse of 1 cycle is output to the output controller
for the baud rate.
The output controller for the baud rate reverses the baud rate signal in synchronization with the rising
edge of the timer count clock when this pulse is “1”.
(e) Cycle of baud rate signal
The cycle of the baud rate signal is calculated as follows.
••••
When setting value of PRSCMn register is 00H
(Cycle of signal selected with bits BGCS1, BGCS0 of PRSMn register)
×
256
×
2
••••
In cases other than above
(Cycle of signal selected with bits BGCS1, BGCS0 of PRSMn register)
×
(setting value of PRSCMn
register)
×
2