![](http://datasheet.mmic.net.cn/90000/ML66Q525-NTB_datasheet_3507944/ML66Q525-NTB_254.png)
ML66525 Family User’s Manual
Chapter 11
Serial Port Functions
11 - 23
11.5.3 Example of SIO1-related Register Settings
11.5.3.1 UART Mode Settings
Transmit settings
(1)
Port 8 mode register (P8IO)
If TXD8 (transmit data output) is to be used, set bit 1 (P8IO1) to “1” to configure that port as
an output.
If the baud rate clock is to be input externally, reset bit 2 (P8IO2) to “0” to
configure that port as an input.
(2)
Port 8 secondary function control register (P8SF)
If TXD1 (transmit data output) is to be used, set bit 1 (P8SF1) to “1” to configure that port as a
secondary function output.
If the baud rate clock is to be input externally, specify with bit 2
(P8SF2) whether the input will be pulled-up.
(3)
SIO1 transmit control register (ST1CON)
Reset bit 0 (ST1MOD) to “0” to change the mode to UART mode.
Specify the transmit data
length with bit 1 (ST1LN).
Specify the stop bit length with bit 3 (ST1STB).
Specify
whether there is parity with bit 4 (ST1PEN).
If parity is selected, specify the parity bit logic
with bit 5 (ST1ODD).
With bit 6 (TR1MIE), specify whether interrupt requests are enabled
or disabled when a transmit buffer empty signal occurs.
With bit 7 (TR1NIE), specify
whether interrupt requests are enabled or disabled when a transmit complete signal occurs.
(4)
SIO1 receive control register (SR1CON)
Specify with bit 2 (S1EXC) whether the baud rate clock is internal (overflow output of timer 4)
or external (RXC1).
(5)
SIO1 transmit-receive buffer register (S1BUF)
Transmission is started by writing the transmit data to S1BUF.
Receive settings
(1)
Port 8 mode register (P8IO)
If RXD1 (receive data input) is to be used, reset bit 0 (P8IO0) to “0” to configure that port as
an input.
If the baud rate clock is to be input externally, reset bit 2 (P8IO2) to “0” to
configure that port as an input.
(2)
Port 8 secondary function control register (P8SF)
Specify with bit 1 (P8SF0) whether the RXD1 pin will be pulled-up.
If the baud rate clock is
to be input externally, specify with bit 2 (P8SF2) whether the input will be pulled-up.