Rainbow-electronics AT89C51SND1C Manual de usuario Pagina 155

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 210
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 154
155
AT8xC51SND1C
4109E805106/03
Slave Mode with Interrupt
Policy
Figure 120 shows the initialization phase and the transfer phase flows using the
interrupt.
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.
Figure 122. Slave SPI Interrupt Policy Flows
SPI Initialization
Interrupt Policy
Enable interrupt
ESPI =1
SPI Interrupt
Service Routine
Select Slave Mode
MSTR = 0
Select Format
program CPOL & CPHA
Enable SPI
SPEN = 1
Get Status
Read SPSTA
Prepare New Transfer
write data in SPDAT
Get Data Received
read SPDAT
Prepare Transfer
write data in SPDAT
Vista de pagina 154
1 2 ... 150 151 152 153 154 155 156 157 158 159 160 ... 209 210

Comentarios a estos manuales

Sin comentarios