![](http://datasheet.mmic.net.cn/90000/ML66Q525-NTB_datasheet_3507944/ML66Q525-NTB_244.png)
ML66525 Family User’s Manual
Chapter 11
Serial Port Functions
11 - 13
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 transmit clock is to be output externally (master mode), set bit 2 (P15IO2) to
“1” to configure that port as an output.
If the transmit clock is to be input externally (slave
mode), reset bit 2 (P15IO2) to “0” to configure that port as an input.
(2)
Port 15 secondary function control register (P15SF)
Specify with bit 0 (P15SF0) whether the RXD6 pin will be pulled-up.
If the transmit clock is
to be output externally (master mode), set bit 2 (P15SF2) to “1” to configure that port as a
secondary function output.
If the transmit clock is to be input externally (slave mode),
specify with bit 2 (P15SF2) whether the input will be pulled-up.
(3)
SIO6 receive control register (SR6CON)
Set bit 0 (SR6MOD) to “1” to specify the mode to synchronous mode.
Specify the receive
data length with bit 1 (SR6LN).
Specify the master or slave mode with bit 3 (SR6SLV).
With bit 6 (RC6IE), specify whether interrupt requests are enabled or disabled when a receive
complete signal occurs.
If bit 7 (SR6REN) is set to “1”, reception is enabled and the
reception operation is performed when data arrives.
11.4.3.3 Baud Rate Generator (Timer 3) Settings
If overflow of timer 3 is selected for use as the baud rate clock, implement the following
settings.
(1)
General-purpose 8-bit timer 3 counter (TM3C)
Set the timer value that will be valid at the start of counting.
When writing to TM3C, the
same value will also be simultaneously and automatically written to the general-purpose 8-bit
timer 3 register (TM3R).
(2)
General-purpose 8-bit timer 3 control register (TM3CON)
Bits 0 to 2 (TM3C0 to TM3C2) of this register specify the count clock for timer 3.
If bit 3
(TM3RUN) is set to “1”, timer 3 will begin counting.
If reset to “0”, timer 3 will halt
counting.
[Equation to Calculate Baud Rate]
B = f(TM3)
× 1/(256 – D) × 1/n
B : baud rate [bps]
f(TM3) : timer 3 input clock frequency [Hz]
D : reload value (0 to 255)
n : 16 for the UART mode
4 for the synchronous mode