at89c51re2-slsem ATMEL Corporation, at89c51re2-slsem Datasheet - Page 140

no-image

at89c51re2-slsem

Manufacturer Part Number
at89c51re2-slsem
Description
At89c51re2 8-bit Flash Microcontroller
Manufacturer
ATMEL Corporation
Datasheet
Registers
Serial Peripheral Control
Register (SPCON)
7663B–8051–03/07
Figure 42. SPI Interrupt Requests Generation
Three registers in the SPI module provide control, status and data storage functions.
These registers are describe in the following paragraphs.
Table 94 describes this register and explains the use of each bit
Table 94. SPCON Register
SPCON - Serial Peripheral Control Register (0D4H)
Bit Number
SPR2
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
7
7
6
5
4
SPEN
6
Bit Mnemonic
MODFIE
SPTEIE
MODF
SPTE
SPIF
SSDIS
MSTR
SPEN
SPR2
SSDIS
5
Description
Serial Peripheral Rate 2
Bit with SPR1 and SPR0 define the clock rate (See bits SPR1 and
SPR0 for detail).
Serial Peripheral Enable
Cleared to disable the SPI interface (internal reset of the SPI).
Set to enable the SPI interface.
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’. When SSDIS is set, no MODF
interrupt request is generated
Serial Peripheral Master
Cleared to configure the SPI as a Slave.
Set to configure the SPI as a Master.
MSTR
4
Table 3.
CPOL
3
.
CPHA
CPU Interrupt Request
2
SPI
SPR1
1
SPR0
0
123

Related parts for at89c51re2-slsem