beautypg.com

Renesas SH7781 User Manual

Page 1119

background image

21. Serial Communication Interface with FIFO (SCIF)

Rev.1.00 Jan. 10, 2008 Page 1089 of 1658

REJ09B0261-0100

In serial transmission, the SCIF operates as follows.

1. When data is written into SCFTDR, the SCIF transfers the data from SCFTDR to SCTSR and

starts transmitting. Confirm that the TDFE flag in SCFSR is set to 1 before writing transmit
data to SCFTDR. The number of data bytes that can be written is at least 64 (transmit trigger
setting count).

2. When data is transferred from SCFTDR to SCTSR and transmission is started, consecutive

transmit operations are performed until there is no transmit data left in SCFTDR. When the
number of transmit data bytes in SCFTDR falls to or below the transmit trigger count set in
SCFCR, the TDFE flag is set. If the TIE bit in SCSCR is set to 1 at this time, a transmit-FIFO-
data-empty interrupt (TXI) request is generated.

If clock output mode is selected, the SCIF outputs eight synchronization clock pulses for each
data.

When the external clock is selected, data is output in synchronization with the input clock.

The serial transmit data is sent from the SCIF_TXD pin in LSB-first order.

3. The SCIF checks the SCFTDR transmit data at the timing for sending the last bit. If data is

present, the data is transferred from SCFTDR to SCTSR, and then serial transmission of the
next frame is started. If there is no transmit data, the TEND flag in SCFSR is set to 1 after the
last bit is sent, and the transmit data pin (SCIF_TXD pin) retains the output state of the last bit.

4. After serial transmission ends, the SCIF_SCK pin is fixed high when the CKE1 bit in SCSCR

is 0.

Figure 21.18 shows an example of the SCIF transmission operation.

Bit 0

Bit 1

Bit 7

Bit 0

Bit 1

Bit 6

Bit 7

TXI interrupt
request

Data written to SCFTDR
and TDFE flag cleared to 0
by TXI interrupt handler

LSB

TDFE

TEND

MSB

TXI interrupt
request

Synchronization
clock
SCIF_SCK

Serial data
SCIF_TXD

One frame

Figure 21.18 Example of SCIF Transmission Operation