McMaster University Embedded Systems. Computer Engineering 4DS4 Lecture 6 Serial Peripherals Amin Vali Feb. 2016

Similar documents
Serial Peripheral Interface. What is it? Basic SPI. Capabilities. Protocol. Pros and Cons. Uses

Introduction to I2C & SPI. Chapter 22

Embedded Systems and Software. Serial Interconnect Buses I 2 C (SMB) and SPI

CprE 488 Embedded Systems Design. Lecture 4 Interfacing Technologies

Understanding SPI with Precision Data Converters

Raspberry Pi - I/O Interfaces

EE 456 Fall, Table 1 SPI bus signals. Figure 1 SPI Bus exchange of information between a master and a slave.

or between microcontrollers)

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this?

MISO MOSI Clock. The master and the slave use a protocol based on the following frame structure. Preamble Body Postamble

Lecture 25 March 23, 2012 Introduction to Serial Communications

Growing Together Globally Serial Communication Design In Embedded System

Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications

Groking the Linux SPI Subsystem FOSDEM Matt Porter

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

ECE 471 Embedded Systems Lecture 20

Universität Dortmund. IO and Peripheral Interfaces

Digital Storage Oscilloscope

RL78 Serial interfaces

FPGA Implementation Of SPI To I2C Bridge

Lecture 14 Serial Peripheral Interface

Serial Peripheral Interface (SPI) Last updated 8/7/18

DESIGNING OF INTER INTEGRATED CIRCUIT USING VERILOG

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -4 1 UNIT 4

In this section, we are going to cover the Silicon Labs CP240x family features.

spi 1 Fri Oct 13 13:04:

ICS Humla CTF. Copyright 2017 Payatu 1

Tutorial for I 2 C Serial Protocol

The 9S12 Serial Peripheral Inteface (SPI) Huang Section 10.2 through 10.6 SPI Block User Guide

Microcontrollers and Interfacing

SPI 3-Wire Master (VHDL)

1.3inch OLED User Manual

Serial Peripheral Interface (SPI)

App Note Application Note: Addressing Multiple FPAAs Using a SPI Interface

The Cubesat Internal bus: The I2C

C8051F700 Serial Peripheral Interface (SPI) Overview

Serial Communication. Spring, 2018 Prof. Jungkeun Park

Ken Foust Intel. A Developer s Guide to MIPI I3C SM for Sensors and Beyond

An SPI interface for the 65(C)02 family of microprocessors

Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used

The Serial Peripheral Interface

LAB4. Program the on chip SPI module

Microcontroller Systems. ELET 3232 Topic 23: The I 2 C Bus

EECS 373 Design of Microprocessor-Based Systems

Serial Buses in Industrial and Automotive Applications

Amarjeet Singh. January 30, 2012

Real Time Embedded Systems. Lecture 1 January 17, 2012

I2C a learn.sparkfun.com tutorial

Using FlexIO to emulate communications and timing peripherals

Interfacing Techniques in Embedded Systems

PIC16C7X 11.0 SYNCHRONOUS SERIAL PORT (SSP) MODULE SSP Module Overview. Applicable Devices

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT

Part 1 Using Serial EEPROMs

Embedded Workshop 10/28/15 Rusty Cain

Development and research of different architectures of I 2 C bus controller. E. Vasiliev, MIET

An Efficient Designing of I2C Bus Controller Using Verilog

Each I2C master has 8-deep transmit and receive FIFOs for efficient data handling. SPI to Dual I2C Masters. Registers

Inter-Integrated Circuit Bus IIC I2C TWI

Serial Peripheral Interface (SPI) Host Controller Data Sheet

AN_1x66B_047 July 2009

Introducing SPI Xpress SPI protocol Master / Analyser on USB

Serial Peripheral Interface (SPI)

LB5900 Series Power Sensor SPI & I2C Interface Guide

i_csn i_wr i_rd i_cpol i_cpha i_lsb_first i_data [15:0] o_data [15:0] o_tx_ready o_rx_ready o_rx_error o_tx_error o_tx_ack o_tx_no_ack

MIKROPROCESORY PRO VÝKONOVÉ SYSTÉMY. Serial Data Transmission (Stručný přehled) České vysoké učení technické Fakulta elektrotechnická

< W3150A+ / W5100 Application Note for SPI >

Serial Peripheral Interface (SPI)

The I2C BUS Interface

Block Diagram. mast_sel. mast_inst. mast_data. mast_val mast_rdy. clk. slv_sel. slv_inst. slv_data. slv_val slv_rdy. rfifo_depth_log2.

ASNTu2s PCB with Tiger Board USB to 7-Channel 3-Wire Interface Bridge Application Notes

SPI (Serial & Peripheral Interface)

ArduCAM-M-2MP Camera Shield

Temperature Sensor TMP2 PMOD Part 1

Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features

ECE 4510/5530 Microcontroller Applications Week 10

How to Implement I 2 C Serial Communication Using Intel MCS-51 Microcontrollers

Handson Technology. I2C Specification and Devices. 1

Groking the Linux SPI Subsystem Embedded Linux Conference Matt Porter

Two Wire Interface (TWI) also commonly called I2C

By: Haron Abdel-Raziq

M68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1

EECS 373 Design of Microprocessor-Based Systems

