V PERIPHERAL MODULES 3 (INTERFACE): GENERAL-PURPOSE SERIAL INTERFACE (EFSIO)
V-1-10
EPSON
S1C33E07 TECHNICAL MANUAL
Setting the receive FIFO level (advanced mode)
This serial interface incorporates a 4-byte receive FIFO allowing up to 4 bytes of data that can be received with-
out an error even when the receive data register is not read. This serial interface can generate a receive-buffer
full interrupt when the specified number of data are received in the receive FIFO. Use FIFOINTx[1:0] (D[6:5]/
0x300Bx4) to set this number of data. Writing 0–3 to FIFOINTx[1:0] (D[6:5]/0x300Bx4) sets the number of
data to 1–4. The default setting at initial reset is 0 so that a receive-buffer full interrupt will generate when one
data is received.
FIFOINTx[1:0]: Serial I/F Ch.x Receive Buffer Full Interrupt Timing Select Bits in the Serial I/F Ch.x IrDA
Register (D[6:5]/0x300Bx4)
V.1.3.3 Control and Operation of Clock-Synchronized Transfer
Transmit control
(1) Enabling transmit operation
Use the transmit-enable bit TXENx (D7/0x300Bx3) for transmit control.
When transmit is enabled by writing 1 to this bit, the clock input to the shift register is enabled (ready for in-
put), thus allowing for data to be transmitted. The synchronizing clock input/output of the #SCLKx pin is also
enabled (ready for input/output).
Transmit is disabled and the transmit data buffer (FIFO) is cleared by writing 0 to TXENx (D7/0x300Bx3).
TXENx: Serial I/F Ch.x Transmit Enable Bit in the Serial I/F Ch.x Control Register (D7/0x300Bx3)
After the port function select register is set for the serial input/output, the I/O direction of the #SRDYx and
#SCLKx pins are changed at follows:
#SRDYx: When slave mode is set, a switch is made to output mode.
Otherwise, input mode is maintained.
#SCLKx: When master mode is set, a switch is made to output mode.
Otherwise, input mode is maintained.
Note: In clock-synchronized transfers, the clock line is shared between the transmit and receive units,
so the communication mode is half-duplex. Therefore, TXENx (D7/0x300Bx3) and receive-enable
bit RXENx (D6/0x300Bx3) cannot be enabled simultaneously. When transmitting data, fix RXENx
(D6/0x300Bx3) at 0 and do not change it during a transmit operation.
In addition, make sure TXENx (D7/0x300Bx3) is not set to 0 during a transmit operation.
RXENx: Serial I/F Ch.x Receive Enable Bit in the Serial I/F Ch.x Control Register (D6/0x300Bx3)
(2) Transmit procedure
The serial interface contains a transmit shift register and a transmit data register, which are provided indepen-
dently of those used for a receive operation.
Transmit data is written to TXDx[7:0] (D[7:0]/0x300Bx0). The data written to TXDx[7:0] (D[7:0]/0x300Bx0)
enters the transmit data buffer and waits for transmission.
TXDx[7:0]: Serial I/F Ch.x Transmit Data Bits in the Serial I/F Ch.x Transmit Data Register (D[7:0]/0x300Bx0)
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)