Figure 19-11. Slave SPI Polling Policy Flows
SPI Initialization
Polling Policy
SPI Transfer
Polling Policy
Disable interrupt
SPIE = 0
Data Received?
SPIF = 1?
Select Slave Mode
MSTR = 0
Get Data Received
Read SPDAT
Select Format
Program CPOL & CPHA
Prepare Next Transfer
Write Data in SPDAT
Enable SPI
SPEN = 1
Prepare 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