Rainbow-electronics AT89C5132 Uživatelský manuál Strana 126

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 162
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 125
126
AT8xC5132
4173A805108/02
Slave Mode with Polling
Policy
Figure 103 shows the initialization phase and the transfer phase flows using the polling
policy.
The transfer format depends on the master controller.
SPIF flag is cleared when reading SPDAT (SPSTA has been read before by the end of
reception check).
This policy provides the fastest effective transmission and is well adapted when commu-
nicating at high speed with other Microcontrollers. However, the procedure may be
interrupted at any time by higher priority tasks.
Figure 103. Slave SPI Polling Policy Flows
SPI Initialization
Polling Policy
Disable interrupt
SPIE = 0
SPI Transfer
Polling Policy
Data Received?
SPIF = 1?
Select Slave Mode
MSTR = 0
Select Format
Program CPOL & CPHA
Enable SPI
SPEN = 1
Prepare Next Transfer
Write Data in SPDAT
Get Data Received
Read SPDAT
Prepare Transfer
write data in SPDAT
Zobrazit stránku 125
1 2 ... 121 122 123 124 125 126 127 128 129 130 131 ... 161 162

Komentáře k této Příručce

Žádné komentáře