DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

AT89S852-12PC View Datasheet(PDF) - Atmel Corporation

Part Name
Description
Manufacturer
AT89S852-12PC
Atmel
Atmel Corporation Atmel
AT89S852-12PC Datasheet PDF : 32 Pages
1 2 3 4 5 6 7 8 9 10 Next Last
Table 4. SPCR—SPI Control Register
SPCR Address = D5H
Reset Value = 0000 01XXB
SPIE
Bit 7
SPE
6
DORD
5
MSTR
4
CPOL
3
CPHA
2
SPR1
1
SPR0
0
Symbol
SPIE
SPE
DORD
MSTR
CPOL
CPHA
SPR0
SPR1
Function
SPI Interrupt Enable. This bit, in conjunction with the ES bit in the IE register, enables SPI
interrupts: SPIE = 1 and ES = 1 enable SPI interrupts. SPIE = 0 disables SPI interrupts.
SPI Enable. SPI = 1 enables the SPI channel and connects SS, MOSI, MISO and SCK to pins P1.4,
P1.5, P1.6, and P1.7. SPI = 0 disables the SPI channel.
Data Order. DORD = 1 selects LSB first data transmission. DORD = 0 selects MSB first data
transmission.
Master/Slave Select. MSTR = 1 selects Master SPI mode. MSTR = 0 selects Slave SPI mode.
Clock Polarity. When CPOL = 1, SCK is high when idle. When CPOL = 0, SCK of the master device
is low when not transmitting. Please refer to figure on SPI Clock Phase and Polarity Control.
Clock Phase. The CPHA bit together with the CPOL bit controls the clock and data relationship
between master and slave. Please refer to figure on SPI Clock Phase and Polarity Control.
SPI Clock Rate Select. These two bits control the SCK rate of the device configured as master.
SPR1 and SPR0 have no effect on the slave. The relationship between SCK and the oscillator
frequency, Fosc., is as follows:
SPR1
0
0
1
1
SPR0
0
1
0
1
SCK = Fosc. divided by
4
16
64
128
Table 5. SPSR—SPI Status Register
SPCR Address = AAH
Reset Value = 0000 0000B
SPIF
WCOL —
Bit 7
6
5
4
3
2
1
0
Symbol
SPIF
WCOL
Function
SPI Interrupt Flag. When a serial transfer is complete, the SPIF bit is set and an interrupt is
generated if SPIE = 1 and ES = 1. The SPIF bit is cleared by reading the SPI status register with
SPIF and WCOL bits set, and then accessing the SPI data register.
Write Collision Flag. The WCOL bit is set if the SPI data register is written during a data transfer.
During data transfer, the result of reading the SPDR register may be incorrect, and writing to it
has no effect. The WCOL bit (and the SPIF bit) are cleared by reading the SPI status register with
SPIF and WCOL set, and then accessing the SPI data register.
8
AT89S8252

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]