Microcontroller basics

Pmod modules are powered by the host via the interface s power and ground pins.

SILICON MICROSTRUCTURES

I 2 C Master Control FSM. I 2 C Bus Control FSM. I 2 C Master Controller

MOS INTEGRATED CIRCUIT

Design Development and Implementation of SPI

ice40 UltraPlus I 2 C and SPI Hardened IP Usage Guide Radiant Software

INTRODUCTION TO FLEXIO

Laboratory 5 Communication Interfaces

Mbed Microcontroller SPI. Spring, 2018 Prof. Jungkeun Park

EECS 373 Design of Microprocessor-Based Systems

Promira Serial Platform I C/SPI Active Applications

Level Shifter. for. Hardware User s Manual.

Exercise 2 I 2 C Management 1/7

Raspberry Pi. Hans-Petter Halvorsen, M.Sc.

Section 16. Basic Sychronous Serial Port (BSSP)

Interfacing to Digital Potentiometers

ECE 1160/2160 Embedded Systems Design. Midterm Review. Wei Gao. ECE 1160/2160 Embedded Systems Design

Transcription:

McMaster University Embedded Systems Computer Engineering 4DS4 Lecture 6 Serial Peripherals Amin Vali Feb. 2016

Serial Peripherals I2C Inter-IC Bus X/Y Coord. RGB data LCD config controller LCD data controller I 2 C Horiz./vert. sync data RGB data Liquid Crystal Display (LCD) SPI Touch_en Coord_en X/Y Coord. Touch panel controller SPI Touch panel Serial Peripheral Interface Other serial communication protocols

Serial Peripherals I2C ("eye-squared-see") Inter-IC (integrated circuit) bus Low-bandwidth (up to 400Kbps) Pass configuration data to on-board peripherals accessed intermittently Two wires with no chip selects or arbitration logic simple in hardware SDA/SCL open drain and pulled high with a resistor (wired AND) Master Controller serial data (SDA) serial clock (SCL) Peripheral 1... Peripheral n

Serial Peripherals I2C Typical transaction in a single-master/multiple-slaves environments Master initiates the Start sequence Master sends the Slave Address Master sends the Read/ Write ( R/W ) 0 (read) / 1 (write) Master waits/sends the acknowledge bit ( ACK ) depending on R/W Master/slave send/receive the data byte ( Data ) depending on R/W Master/slave wait/send ACK 0 for acknowledged / 1 not acknowledge Master sends the Stop sequence. SDA A 6 A 5... A 0 R/W ACK D 7 D 0 ACK SCL...... Start Address R/W ACK Data ACK Stop

Serial Peripherals I2C Clock stretching by slave (Open Drain) slow down the speed master must wait for the SCL to be released to continue Read/write transactions Write transactions (from master to slave) Start Address W ACK Data ACK Data ACK Data ACK Stop Read transactions (from master to slave) Start Address R ACK Data ACK Data ACK Data NACK Stop Legend: Master drives SDA Slave drives SDA

Serial Peripherals I2C For data bits, the SDA line is always constant during the high-level of SCL it changes while SCL is 0 Start/stop sequence is different Start: falling edge on SDA while SCL is 1 Stop: rising edge on SDA while SCL is 1 Acknowledge bits 0 acknowledge/1 not acknowledge For a write transaction if the slave did not acknowledge then stop the transaction and retransmit the data For a read transaction master can choose not to acknowledge when it received enough data and then it generates the stop sequence

Serial Peripherals SPI Serial Peripheral Interface (SPI) Synchronous 4-wire serial interface Full-duplex communication Arbitrary message size (not in bytes) No peripheral addressing required (use select signals from the master) No slave acknowledgements Slave can generate interrupts to the master (not covered by standard) Master MOSI Controller MOSI Peripheral up to 70 MHz MOSI Master Out Slave In ( SIMO) Master In Slave Out (SOMI) Slave Select (active low)

Serial Peripherals SPI Data transfers are done through shift registers in master and slave controllers Depending on the particular application, the master/slave controller decides when to load/unload the shift registers If / are active more than the slave requires, then it ignores its input and it shifts back dummy bits to master Master Controller Peripheral... MOSI MOSI...

Serial Peripherals SPI Timing and modes - determined by clock polarity (CPOL) and clock phase (CPHA) CPOL=0 clock starts at 0 (base value) CPHA=0 - data read on rising edge and changed on falling edge CPHA=1 - data read on falling edge and changed on rising edge CPHA=0 CPHA=1... M k-1 MOSI M 0 M 1... Sk-1 M 0 M 1... M k-1 S 0 S 1 S 0 S 1... S k-1 CPOL=1 clock starts at 1 (Complement of the above) CPHA=0 read on falling edge, CPHA=1 read of rising edge,

https://en.wikipedia.org/wiki/user:cburnett

Serial Peripherals SPI Attaching multiple peripherals to the master controller multiple slave select signals from the master (most common) Master MOSI Controller 0 1... n MOSI Peripheral 1 MOSI Peripheral 2... MOSI Peripheral n

Serial Peripherals SPI Daisy chain configuration configure a single shift register by connecting the output of one slave to the input of the next one (single slave select) Master MOSI Controller MOSI Peripheral 1 MOSI Peripheral 2... MOSI Peripheral n