![](http://datasheet.mmic.net.cn/120000/MN101CP66DBF_datasheet_3559884/MN101CP66DBF_397.png)
XI - 45
Chapter 11 Serial Interface 0
Operation
Setup Procedure
Description
(6)
Select the first bit to be transfered.
SC0MD0 (x'3F90')
bp4
: SC0DIR
= 0
(7)
Set the SC0MD2 register.
Control the output data.
SC0MD2 (x'3F92')
bp0
: SC0BRKE = 0
(8)
Select the added parity bit.
SC0MD2 (x'3F92')
bp3
: SC0NP
= 0
bp5-4
: SC0PM1-0 = 00
(9)
Specify the flame mode.
SC0MD2 (x'3F92')
bp7-6
: SC0FM1-0 = 11
(10) Set the SC0MD1 register.
Select the communication type.
SC0MD1 (x'3F91')
bp0
: SC0CMD = 1
(11) Select the clock frequency.
SC0MD1 (x'3F91')
bp3
: SC0CKM = 1
bp2
: SC0MST
= 1
(12) Control the pin function.
SC0MD1 (x'3F91')
bp4
: SC0SBOS = 1
bp5
: SC0SBIS = 1
bp7
: SC0IOM
= 0
(13) Enable the interrupt.
SC0RICR (x'3FF5')
bp1
: SC0RIE
= 1
SC0TICR (x'3FF6')
bp1
: SC0TIE
= 1
(6)
Set the SC0DIR flag of the SC0MD0 register
to "0" to select MSB as first transfer bit.
(7)
Set the SC0BRKE flag of the SC0MD2 register
to "0" to select serial data transmission.
(8)
Set the SC0PM1-0 flag of the SC0MD2
register to "00" to select 0 parity, and set the
SC0NPE flag to "0" to add parity bit.
(9)
Set the SC0FM1-0 flag of the SC0MD2
register to "11" to select 8 bits + 2 stop bits at
the flame mode.
(10) Set the SC0CMD flag of the SC0MD1 register
to "1" to select duplex UART.
(11) Set the SC0CKM flag of the SC0MD1 register
to "1" to select "divided by 8" at source clock.
And, the SC0MST flag should be always set to
"1" to select colck master.
(12) Set the SC0SBOS, SC0SBIS flag of the
SC0MD1 register to "1" to set the TXD pin to
serial data output and the RXD pin to serial
data input.
(13) Set the SC0RIE flag of the SC0RICR register
to "1", and set the SC0TIE flag ot the
SC0TICR register to "1" to enable the interrupt
request.
If any interrupt request flag is already set, clear
them.
[
Chapter 3. 3-1-4 Interrupt Flag Setup ]