Rainbow-electronics AT89C5131 Bedienungsanleitung Seite 110

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 175
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 109
110
AT89C5131
4136AUSB03/03
Figure 48. SPI Interrupt Requests Generation
Registers There are three registers in the module that provide control, status and data storage
functions. These registers are describes in the following paragraphs.
Serial Peripheral Control
Register (SPCON)
The Serial Peripheral Control Register does the following:
Selects one of the Master clock rates
Configure the SPI module as Master or Slave
Selects serial clock polarity and phase
Enables the SPI module
Frees the SS pin for a general-purpose
Table 78 describes this register and explains the use of each bit.
SSDIS
MODF
CPU Interrupt Request
SPI Receiver/Error
CPU Interrupt Request
SPI Transmitter
SPI
CPU Interrupt Request
SPIF
Table 78. SPCON Register
SPCON - Serial Peripheral Control Register (0C3H)
76543210
SPR2 SPEN SSDIS MSTR CPOL CPHA SPR1 SPR0
Bit
Number Bit Mnemonic Description
7SPR2
Serial Peripheral Rate 2
Bit with SPR1 and SPR0 define the clock rate.
6 SPEN
Serial Peripheral Enable
Cleared to disable the SPI interface.
Set to enable the SPI interface.
5SSDIS
SS
Disable
Cleared to enable SS
in both Master and Slave modes.
Set to disable SS
in both Master and Slave modes. In Slave mode, this bit has
no effect if CPHA = 0.
5MSTR
Serial Peripheral Master
Cleared to configure the SPI as a Slave.
Set to configure the SPI as a Master.
4CPOL
Clock Polarity
Cleared to have the SCK set to 0 in idle state.
Set to have the SCK set to 1 in idle low.
3CPHA
Clock Phase
Cleared to have the data sampled when the SCK leaves the idle state (see
CPOL).
Set to have the data sampled when the SCK returns to idle state (see CPOL).
Seitenansicht 109
1 2 ... 105 106 107 108 109 110 111 112 113 114 115 ... 174 175

Kommentare zu diesen Handbüchern

Keine Kommentare