Presentation is loading. Please wait.

Presentation is loading. Please wait.

SERIAL PERIPHERAL INTERFACE

Similar presentations


Presentation on theme: "SERIAL PERIPHERAL INTERFACE"— Presentation transcript:

1 SERIAL PERIPHERAL INTERFACE
Made by: Bharat Mundhara ( ) Abhishek Chaudhary ( ) Vishwa Daiya ( ) Guided by: Prof. Nilesh Desai Subject: Microcontroller & Interfacing ( )

2 What is SPI? Shorthand for “Serial Peripheral Interface”.
Serial communication protocol. Allows transfer of information, 8 bits at a time, between uC and any number of peripherals. Read and Write operations happen simultaneously. Using chip selects allows lots of peripherals to be connected to a single SPI bus at the same time.

3 Continued… High data rates: 250Kbps to 2Mbps.
Meant for short distances “inside the box”. Low complexity. Low cost. Has no start/stop bit overhead.  The device or devices that controls the operation inside the network is known as the Master. Other devices connected are called slave(s).

4 SPI Bus Configuration

5 SPI Registers SPCR – SPI Control Register – This register is basically the master register i.e. contains the bits to initialize SPI and control it. SPSR – SPI Status Register – This is the status register. Used to read the status of the bus lines. SPDR – SPI Data Register – The SPI Data Register is the read/write register where the actual data transfer takes place.

6 SPCR (Control register)
SPIE – SPI Interrupt Enable SPE – SPI Enable DORD – Data Order MSTR – Master/Slave Select CPOL – Clock Polarity CPHA – Clock Phase SPR1, SPR0 – SPI Clock Rate Select

7 SPSR (Status register)
SPIF – SPI Interrupt Flag WCOL – Write Collision Flag Bit 5:1 - These are reserved bits. SPI2x – SPI Double Speed Mode

8 SPDR (Data register) Register from where we read the incoming data, and write the data to which we want to transmit. When DORD is set to 1, then LSB, i.e. the 0th bit of the SPDR is transmitted first, and vice versa.

9 ADVANTAGES For point-to-point, SPI is simple and efficient
Less overhead than I2C due to lack of addressing. SPI is full duplex. Compatible with thousands of chips with Microwire, I2S, and other serial interfaces. Less power consumption as compared to I2C.

10 APPLICATIONS Used in EEPROM, Flash and real time clocks.
Better suited for “data streams”, i.e. ADC converters like sending MP3 data to MP3 decoders. Full duplex capability, i.e. communication between a codec and digital signal processor Inter-Processor Network. Interfacing to serial graphic LCDs.

11 THANK YOU.!


Download ppt "SERIAL PERIPHERAL INTERFACE"

Similar presentations


Ads by Google