Transmit Operation In Uart Mode; Setting The Uart Baud Rate - Mitsubishi Electric M32R Series User Manual

Mitsubishi 32-bit risc single-chip microcomputers
Table of Contents

Advertisement

12

12.6 Transmit Operation in UART Mode

12.6.1 Setting the UART Baud Rate

The baud rate (data transfer rate) during UART mode is determined by a transmit/receive shift
clock. In UART mode, the source for this transmit/receive shift clock is always the internal clock
regardless of how the internal/external clock select bit (SIO Transmit/Receive Mode Register bit
D11) is set.
(1) Calculating the UART mode baud rate
After being divided by the clock divider, f(BCLK) is fed into the Baud Rate Generator (BRG), after
which it is further divided by 16 to produce a transmit/receive shift clock. The clock divider's
divide-by value is selected from 1, 8, 32, or 256(note) using the SIO Transmit Control Register's
CDIV (baud rate generator count source select) bits (D2, D3). The Baud Rate Generator divides
the clock it received from the clock divider by (baud rate register set value + 1) and further divides
the resulting clock by 16 to produce a transmit/receive shift clock.
During UART mode (in which the internal clock is always used), the baud rate is calculated using
the equation below.
Baud rate = ————————————————
Clock divider's divide-by value × (baud rate register set value + 1) × 16
[bps]
Note : If the divide-by value selected for the baud rate generator count source is "1" (i.e., f(BCLK)
itself), make sure the baud rate register value you set is equal to or greater than 7.
1 (BCLK)
Baud rate register set value = H'00 to H'FF (Note)
Clock divider's divide-by value = 1, 8, 32, or 256
12-45
12.6 Transmit Operation in UART Mode
SERIAL I/O
Ver.0.10

Advertisement

Table of Contents
loading

Table of Contents