XI - 29
Chapter 11
Serial Interface 0
Operation
(15) Enable the interrupt.
SC0TICR (x'3FF6')
bp1
: SC0TIE
= 1
(16) Start serial transmission.
Transmission data
→TXBUF0 (x'3F95')
Received data
→input to SBI pin.
(15) Set the SC0TIE flag of the SC0TICR register to
"1" to enable interrupts.
If any interrupt request flag (SC0TIR of the
SC0TICR register) is already set, clear SC0TIR
before an interrupt is enabled.
(16) Set the transmission data to the serial
transmission data buffer TXBUF0. Then, an
internal clock is generated to start transmission /
reception. After the transmission is finished,
serial0 transmission interrupt SC0TIRQ is
generated.
Note : Each procedure (5) to (8), (9) to (11), and (11) to (13) can be set at the same time.
[
Chapter 3 3-1-4. Interrupt Flag Setup ]
When only reception with 3
channels are operated, set SC0SBOS of the SC0MD1 register
to "0" and select a port. The SBO pin can be used as a general port.
When SBO / SBI pin are connected for communication with 2 lines, the SBO pin inputs /
outputs serial data. The port direction control register P0DIR switches I/O. At reception, set
SC0SBIS of the SC0MD1 register to "1", always, to select "serial data input". The SBI pin can
be used as a general port.
This serial interface contains a emergency reset function. If the communication should be
stopped by force, set SC0SBOS and SC0SBIS of the SC0MD1 register to "0".
Each flag should be set as this setup procedure in order. Activation of communication should
be operated after all control registers (except Table 11-2-1 : TXBUF0, RXBUF0) are set.
Transfer rate of transfer clock set by SC0CKS register should be under 2.5 MHz.
Setup Procedure
Description
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.