English
Language : 

AT89S8253_08 Datasheet, PDF (23/59 Pages) ATMEL Corporation – 8-bit Microcontroller with 12K Bytes Flash and 2K Bytes EEPROM
AT89S8253
2. fosc = oscillator frequency.
14. Serial Peripheral Interface
The serial peripheral interface (SPI) allows high-speed synchronous data transfer between the
AT89S8253 and peripheral devices or between multiple AT89S8253 devices. The AT89S8253
SPI features include the following:
• Full-Duplex, 3-Wire Synchronous Data Transfer
• Master or Slave Operation
• Maximum Bit Frequency = f/4 (f/2 if in x2 Clock Mode)
• LSB First or MSB First Data Transfer
• Four Programmable Bit Rates in Master Mode
• End of Transmission Interrupt Flag
• Write Collision Flag Protection
• Double-Buffered Receive
• Double-Buffered Transmit (Enhanced Mode only)
• Wakeup from Idle Mode (Slave Mode only)
The interconnection between master and slave CPUs with SPI is shown in Figure 14-1. The four
pins in the interface are Master-In/Slave-Out (MISO), Master-Out/Slave-In (MOSI), Shift Clock
(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 14-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
23
3286L–MICRO–8/08