CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Serial Interface)

Data receive procedure

The control procedure and operation during receiving is as follows.

(1) Write "0" in the receive enable register RXEN and

 

 

Data

 

receiving

 

 

transmit enable register TXEN to reset the serial

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

interface.

 

 

 

 

 

 

 

 

 

 

(2) Write "1" in the receive enable register RXEN to set

 

 

RXEN

0, TXEN 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

into the receiving enable status.

 

 

 

 

 

 

 

 

 

 

 

 

RXEN

1

 

 

 

 

 

 

 

 

 

 

 

 

 

(3) In case of the master mode, confirm the transmit ready

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No

 

status on the slave side (external serial input/output

 

 

Transmitter

 

ready ?

 

 

 

 

 

 

 

 

device), if necessary. Wait until it reaches the transmit

 

 

 

 

 

 

In case of master mode

ready status.

 

 

 

 

 

Yes

 

 

 

 

RXTRG

1

 

 

 

 

 

 

 

 

 

 

 

 

 

(4) Write "1" in the receive control bit RXTRG and start

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

receiving.

 

 

ISRC

 

= 1 ?

 

No

 

In the master mode, this control causes the synchro-

 

 

 

 

 

 

 

 

 

 

 

Yes

 

 

nous clock to change to enable and is provided to the

 

 

 

 

 

 

 

 

 

Received data reading

 

 

 

 

 

 

 

 

 

 

 

shift register for receiving and output from the SCLK

 

 

 

 

 

 

from TRXD0–TRXD7

 

 

terminal.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

In the slave mode, it waits for the synchronous clock

 

No

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

to be input from the SCLK terminal. The received data

 

 

 

 

 

 

 

 

 

 

Receiving

 

complete ?

 

 

 

 

 

 

 

input from the SIN terminal is successively incorpo-

 

 

 

 

 

Yes

 

 

rated into the shift register in synchronization with the

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RXEN

0

 

 

 

rising edge of the synchronous clock.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

At the point where the data of the 8th bit has been

 

 

 

End

 

 

 

 

incorporated at the final (8th) rising edge of the

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

synchronous clock, the content of the shift register is

Fig. 4.11.6.3

Receiving procedure in clock

 

 

 

 

 

sent to the receive data buffer and the receiving

synchronous mode

complete interrupt factor flag ISRC is set to "1". When interrupt has been enabled, a receiving complete interrupt is generated at this point.

(5)Read the received data from TRXD0–TRXD7 using receiving complete interrupt.

(6)Repeat steps (3) to (5) for the number of bytes of receiving data, and then set the receive disable status by writing "0" to the receive enable register RXEN, when the receiving is completed.

84

EPSON

S1C63558 TECHNICAL MANUAL