1 Serial Peripheral Interface What is it? Basic SPI Capabilities Protocol Pros and Cons Uses Serial Peripheral Interface

Slides:



Advertisements
Similar presentations
Bus Specification Embedded Systems Design and Implementation Witawas Srisa-an.
Advertisements

Anurag Dwivedi Rudra Pratap Suman. Scope of Communica tion Telephones and Cell Phones.
LOGO Lab Supervisor – Dr. WH Lau EE3271 Design Laboratory.
ECE 371 Unit 13 - Part 1 Serial Peripheral Interface (SPI)
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
Serial Buses. Serial Bus Features Allows several devices to be connected to a set of common signal wires Reduces inter-connections and complexity Asynchronous.
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Guest Lecturer Pat Pannuto Lecture 10: Serial buses Oct 6, 2011.
Serial Interfaces, Part Deux -I 2 C and SPI December 4, 2002 Presented by Eugene Ho.
SPI Serial Peripheral Interface. SPI Serial Peripheral Interface is communication between two devices, one bit at a time sequential one bit at time over.
Lecture 8: Serial Interfaces
Football Helmet Acceleration By: Richard Pape And Larkin Heintzman Instructor: Doug Harper.
1 EECS 373 Design of Microprocessor-Based Systems Mark Brehob University of Michigan Serial buses, digital design Material taken from Dutta, Le, Ramadas,
EECS 373 Design of Microprocessor-Based Systems Prabal Dutta
Serial Communication Buses: I 2 C and SPI By Brody Dunn.
Starting with serial Chapter Ten 10.1, 10.2,
I/O Channels I/O devices getting more sophisticated e.g. 3D graphics cards CPU instructs I/O controller to do transfer I/O controller does entire transfer.
Serial Peripheral Interface (SPI)
SPISPI Term Dr Abdelhafid Bouhraoua Term Dr Abdelhafid Bouhraoua.
EECS 373 Design of Microprocessor-Based Systems Mark Brehob
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 13.
Haptic Belt team Informational Presentation.  I 2 C is a form of control bus (multi-master) which allows communication between multiple integrated circuits.
SPI Compatible Devices Design and implementation details on the way to a valid SPI-LCD interface driver.
Interfaces A practical approach. Lesson 2 I2C and SPI
SPI By Alexander Maroudis. Outline What is SPI? SPI Configuration SPI Operation Master Slave Setup SPI Transactions SPI Digital Potentiometer Example.
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 10: Serial buses Oct 6, 2011.
Lecture 12 Today’s topics –CPU basics Registers ALU Control Unit –The bus –Clocks –Input/output subsystem 1.
Computer Architecture Lecture 08 Fasih ur Rehman.
Serial Peripheral Interface (SPI) Bus. SPI Bus There is no official specification for the SPI bus. It is necessary to consult the data sheets of the devices.
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
4.0 rtos implementation part II
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK–
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
CPU BASICS, THE BUS, CLOCKS, I/O SUBSYSTEM Philip Chan.
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
7/23 Inter-chip Serial Communication: SPI and I 2 C Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee.
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
ECE 353 Introduction to Microprocessor Systems Michael Schulte Week 13.
Embedded System Design Laboratory October 4, 2002Stanford University - EE281 Lecture #3#1 Lecture #3 Outline Announcements AVR Processor Resources –UART.
Network and Systems Laboratory nslab.ee.ntu.edu.tw se.
EECS 373 Design of Microprocessor-Based Systems Prabal Dutta
OCRP RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
©2008 R. Gupta, UCSD COSMOS Summer 2008 Peripheral Interfaces Rajesh K. Gupta Computer Science and Engineering University of California, San Diego.
GBT SCA overview Slide 1-5 Work status Slide 6-10 Shuaib Ahmad Khan.
OCRP RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
Essentials of Communication This simple model requires many guarantees. Sender Receiver Communication Link Data.
Revised: Aug 1, ECE263 Embedded System Design Lessons 27, 28 Serial Peripheral Interface.
Department of Electronic & Electrical Engineering Serial interfaces Serial Interfaces allow communication between devices sending one bit at a time. In.
Serial Peripheral Interface SPI I2C (i-squared cee)
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
1 EECS 373 Design of Microprocessor-Based Systems Mark Brehob University of Michigan Serial buses, digital design Material taken from Dutta, Le, Ramadas,
Communicating. The ATmega16 communicates through one of the following ways: Serial Peripheral Interface (SPI) Universal Synchronous and Asynchronous serial.
Embedded Communication Protocols Don Heer 10/18/10 1.
Networked Embedded Systems Sachin Katti & Pengyu Zhang EE107 Spring 2016 Lecture 9 Serial Buses – SPI, I2C.
BIRLA VISHVAKARMA MAHAVIDYALAY SUBJECT: SPI PROTOCOL & MAX7221 DISPLAY INTERFACING SUBMITTED BY: KISHAN AVASTHI( ) MANSI CHANDEGARA( )
میکرو کنترلرهای AVR Serial Interfaces, I2C and SPI
MICROCONTROLLER AND INTERFACING Presented by: Shefali Jethva ( ) Shivali Panchal ( ) Komal Soni ( ) Roll no. :- 14EC308.
©F.M. Rietti Communication Lines Fundamentals. ©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 2 Communication Lines Generally used to connect.
Serial Communication Originally created by Anurag Dwidedi and Rudra Pratap Suman.
Serial Communication Buses: I2C and SPI
EE 107 Fall 2017 Lecture 5 Serial Buses – UART & SPI
SERIAL PERIPHERAL INTERFACE
BJ Furman ME 106 Fundamentals of Mechatronics 15NOV2012
EEPROM Comparison – Parallel or Serial
EECS 373 Design of Microprocessor-Based Systems Mark Brehob
Преглед Начин функционисања Имплементације
SPI Protocol Sepehr Naimi
Serial Peripheral Interface Bus
Presentation transcript:

