Sie sind auf Seite 1von 13

A seminar

on

Serial peripheral
interface(SPI)

Contents
Introduction
Structure of SPI
Features
Disadvantages and disadvantages
Application
Conclusion
reference

Introduction
SPI :
It is a single master multi slave system
It is was introduced by motrola
SPI = Simple, 4 wire, full duplex, synchronous
serial data transfer Interfaces to many devices.

SPI

features' of SPI
4 interface pins are: MOSI master out slave in:
It is signal line carrying the data from master to
Slave device.
MISO master in slave out :
It is signal line carrying data from slave to master
device.
SCK serial clock :
It is signal line carrying the clock signals
SS slave select :
It is signal line for slave device select. It is an active
low signal.

Registers:
SPCR control register :
It holds the various configuration parameters like
master/slave selection for the device, baud rate
selection for communication, clock signal control.
SPSR status register :
It holds the status of various conditions for
transmission and reception.
SPDR data register/shift register :
It is used for data to transmit or receive. The size of it
depends on size of device. normally it is multiple of 8

Advantages
fasterthanIC
Complete protocol flexibility for the bits
transferred
Not limited to 8-bit words
Arbitrary choice of message size,
content, and purpose
Extremely simple hardware interface
Typically lower power requirements thanIC
due to less circuitry
No arbitration or associated failure modes
Slaves use the master's clock, and do not
need precision oscillators
Signals are unidirectional

Disadvantages
Requires more pins on SPI packages thanIC
No hardwareflow control by the slave
No hardware slave acknowledgment
Supports only one master device
No error-checking protocol is defined
SPI does not supporthot swapping

Applications
SPI is used to talk to a variety of peripherals,
such as
Sensors: temperature, pressure,ADC, touch
screens, video game controllers
Control devices: digital potentiometers,DAC
Camera lenses
Communications:Ethernet,USB,USART,
CAN,handheld video games
Memory:flashandEEPROM
Real-time clocks
LCD, sometimes even for managing image
data

Difference between I2C and SPI


protocol

I2C

SPI

invented

Philips

Motorola

Data rate

It support speed
of 100kbps to
3.4Mbps

It support speed
of 3Mbps to
10Mbps

Master

I2C is a multi
master address
based
communication

SPI is single
master with slave
based
communication

Pins

I2C needs 2 pins

SPI needs 4 pins

supports

I2C support 127


devices

Limited by
available chip
selects

Conclusion

SPI is an synchronous bi directional full duplex four


wire serial interface bus
it is a single master multi slave system with 3 regist
it is most suitable for applications requiring transfer o
Data in streams.
It is more faster then I2C

References
Jump up^
"What is Serial Synchronous Interface (SSI)?".
Retrieved2015-01-28.
Jump up^
Maxim-IC application note 3947: "Daisy-Chaini
ng SPI Devices
".
Jump up^AVR910 - In-system programming
Jump up^IEEE 1149.1-2013
Jump up^SPI Adapterwith support of
custom serial protocols, Byte Paradigm.
Jump up^"N5391B".
Jump up^
Queued Serial Module Reference Manual,
Semiconductor

Das könnte Ihnen auch gefallen