1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 10: Serial buses Oct 6, 2011.

Slides:



Advertisements
Similar presentations
Chapter 14 Communications Introduction
Advertisements

I2C bus Inter Integrated Circuits bus by Philips Semiconductors
INPUT-OUTPUT ORGANIZATION
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Guest Lecturer Pat Pannuto Lecture 10: Serial buses Oct 6, 2011.
Embedded Systems I2CI2C. Feature 3 wire GND SCL(clock) SDA(data) All devices share the same bus wire Using wire and, each device gain access to bus (become.
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
EECS 373 Design of Microprocessor-Based Systems Prabal Dutta
Serial Communication Buses: I 2 C and SPI By Brody Dunn.
SPISPI Term Dr Abdelhafid Bouhraoua Term Dr Abdelhafid Bouhraoua.
EECS 373 Design of Microprocessor-Based Systems Mark Brehob
I2CI2C CS-423 Dick Steflik. Inter-Integrated Circuit Developed and patented by Philips for connecting low speed peripherals to a motherboard, embedded.
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 13.
Lecture 27: LM3S9B96 Microcontroller – Inter- Integrated Circuit (I 2 C) Interface.
Haptic Belt team Informational Presentation.  I 2 C is a form of control bus (multi-master) which allows communication between multiple integrated circuits.
INPUT-OUTPUT ORGANIZATION
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.
Technology Training that Works Hands of Data Communications, Networking & TCP/IP Troubleshooting.
Microprocessor Block Diagram
1 © Unitec New Zealand I2C Lecture 10 Date: - 2 Nov, 2011 Embedded Hardware ETEC 6416.
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)
Transmission Modes Serial Transmission  One bit is transmitted on a circuit at a time  Usually there is one transmit circuit and one receive circuit.
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
Embedded Bus – i2c David E. Culler Lab 2 Feb 2, 2015
4.0 rtos implementation part II
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK–
©2008 R. Gupta, UCSD COSMOS Summer 2008 Peripheral Interfaces: I2C & USB Rajesh K. Gupta Computer Science and Engineering University of California, San.
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.
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
1 Synchronous Serial IO Send a separate clock line with data –SPI (serial peripheral interface) protocol –I 2 C (or I2C) protocol Encode a clock with data.
Network and Systems Laboratory nslab.ee.ntu.edu.tw se.
EECS 373 Design of Microprocessor-Based Systems Prabal Dutta
Refer to Chapter 15 in the reference book
©2008 R. Gupta, UCSD COSMOS Summer 2008 Peripheral Interfaces Rajesh K. Gupta Computer Science and Engineering University of California, San Diego.
EECS 373 Design of Microprocessor-Based Systems Prabal Dutta
Essentials of Communication This simple model requires many guarantees. Sender Receiver Communication Link Data.
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)
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( )
Networked Embedded Systems Pengyu Zhang EE107 Spring 2016 Lecture 8 Serial Buses.
میکرو کنترلرهای AVR Serial Interfaces, I2C and SPI
MICROCONTROLLER AND INTERFACING Presented by: Shefali Jethva ( ) Shivali Panchal ( ) Komal Soni ( ) Roll no. :- 14EC308.
1 Serial Peripheral Interface What is it? Basic SPI Capabilities Protocol Pros and Cons Uses Serial Peripheral Interface
©F.M. Rietti Communication Lines Fundamentals. ©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 2 Communication Lines Generally used to connect.
Lab 9 Multiprocessor, Buses, SPI, I2C. Multiprocessors Why multiprocessors? The structure of multiprocessors. Elements of multiprocessors: – Processing.
Serial Communication Originally created by Anurag Dwidedi and Rudra Pratap Suman.
Outline Analog to digital conversion (ADC) of NuMaker TRIO
Serial Communication Buses: I2C and SPI
EE 107 Fall 2017 Lecture 5 Serial Buses – UART & SPI
Chapter 11: Inter-Integrated Circuit (I2C) Interface
(Inter-IC bus) By Tejaswini Gadicherla
EE 107 Fall 2017 Lecture 7 Serial Buses – I2C Direct Memory Access
I2C PROTOCOL SPECIFICATION
Communication Lines Fundamentals.
BJ Furman ME 106 Fundamentals of Mechatronics 15NOV2012
EEPROM Comparison – Parallel or Serial
EECS 373 Design of Microprocessor-Based Systems Mark Brehob
EECS 373 Design of Microprocessor-Based Systems Prabal Dutta
Преглед Начин функционисања Имплементације
Serial Peripheral Interface Bus
Presentation transcript:

