![](http://datasheet.mmic.net.cn/90000/ML66Q525-NTB_datasheet_3507944/ML66Q525-NTB_242.png)
ML66525 Family User’s Manual
Chapter 11
Serial Port Functions
11 - 11
11.4.3 Example of SIO6-related Register Settings
11.4.3.1 UART Mode Settings
Transmit settings
(1)
Port 15 mode register (P15IO)
If TXD6 (transmit data output) is to be used, set bit 1 (P15IO1) to “1” to configure that port as
an output.
If the baud rate clock is to be input externally, reset bit 2 (P15IO2) to “0” to
configure that port as an input.
(2)
Port 15 secondary function control register (P15SF)
If TXD6 (transmit data output) is to be used, set bit 1 (P15SF1) 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
(P15SF2) whether the input will be pulled-up.
(3)
SIO6 transmit control register (ST6CON)
Reset bit 0 (ST6MOD) to “0” to change the mode to UART mode.
Specify the transmit data
length with bit 1 (ST6LN).
Specify the stop bit length with bit 3 (ST6STB).
Specify
whether there is parity with bit 4 (ST6PEN).
If parity is selected, specify the parity bit logic
with bit 5 (ST6ODD).
With bit 6 (TR6MIE), specify whether interrupt requests are enabled
or disabled when a transmit buffer empty signal occurs.
With bit 7 (TR6NIE), specify
whether interrupt requests are enabled or disabled when a transmit complete signal occurs.
(4)
SIO6 receive control register (SR6CON)
Specify with bit 2 (S6EXC) whether the baud rate clock is internal (overflow output of timer 3)
or external (RXC6).
(5)
SIO6 transmit-receive buffer register (S6BUF)
Transmission is started by writing the transmit data to S6BUF.
Receive settings
(1)
Port 15 mode register (P15IO)
If RXD6 (receive data input) is to be used, reset bit 0 (P15IO0) to “0” to configure that port as
an input.
If the baud rate clock is to be input externally, reset bit 2 (P15IO2) to “0” to
configure that port as an input.
(2)
Port 15 secondary function control register (P15SF)
Specify with bit 1 (P15SF0) whether the RXD6 pin will be pulled-up.
If the baud rate clock
is to be input externally, specify with bit 2 (P15SF2) whether the input will be pulled-up.