English
Language : 

UPD784938 Datasheet, PDF (452/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 18 ASYNCHRONOUS SERIAL INTERFACE/3-WIRE SERIAL I/O
18.4.3 Baud rate generator operation
The baud rate generator only operates when UART/IOE transmit/receive operations are enabled. The generated baud
rate clock is a signal scaled from the internal clock (fXX) or a signal scaled from the clock input from the external baud rate
input (ASCK) pin.
Caution If a write to the baud rate generator control register (BRGC) is performed during communication, the
generated baud rate clock may be disrupted, preventing normal communication from continuing. The
BRGC should therefore not be written to during communication.
(1) Baud rate clock generation in UART mode
(a) Using internal clock (fXX)
This function is selected by setting (to 1) bit 0 (SCK) of the asynchronous serial interface mode register (ASIM).
The internal clock (fXX) is scaled by the frequency divider, this signal (fPRS) is scaled by the 5-bit counter, and the
signal further divided by 2 is used as the baud rate. The baud rate is given by the following expression:
(Baud rate) =
fXX
(k + 16) • 2n+2
fXX: Oscillator frequency or external clock input frequency
k: Value set in bits MDL3 to MDL0 of BRGC (k = 0 to 14)
n: Value set in bits TPS3 to TPS0 of BRGC (n = 0 to 11)
(b) Using external baud rate input
This function is selected by clearing (to 0) bit 0 (SCK) of the asynchronous serial interface mode register (ASIM).
When this function is used, bits MDL3 to MDL0 of the baud rate generator control register (BRGC) must all be
cleared (to 0) (k = 0).
When this function is used with UART2, it is necessary to set (to 1) bit 2 of the port 1 mode control register (PMC1)
and set the P12 pin to control mode.
The ASCK pin input clock is scaled by the frequency divider, and the signal obtained by dividing this signal by
32 (fPRS) (division by 16 and division by 2) is used as the baud rate. The baud rate is given by the following
expression:
(Baud rate) = fASCK
2n+6
fASCK: ASCK pin input clock frequency
n: Value set in bits TPS3 to TPS0 of BRGC (n = 0 to 11)
When this function is used, a number of baud rates can be generated by one external input clock.
452
Preliminary User’s Manual U13987EJ1V0UM00