
V PERIPHERAL MODULES 3 (INTERFACE): GENERAL-PURPOSE SERIAL INTERFACE (EFSIO)
S1C33E07 TECHNICAL MANUAL
EPSON
V-1-11
V
EFSIO
The serial interface starts transmitting when data is written to the transmit data register. The transfer status can
be checked using the transmit-completion flag TENDx (D5/0x300Bx2). This flag goes 1 when data is being
transmitted and goes 0 when the transmission has completed.
TENDx: Serial I/F Ch.x Transmit-Completion Flag in the Serial I/F Ch.x Status Register (D5/0x300Bx2)
When data is transmitted successively in clock-synchronized master mode, TENDx (D5/0x300Bx2) maintains 1
until all data is transmitted (Figure V.1.3.3.1). In slave mode, TENDx (D5/0x300Bx2) goes 0 every time 1-byte
data is transmitted (Figure V.1.3.3.2).
When all the data in the transmit data buffer are transferred, a cause of the transmit-data empty interrupt occurs.
Since an interrupt can be generated as set by the interrupt controller, the next piece of transmit data can be writ-
ten using an interrupt processing routine. In addition, since this cause of interrupt can be used to invoke DMA,
the data prepared in memory can be transmitted successively to the transmit-data register through DMA trans-
fers.
For details on how to control interrupts and DMA requests, refer to Section V.1.7, “Serial Interface Interrupts
and DMA.”
Following explains transmit operation in both the master and slave modes.
Clock-synchronized master mode
The timing at which the device starts transmitting in the master mode is as follows:
When #SRDYx is on a low level while the transmit-data buffer contains data written to it or
when data has been written to the transmit-data buffer while #SRDYx is on a low level.
Figure V.1.3.3.1 shows a transmit timing chart in the clock-synchronized master mode.
A
B
Slave device receives the LSB.
Slave device receives the MSB.
C
D
First data is written. (2 bytes)
Next data is written. (2 bytes)
Transmit-buffer empty
interrupt request
Transmit-buffer empty
interrupt request
#SCLKx
#SRDYx
SOUTx
TDBEx
TENDx
A
B
D0 D1 D2 D3 D4 D5 D6 D7 D0 D1 D2 D3 D4 D5 D6 D7 D0 D1 D2 D3 D4 D5 D6 D7 D0
D6 D7
B
A
B
A
B
C
D
Figure V.1.3.3.1 Transmit Timing Chart in Clock-Synchronized Master Mode
1. If the #SRDYx signal from the slave is on a high level, the master waits until it is on a low level (ready to
receive).
2. If #SRDYx is on a low level, the synchronizing clock input to the serial interface begins. The synchronizing
clock is also output from the #SCLKx pin to the slave device.
3. The content of the data buffer is transferred to the shift register synchronously with the first falling edge of
the clock. At the same time, the LSB of the data transferred to the shift register is output from the SOUTx
pin. If the transmit data buffer becomes empty at this point, a transmit-buffer empty interrupt request oc-
curs.
4. The data in the shift register is shifted 1 bit by the next falling edge of the clock, and the bit following the
LSB is output from SOUTx. This operation is repeated until all 8 bits of data are transmitted.
The slave device takes in each bit synchronously with the rising edges of the synchronizing clock.
5. The next data transfer begins if the transmit data buffer contains other data.