©F.M. Rietti Communication Lines Fundamentals. ©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 2 Communication Lines Generally used to connect.

Slides:



Advertisements
Similar presentations
Anurag Dwivedi Rudra Pratap Suman. Scope of Communica tion Telephones and Cell Phones.
Advertisements

SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
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
Serial Communication Buses: I 2 C and SPI By Brody Dunn.
Serial Peripheral Interface (SPI)
SPISPI Term Dr Abdelhafid Bouhraoua Term Dr Abdelhafid Bouhraoua.
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.
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
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,
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.
Real-time Systems Lab, Computer Science and Engineering, ASU Quark SPI Interface (ESP – Fall 2014) Computer Science & Engineering Department Arizona State.
©F.M. Rietti Peripherals Connecting Fundamentals.
OCRP RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
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.
©F.M. Rietti Communication Lines Fundamentals. ©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 2 Communication Lines Generally used to connect.
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.
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.
1 Serial Peripheral Interface What is it? Basic SPI Capabilities Protocol Pros and Cons Uses Serial Peripheral Interface
Lab 9 Multiprocessor, Buses, SPI, I2C. Multiprocessors Why multiprocessors? The structure of multiprocessors. Elements of multiprocessors: – Processing.
DIRECT MEMORY ACCESS and Computer Buses
Serial Communications
Interconnection Structures
Serial Communication Originally created by Anurag Dwidedi and Rudra Pratap Suman.
ECE 382 Lesson 15 Lesson Outline S/W Delays Wrap up
I/O SYSTEMS MANAGEMENT Krishna Kumar Ahirwar ( )
Serial Communication Buses: I2C and SPI
Tutorial Introduction
Microcontroller basics
Serial Communication Protocols And Embedded IoT
EE 107 Fall 2017 Lecture 5 Serial Buses – UART & SPI
ECE 3430 – Intro to Microcomputer Systems
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
SERIAL PERIPHERAL INTERFACE
COMP2121: Microprocessors and Interfacing
Atmega32 Serial Programming Basics
Communication Lines Fundamentals.
BJ Furman ME 106 Fundamentals of Mechatronics 15NOV2012
DIGITAL DATA COMMUNICATION TECHNIQUES
EEPROM Comparison – Parallel or Serial
Pulse Width Modulation (PWM)
Computer Organization and Design
SPI Protocol and DAC Interfacing
Asynchronous Serial Communications
Serial Communication Interface: Using 8251
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Преглед Начин функционисања Имплементације
SPI Protocol Sepehr Naimi
HD44780 LCD programming From the Hardware Side
HD44780 LCD programming From the Hardware Side
Serial Peripheral Interface Bus
Serial Communications
William Stallings Computer Organization and Architecture
Presentation transcript:

©F.M. Rietti Communication Lines Fundamentals

©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 2 Communication Lines Generally used to connect external devices –Microcontrollers world has introduced new standards for peripherals interfaces that can be externally wired or internally wired via PCB tracks: –SPI –I2C

©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 3 Communication Lines (cont) SPI SPI mean S(erial) P(eripheral) I(nterface) The interface was developed by Motorola and has become a “de facto” standard, most used also on microntroller world.Motorola Spi can be considered as a wired bus that can operate with a single master device and with one or more slave devices.

©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 4 Communication Lines (cont) SPI (cont) –SPI OSI Layer 0 SPI use four wire for exchanging data from peripherals

©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 5 Communicatons Lines (cont) SPI (cont) Wires meaning –MOSI (Master Out Slave In) [SDO] –MISO (Master In Slave Out) [SDI] –SCK (Slave Clock) [SCK] –SS_n (Slave Select).

©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 6 Communication Lines (cont) –SPI (cont) To begin communication, the bus master configures the clock, using a frequency supported by the slave device, typically up to a few MHz. The master then selects the slave device with a logic level 0 on the select line. If a waiting period is required, such as for analog-to-digital conversion, the master must wait for at least that period of time before issuing clock cycles. During each SPI clock cycle, a full duplex data transmission occurs. The master sends a bit on the MOSI line and the slave reads it, while the slave sends a bit on the MISO line and the master reads it. This sequence is maintained even when only one-directional data transfer is intended.

©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 7 Communication Lines (cont) SPI (cont) –Multi Slave In general, each slave will need a separate SS line. To talk to a particular slave, you’ll make that slave’s SS line low and keep the rest of them high (you don’t want two slaves activated at the same time, or they may both try to talk on the same MISO line resulting in garbled data). Lots of slaves will require lots of SS lines; if you’re running low on outputs, there are binary decoder chips that can multiply your SS outputs.binary decoder chips

©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 8 Communication Lines (cont) SPI (cont) –Daisy Chain Multi Slave Configured with the MISO (output) of one going to the MOSI (input) of the next. In this case, a single SS line goes to all the slaves. Once all the data is sent, the SS line is raised, which causes all the chips to be activated simultaneously. Note that, for this layout, data overflows from one slave to the next, so to send data to any one slave, you’ll need to transmit enough data to reach all of them. Also, keep in mind that the first piece of data you transmit will end up in the last slave. Each slave must copy input data to output to propagate them.

©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 9 Communication Lines (cont) SPI (cont) In addition to setting the clock frequency, the master must also configure the clock polarity and phase with respect to the data. –At CPOL=0 the base value of the clock is zero,i.e. the active state is 1 and idle state is 0. For CPHA=0, data are captured on the clock's rising edge (low→high transition) and data is output on a falling edge (high→low clock transition). For CPHA=1, data are captured on the clock's falling edge and data is output on a rising edge. –At CPOL=1 the base value of the clock is one (inversion of CPOL=0), i.e. the active state is 0 and idle state is 1. For CPHA=0, data are captured on clock's falling edge and data is output on a rising edge. For CPHA=1, data are captured on clock's rising edge and data is output on a falling edge.

©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 10 Communication Lines (cont) SPI (cont) –Advantages of SPI: It’s faster than asynchronous serial The receive hardware can be a simple shift register It supports multiple slaves –Disadvantages of SPI: It requires more signal lines (wires) than other communications methods The communications must be well-defined in advance (you can’t send random amounts of data whenever you want) The master must control all communications (slaves can’t talk directly to each other) It usually requires separate SS lines to each slave, which can be problematic if numerous slaves are needed.

©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 11 Communication Lines (cont) Arduino/Genuino SPI Library Link –Arduino SPI LibrayArduino SPI Libray