Initial Settings For Uart Transmission - Mitsubishi Electric M32R Series User Manual

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

Advertisement

12

12.6.3 Initial Settings for UART Transmission

To transmit data in UART mode, initialize the serial I/O following the procedure described below.
(1) Setting SIO Transmit/Receive Mode Register
• Set the register to UART mode
• Set parity (when enabled, select odd/even)
• Set stop bit length
• Set character length
Note : During UART mode, settings of the internal/external clock select bit have no effect (only
the internal clock is useful).
(2) Setting SIO Transmit Control Register
• Select the clock divider's divide-by ratio.
(3) Setting SIO Baud Rate Register
Set a baud rate generator value. (Refer to Section 12.6.1, "Setting the UART Baud Rate.")
(4) Setting SIO Interrupt Mask Register
• Enable or disable SIO transmit interrupt.
(5) Setting the Interrupt Controller (SIO Transmit Interrupt Control Register)
When you use a transmit interrupt, set its priority level.
(6) Setting DMAC
When you issue DMA transfer requests to the internal DMAC when the transmit buffer is empty,
set the DMAC. (Refer to Chapter 9, "DMAC.")
(7) Selecting pin functions
Because the serial I/O related pins serve dual purposes (shared with input/output ports), set pin
functions. (Refer to Chapter 8, "Input/Output Ports and Pin Functions.")
12.6 Transmit Operation in UART Mode
12-48
SERIAL I/O
Ver.0.10

Advertisement

Table of Contents
loading

Table of Contents