English
Language : 

AT89LP2052_06 Datasheet, PDF (40/90 Pages) ATMEL Corporation – 8-bit Microcontroller with 2/4-Kbyte Flash
(SCK), and Slave Select (SS). The SCK pin is the clock output in master mode, but is the clock
input in slave mode. The MSTR bit in SPCR determines the directions of MISO and MOSI. Also
notice that MOSI connects to MOSI and MISO to MISO. In master mode, SS/P1.4 is ignored and
may be used as a general-purpose input or output. In slave mode, SS must be driven low to
select an individual device as a slave. When SS is driven high, the slave’s SPI port is deacti-
vated and the MOSI/P1.5 pin can be used as a general-purpose input.
Figure 18-1. SPI Master-Slave Interconnection
MSB Master
LSB
8-Bit Shift Register
MISO MISO
MOSI MOSI
MSB Slave LSB
8-Bit Shift Register
SPI
Clock Generator
SCK SCK
SS
SS
VCC
Figure 18-2. SPI Block Diagram
Oscillator
Divider
÷4÷8÷32÷64
S
M
M
MSB
LSB
8-bit Shift Register
S
Read Data Buffer
Write Data Buffer
Select
SPI Clock (Mater)
Clock
Clock
S
Logic
M
MISO
P1.6
MOSI
P1.5
SCK
1.7
SS
P1.4
SPI Control
SPI Status Register
MSTR
SPE
8
SPI Control Register
8
8
SPI Interrupt Internal
Request Data Bus
40 AT89LP2052/LP4052
3547F–MICRO–6/06