
V PERIPHERAL MODULES 3 (INTERFACE): GENERAL-PURPOSE SERIAL INTERFACE (EFSIO)
S1C33E07 TECHNICAL MANUAL
EPSON
V-1-21
V
EFSIO
The data written to TXDx[7:0] (D[7:0]/0x300Bx0) enters the transmit data buffer and waits for transmission.
The transmit data buffer is a 2-byte FIFO and up to two data can be written to it successively if empty. Older
data will be transmitted first and cleared after transmission. The next transmit data can be written to the trans-
mit data register, even during data transmission. The transmit data buffer status flag TDBEx (D1/0x300Bx2) is
provided to check whether this buffer is full or not. This flag is set to 1 when the transmit data buffer has a free
space for transmit data to be written and reset to 0 when the transmit data buffer becomes full by writing trans-
mit data.
TDBEx: Serial I/F Ch.x Transmit Data Buffer Empty Flag in the Serial I/F Ch.x Status Register (D1/0x300Bx2)
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 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.”
Figure V.1.4.3.1 shows a transmit timing chart in the asynchronous mode.
Example: Data length: 8 bits, Stop bit: 1 bit, Parity bit: Included
S1
S2
P
Start bit
Stop bit
Parity bit
A
B
First data is written. (2 bytes)
Next data is written. (2 bytes)
Transmit-buffer empty
interrupt request
Transmit-buffer empty
interrupt request
Sampling clock
SOUTx
TDBEx
TENDx
S1 D0 D1 D2 D3 D4 D5 D6 D7 P S2 S1 D0 D1
D7 P S2 S1 D0 D1
D7 P S2
A
B
Figure V.1.4.3.1 Transmit Timing Chart in Asynchronous Mode
1. The contents of the buffer are transferred to the shift register synchronously with the first falling edge of the
sampling clock. At the same time, the SOUTx pin is setting to a low level to send the start bit.
2. Each bit of data in the shift register is transmitted beginning with the LSB at each falling edge of the subse-
quent sampling clock. This operation is repeated until all 8 (or 7) bits of data are transmitted.
3. After sending the MSB, the parity bit (if EPRx = 1) and the stop bit are transmitted in succession.
EPRx: Serial I/F Ch.x Parity Enable Bit in the Serial I/F Ch.x Control Register (D5/0x300Bx3)
4. The next data transfer begins if the transmit data buffer contains other data.
(3) Terminating transmit operations
When data transmission is completed, write 0 to the transmit-enable bit TXENx (D7/0x300Bx3) to disable
transmit operations. This operation clears (initializes) the transmit data buffer (FIFO), therefore, make sure
that the transmit data buffer does not contain any data waiting for transmission before writing 0 to TXENx
(D7/0x300Bx3).