Epson S1C17W12 Technical Manual page 147

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

Data receiving procedure
1. Wait for a receive buffer full interrupt (SPInINTF.RBFIF bit = 1).
2. Read the received data from the SPInRXD register.
3. Repeat Steps 1 and 2 until the end of data reception.
Data transfer operations
The following shows the slave mode operations different from master mode:
• Slave mode operates with the SPI clock supplied from the external SPI master to the SPICLKn pin.
The data transfer rate is determined by the SPICLKn frequency. It is not necessary to control the 16-bit timer.
• SPIA can operate as a slave device only when the slave select signal input from the external SPI master to the
#SPISSn pin is set to the active (low) level.
If #SPISSn = high, the software transfer control, the SPICLKn pin input, and the SDIn pin input are all inef-
fective. If the #SPISSn signal goes high during data transfer, the transfer bit counter is cleared and data in the
shift register is discarded.
• Slave mode starts data transfer when SPICLKn is input from the external SPI master after the #SPISSn signal
is asserted. Writing transmit data is not a trigger to start data transfer. Therefore, it is not necessary to write
dummy data to the transmit data buffer when performing data reception only.
• Data transmission/reception can be performed even in SLEEP mode, it makes it possible to wake the CPU up
using an SPIA interrupt.
Other operations are the same as master mode.
Notes: • If data of the number of bits specified by the SPInMOD.CHLN[3:0] bits is received when the
SPInINTF.RBFIF bit is set to 1, the SPInRXD register is overwritten with the newly received
data and the previously received data is lost. In this case, the SPInINTF.OEIF bit is set.
• When the clock for the first bit is input from the SPICLKn pin, SPIA starts sending the data
currently stored in the shift register even if the SPInINTF.TBEIF bit is set to 1.
#SPISSn
SPICLKn
SDOn
SDIn
SPInINTF.TBEIF
SPInINTF.RBFIF
Software operations
Figure 13.5.5.1 Example of Data Transfer Operations in Slave Mode (SPInMOD.CHLN[3:0] bits = 0x7)
S1C17W12/W13 TECHNICAL MANUAL
(Rev. 1.2)
1 2 3
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
Data (W) → SPInTXD
Data (W) → SPInTXD
Seiko Epson Corporation
13 SYNCHRONOUS SERIAL INTERFACE (SPIA)
1 2 3 4 5 6 7 8
Data (W) → SPInTXD
SPInRXD → Data (R)
SPInRXD → Data (R)
13-9

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c17w13

Table of Contents