1 Serial Peripheral Interface What is it? Basic SPI Capabilities Protocol Pros and Cons Uses Serial Peripheral Interface SPI_single_slave.svg/350px-SPI_single_slave.svg.png

2 What is SPI? Serial bus protocol Fast, easy to use, and simple Very widely used Not “standardized”

3 SPI Basics A 4-wire communications bus Typically communicate across short distances Supports Single master Multiple slaves Synchronized Communications are “clocked”

4 SPI Capabilities Always full-duplex Communicates in both directions simultaneously Transmitted (or received) data may not be meaningful Multiple Mbps transmission speeds 0-50 MHz clock speeds not uncommon Transfer data in 4 to 16 bit characters Supports multiple slaves

5 SPI bus wiring Bus wires Master-Out, Slave-In (MOSI) Master-In, Slave-Out (MISO) System Clock (SCLK) Slave Select/Chip Select (SS1#, …, SS#n or CS1, …, CSn) Master asserts slave/chip select line Master generates clock signal Shift registers shift data in and out

6 SPI signal functions MOSI – carries data out of master to slave MISO – carries data out of slave to master Both MOSI and MISO are active during every transmission SS# (or CS) – unique line to select each slave chip SCLK – produced by master to synchronize transfers

7 SPI uses a “shift register” model of communications Master shifts out data to Slave, and shifts in data from Slave

8 Two bus configuration models Master and multiple independent slaves ves.svg/350px-SPI_three_slaves.svg.png Master and multiple daisy- chained slaves Some wires have been renamed

9 SPI clocking: there is no “standard way” Four clocking “modes” Two phases Two polarities Master and selected slave must be in the same mode During transfers with slaves A and B, Master must Configure clock to Slave A’s clock mode Select Slave A Do transfer Deselect Slave A Configure clock to Slave B’s clock mode Select Slave B Do transfer Deselect Slave B Master reconfigures clock mode on-the-fly!

10 SPI timing diagram Timing Diagram – Showing Clock polarities and phases

11 SPI example: decode what’s happening

12 SPI summary SPI – a 4-wire serial bus (but not official “standard”) MOSI, MISO, SS/CS, and SCLK signals Full-duplex operation One master Multiple slaves Best for point-to-point data transfers Easily supported Broadly used

13 SPI bus architecture Shared bus SCK MOSI MISO Chip selects

14 SPI tradeoffs: the pros and cons Pros Fast for point-to-point connections Easily allows streaming/constant data inflow No addressing in protocol, so it’s simple to implement Broadly supported Cons Slave select/chip select makes multiple slaves more complex No acknowledgement (can’t tell if clocking in garbage) No inherent arbitration No flow control (must know slave speed)

15 Peripherals LCDs Sensors Radios Lots of other chips Microcontrollers Almost all MCUs have SPI masters Some have SPI slaves

16 Questions? Comments? Discussion?