1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 10: Serial buses Oct 6, 2011

2

3 Announcements Homework #1 –Due now ABET procedure

Serial buses attach to the processor via the APB (which is bridged to the AHB) 4 Atmel SAM3U

5 Outline Minute quiz Announcements UART SPI I2C

6 DB9 pinout of a DTE DTE vs DCE Pinout of a DCE? Common ground? Noise effects?

7 RS-232 transmission example How do peers agree on timing?

8 Outline Minute quiz Announcements UART SPI I2C

9 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

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

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

12 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

13 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

14 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

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

16 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

17 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!

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

19 SPI example: decode what’s happening

20 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)

21 SPI is used everywhere! Peripherals –LCDs –Sensors –Radios –Lots of other chips Microcontrollers –Almost all MCUs have SPI masters –Some have SPI slaves

22 Outline Minute quiz Announcements UART SPI I2C

23 I2C bus Inter-Integrated Circuit Pronounced “eye-squared-see” Sometimes called “eye-two-see” Two wire serial bus specification Invented by Philips in the early 1980s The division is now NXP Was a patented protocol, but patent has now expired

24 I2C uses Originally used by Philips inside television sets Now a very common peripheral bus standard Intended for use in embedded systems Philips, National, Xicor, Siemens, … all use Also used in PCs RTC Temperature sensors Variant is the SMBus (system management bus)

25 I2C bus architecture I2C Standardizes peripheral classes SCK, SDA Philips/NXP

26 I2C details Two-wire serial protocol with addressing capability Speeds up to 3.4 Mbps Discussion: what limits I2C to such small speeds? Multi-master architecture Open collector bus driver Pull-up resistors Multi-master, Multi-slave Uses bus arbitration

27 I2C wiring Two lines SDA (serial data) SCL (serial clock) Open collector design Simple interfacing in for multi-voltage Supports bus arbitration

28 I2C clock Not a “traditional” clock Normally is kept “high” using a pull-up Pulsed by the master during data transmission Master could be either the transmitter or receiver Slave device can hold clock low if needs more time Allows for flow control

29 I2C transaction Transmitter/receiver differs from master/slave Master initiates transactions Slave responds Transmitter sets data on SDA line, slave acks For a read, slave is transmitter For a write, master is transmitter

30 I2C start condition Master pulls SDA low while SCL is high Normal SDA changes only happen when SCL is low

31 I2C address transmission Data is always sampled on the rising clock edge Address is 7 bits An 8-th bit indicated read or write High for read Low for write Addresses assigned by Philips/NXP For a fee Was covered by patent

32 I2C data transmission Transmitted just like address (8 bits) For a write, master transmits, slave acknowledges For a read, slave transmits, master acknowledges Transmission continues Subsequent bytes sent Continue until master creates stop condition

33 I2C stop condition Master pulls SDA high while SCL is high Also used to abort transactions

34 I2C bus transactions: start and stop conditions

35 I2C bus transactions: data transfer

36 I2C bus transactions: data transfer

37 Questions? Comments? Discussion?

38 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

39 SPI bus architecture Shared bus SCK MOSI MISO Chip selects

40 SPI bus architecture Compact shared bus SCK MOSI MISO Chip selects