![](http://datasheet.mmic.net.cn/30000/MN101CF54DBF_datasheet_2374941/MN101CF54DBF_400.png)
Chapter 11
Serial Interface 0
XI - 46
Operation
Note : (5) to (6), (7) to (9), (10) to (12) can be set at the same time.
(14) Set the baud rate timer by the TM3MD register,
the TM3OC register. Set the TM3EN flag to "1" to
start timer 3.
(15) The transmission is started by setting the
transmission data to the serial transmission data
buffer (TXBUF0). When the transmission is
finished, the serial 0 transmission interrupt
(SC0TIRQ) is generated. After the serial data is
input from the RXD pin and the start condition is
recognized, the received data is stored.
When the reception is finished, the received data
is stored to the serial received data buffer
RXBUF0 and the serial 0 reception data buffer
interrupt SC0RICR is generated.
Setup Procedure
Description
(14) Set the baud rate timer.
(15) Start serial communication.
The transmission data
→ TXBUF0
(x'3F95')
The received data
→ input to RXD
When the TXD / RXD pin are connected for communication with 1
channel, the TXD pin
inputs / outputs serial data. The port direction control register P0DIR switches I/O. At recep-
tion, set SC0SBIOS of the SC0MD1 register to "1" to select serial data input. The RXD pin
can be used as a general port.
This serial interface contains emergency reset function. If communication need to be
stopped by force, set SC0SBOS and SC0SBIS of the SC0MD1 register to "0".
Each flag should be set as the setup procedure in order. Activation of communication should
be operated after all control registers (except Table 11-2-1 : TXBUF0, RXBUF0) are set.
Only timer 3 can be used as a baud rate timer.
Refer to Chapter 6. 8-bit Timer for baud rate setup.
[
Chapter 6. 8-bit Timer ]
When timer output is selected as serial interface transfer clock, select fosc as a clock source
of the timer. If other clock is selected, normal transfer of serial interface data is not guaran-
teed.