Synchronous Serial Interface Slave (Spia_Slave) - Epson S1C31D01 Software Manual

Cmos 32-bit single chip microcontroller peripheral circuit sample software manual
Table of Contents

Advertisement

3.16 Synchronous Serial Interface Slave (SPIA_SLAVE)

SPIA module is a synchronous serial interface supporting both master and slave modes. Only one SPIA channel
is available in S1C31D01 microcontroller.
This example provides a description of how to use a SPIA channel in the slave mode to transfer data buffer.
Hardware Setup
1. Connect the evaluation boards where the SPIA master/slave sample programs are installed.
Connect each port as follows:
[master]
P32
SDIn------------<<-----------SDOn
P33
SDOn------------>>-----------SDIn
P34 SPICLKn------------>>-----------SPICLKn P34
P35
------------>>-----------#SPISSn P35
P36
------------>>-----------
J2.47
GND------------><-----------GND
2. Launch the slave example program first, then the master program
Operations
1. Initialize the SPIA module in slave mode as below:
- Data length is 8bit
- Data format is MSB first
2. Assign GPIO P36 as input to recognize Read/Write command from master.
3. Receive the 'BUF_SIZE' bytes of data from the master.
4. Send the 'BUF_SIZE' bytes of random data to the master.
Example of Output
Slave has no output.
S1C31D01 Peripheral Circuit
Sample Software Manual (Rev.3.00)
[slave]
P33
P32
P36
J2.47
Seiko Epson Corporation
51

Advertisement

Table of Contents
loading

Table of Contents