English
Language : 

AT89C5132_07 Datasheet, PDF (128/182 Pages) ATMEL Corporation – USB Microcontroller with 64K Bytes Flash Memory
Figure 19-11. Slave SPI Polling Policy Flows
SPI Initialization
Polling Policy
Disable interrupt
SPIE = 0
Select Slave Mode
MSTR = 0
Select Format
Program CPOL & CPHA
Enable SPI
SPEN = 1
Prepare Transfer
write data in SPDAT
SPI Transfer
Polling Policy
Data Received?
SPIF = 1?
Get Data Received
Read SPDAT
Prepare Next Transfer
Write Data in SPDAT
19.3.7
Slave Mode with Interrupt Policy
Figure 19-10 shows the initialization phase and the transfer phase flows using the interrupt
policy.
The transfer format depends on the master controller.
Reading SPSTA at the beginning of the ISR is mandatory for clearing the SPIF flag. Clear is
effective when reading SPDAT.
128 AT89C5132
4173E–USB–09/07