OUTLINE. SPI Theory SPI Implementation STM32F0 SPI Resources System Overview Registers SPI Application Initialization Interface Examples

Size: px
Start display at page:

Download "OUTLINE. SPI Theory SPI Implementation STM32F0 SPI Resources System Overview Registers SPI Application Initialization Interface Examples"

Transcription

1 SERIAL PERIPHERAL INTERFACE (SPI) George E Hadley, Timothy Rogers, and David G Meyer 2018, Images Property of their Respective Owners

2 OUTLINE SPI Theory SPI Implementation STM32F0 SPI Resources System Overview Registers SPI Application Initialization Interface Examples

3 SPI THEORY Motivation USART can be used for asynchronous serial communication between two devices Question: Are there alternatives? Answer: Consider the concept of synchronous serial communication Synchronous serial communication is similar to asynchronous serial communication, except the devices share a common clock signal Advantages: Higher communication speeds (8-16x oversampling of signal not required, start/stop bits not required, packets can vary in length) Disadvantages: Hard to transmit data over long distances (signal integrity issues); SPI generally limited to board-level communication and short cable runs

4 SPI THEORY Masters and Slaves Serial Peripheral Interface (SPI) peripherals utilize the concept of master and slave devices to moderate communications Master: Initiates sending data or requests that data be sent (only one device may be master in traditional SPI protocols); also supplies the clocking signal Slave: Responds to those requests (can be multiple slave devices within system) Based on these roles, SPI peripherals commonly feature the following lines: Master Out/Slave In (MOSI): transmitting data (master) or receiving data (slave) Master In/Slave Out (MISO): receiving data (master) or transmitting data (slave) SPI System Clock (SCK): Shared clock for synchronous data transfer Slave Select (SSx): One or more (optional) control signals used for differentiating among multiple slave devices

5 SPI THEORY SPI Structure Single Slave SS SPI feature: Data is transferred simultaneously between master and slave devices

6 SPI THEORY SPI Structure Multiple Slaves Here, the slave select signals are provided by GPIO pins

7 SPI THEORY SPI Communications and Errors SPI Communication Structure: SPI Communication Errors: Overrun Error: Data is received by a master or slave device before previous received data has been read

8 STM32F0 SPI Resources Course microcontroller features two SPI peripherals: Default mode of operation is Motorola SPI Integrated I 2 S functionality (option for high quality stereo audio interface using an external CODEC) Master or slave operation 4-16 bit programmable frame size Multi-master mode capability Interrupt capability and DMA operation

9 STM32F0 SPI Subsystem Overview

10 Basic Configuration for Full Duplex Operation (Single Master, Single Slave) Here, the assertion or negation of the NSS pin indicates master or slave operating mode

11 Simplex Single Master/Single Slave Application Here, data is only transferred one direction: from the master to the salve (master is transmitonly, slave is receive-only)

12 Half-Duplex Single Master/Single Slave Application Here, the direction of (half-duplex) communication can be changed; master remains the clocking source

13 Multiple Independent Slaves Here, the NSS input of each slave is used to select (enable) it; the slave select outputs of the master are generated by GPIO pins

14 NSS Pin Logic If the SPI is configured for master mode and the NSS input is low (Vss), then an error is flagged

15 Clock Mode Phase/Polarity The combination of clock phase (CPHA) and clock polarity (CPOL) settings determine how the serial data stream is sampled The SPI clock divisor is 2 (1+BR[2:0])

16 COLLABORATIVE CLICKER QUIZ (CCQ) Question 1 1. The synchronous aspect of an SPI interface means: A. data can only be transmitted in one direction B. data can be transmitted in both directions, but not at the same time C. data can be transmitted in both directions simultaneously D. data transmission requires an accompanying clock signal E. none of the above

17 COLLABORATIVE CLICKER QUIZ (CCQ) Question 2 2. The minimum SPI clock divisor possible is: A. 1 B. 2 C. 4 D. 8 E. none of the above

18 COLLABORATIVE CLICKER QUIZ (CCQ) Question 3 3. Based on a 48 MHz system clock, the maximum SPI data transfer rate possible (in bits/second) is: A. 6,000,000 bps B. 8,000,000 bps C. 12,000,000 bps D. 24,000,000 bps E. none of the above

19 COLLABORATIVE CLICKER QUIZ (CCQ) Question 4 2. The maximum SPI clock divisor possible is: A. 128 B. 256 C. 512 D E. none of the above

20 COLLABORATIVE CLICKER QUIZ (CCQ) Question 5 3. Based on a 48 MHz system clock, the minimum SPI data transfer rate possible (in bits/second) is: A. 46,875 bps B. 93,750 bps C. 187,500 bps D. 375,000 bps E. none of the above

21 Clock Mode Phase/Polarity Clock format for CPHA = 0 and CPOL = 0 ( sample data on odd-numbered positive clock edges )

22 Clock Mode Phase/Polarity These are all the permutations possible with clock phase and polarity control note that the bit order can be programmed as well (i.e., MSB first or LSB first) The reason all these different modes are provided is due to the wide variety of SPI compatible devices on the market

23 Data Alignment Data alignment when data length is not equal to 8-bit or 16-bit the minimum data length is 4 bits

24 Data Packing Illustration of data packing in FIFO for transmission and reception

25 STM32F0 SPI Registers SPI Control Register 1 (SPIx_CR1): Control and configuration information for the SPI peripheral Significant Fields: Frame Format (LSBFirst): Indicates endianness of SPI SPI Enable (SPE): Enables/disables SPI peripheral Baud Rate Control (BR[2:0]): SPI clock divisor Master Selection (MSTR): Specifies master or slave mode

26 STM32F0 SPI Registers SPI Control Register 2 (SPIx_CR2): More control and configuration information for the SPI peripheral Significant Fields: Data Size (DS[3:0]): Sets SPI frame size (4-16 bits) TX Interrupt Enable (TXEIE): Enable for TX interrupt RX Interrupt Enable (RXNEIE): Enable for RX interrupt SS Output Enable: Used to enable/disable SPI operation in a multi-master environment

27 STM32F0 SPI Registers SPI Status Register (SPIx_SR): More control and configuration information for the SPI peripheral Significant Fields: Busy Flag (BSY): Indicates if SPI peripheral is in use Overrun Flag (OVR): Indicates FIFO overrun Underrun Flag (UDR): Indicates FIFO underrun TX Buffer Empty (TXE): Indicates transmitter is free RX Buffer Not Empty (RXNE): Indicates data is available

28 STM32F0 SPI Registers Other SPI Registers: SPI Data Register (SPIx_DR): Contains data to be received or transmitted (RX data and TX data contained in separate FIFOs, both accessed through this register) SPI CRC Registers (SPIx_CRCPR, SPIx_RXCRCR, SPIx_TXCRCR): Registers used for cyclic redundancy checking (CRC), a more advanced form of error checking compared to USART parity checking

29 SPI APPLICATION Basic Initialization The master or slave configuration steps are nearly identical outlined here are the basic steps for standard communication

30 SPI APPLICATION Constant Current LED Driver Use of constant current LED drivers eliminates the need for current limiting resistors many of the ICs designed for this purpose utilize an SPI compatible (simplex) interface The output enable (OE ) input can be driven by a PWM output to control LED intensity The latch enable (LE) input is used to control when the display is updated (asserted after new data is shifted in)

31 Questions?

For reference only Refer to the latest documents for details

For reference only Refer to the latest documents for details STM32F3 Technical Training For reference only Refer to the latest documents for details Serial peripheral interface SPI 3 SPI Features (1/2) 3 Full duplex synchronous transfers (3 lines) Half duplex/simplex

More information

spi 1 Fri Oct 13 13:04:

spi 1 Fri Oct 13 13:04: spi 1 Fri Oct 1 1:: 1.1 Introduction SECTION SERIAL PERIPHERAL INTERFACE (SPI) The SPI module allows full-duplex, synchronous, serial communication with peripheral devices.. Features Features of the SPI

More information

Module 3.C. Serial Peripheral Interface (SPI) Tim Rogers 2017

Module 3.C. Serial Peripheral Interface (SPI) Tim Rogers 2017 Module 3.C Serial Peripheral Interface (SPI) Tim Rogers 2017 Learning Outcome #3 An ability to effectively utilize the wide variety of peripherals integrated into a contemporary microcontroller How? A:

More information

Serial Peripheral Interface (SPI)

Serial Peripheral Interface (SPI) SPI and I 2 C 1 Serial Peripheral Interface (SPI) SPI allow half/full duplex, synchronous, serial communication with external devices The interface can be configured as master for MCU board Communication

More information

Universität Dortmund. IO and Peripheral Interfaces

Universität Dortmund. IO and Peripheral Interfaces IO and Peripheral Interfaces Microcontroller System Architecture Each MCU (micro-controller unit) is characterized by: Microprocessor 8,16,32 bit architecture Usually simple in-order microarchitecture,

More information

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

Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features of this USART interface, which is widely used for serial

More information

Design with Microprocessors

Design with Microprocessors Design with Microprocessors Lecture 6 Interfaces for serial communication Year 3 CS Academic year 2017/2018 1 st Semester Lecturer: Radu Dănescu Serial communication modules on AVR MCUs Serial Peripheral

More information

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

The 9S12 Serial Peripheral Inteface (SPI) Huang Section 10.2 through 10.6 SPI Block User Guide The 9S12 Serial Peripheral Inteface (SPI) Huang Section 102 through 106 SPI Block User Guide The 9S12 Serial Peripheral Interface (SPI) The 9S12 has a Synchronous Serial Interface On the 9S12 it is called

More information

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

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Microcontroller It is essentially a small computer on a chip Like any computer, it has memory,

More information

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

EE 456 Fall, Table 1 SPI bus signals. Figure 1 SPI Bus exchange of information between a master and a slave. EE 456 Fall, 2009 Notes on SPI Bus Blandford/Mitchell The Serial Peripheral Interface (SPI) bus was created by Motorola and has become a defacto standard on many microcontrollers. This is a four wire bus

More information

SPI Block User Guide V02.07

SPI Block User Guide V02.07 DOCUMENT NUMBER S12SPIV2/D SPI Block User Guide V02.07 Original Release Date: 21 JAN 2000 Revised: 11 Dec 2002 Motorola, Inc. Motorola reserves the right to make changes without further notice to any products

More information

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

Hello, and welcome to this presentation of the STM32 Low Power Universal Asynchronous Receiver/Transmitter interface. It covers the main features of Hello, and welcome to this presentation of the STM32 Low Power Universal Asynchronous Receiver/Transmitter interface. It covers the main features of this interface, which is widely used for serial communications.

More information

Menu. What is SPI? EEL 3744 EEL 3744 SPI

Menu. What is SPI? EEL 3744 EEL 3744 SPI Menu Concepts >Problems in serial communications Timing Synchronization: How do you line up the bit boundaries? Message Synchronization: How do you line up messages? Look into my... >Synchronous data solves

More information

Serial Communication. Simplex Half-Duplex Duplex

Serial Communication. Simplex Half-Duplex Duplex 1.5. I/O 135 Serial Communication Simplex Half-Duplex Duplex 136 Serial Communication Master-Slave Master Master-Multi-Slave Master Slave Slave Slave (Multi-)Master Multi-Slave Master Slave Slave Slave

More information

Addressing scheme to address a specific devices on a multi device bus Enable unaddressed devices to automatically ignore all frames

Addressing scheme to address a specific devices on a multi device bus Enable unaddressed devices to automatically ignore all frames 23. USART 23.1 Features Full-duplex operation Asynchronous or synchronous operation Synchronous clock rates up to 1/2 of the device clock frequency Asynchronous clock rates up to 1/8 of the device clock

More information

Serial Communication. Spring, 2018 Prof. Jungkeun Park

Serial Communication. Spring, 2018 Prof. Jungkeun Park Serial Communication Spring, 2018 Prof. Jungkeun Park Serial Communication Serial communication Transfer of data over a single wire for each direction (send / receive) Process of sending data one bit at

More information

Serial Communications

Serial Communications 1 Serial Interfaces 2 Embedded systems often use a serial interface to communicate with other devices. Serial Communications Serial implies that it sends or receives one bit at a time. Serial Interfaces

More information

Basics of UART Communication

Basics of UART Communication Basics of UART Communication From: Circuit Basics UART stands for Universal Asynchronous Receiver/Transmitter. It s not a communication protocol like SPI and I2C, but a physical circuit in a microcontroller,

More information

Serial Peripheral Interface (SPI) Host Controller Data Sheet

Serial Peripheral Interface (SPI) Host Controller Data Sheet Serial Peripheral Interface (SPI) Host Controller Data Sheet Proven System Block (PSB) for QuickLogic Customer Specific Standard Products (CSSPs) Features Supports Master configuration (Multi-Master configuration

More information

or between microcontrollers)

or between microcontrollers) : Communication Interfaces in Embedded Systems (e.g., to interface with sensors and actuators or between microcontrollers) Spring 2016 : Communication Interfaces in Embedded Systems Spring (e.g., 2016

More information

EE 354 November 13, 2017 ARM UART Notes

EE 354 November 13, 2017 ARM UART Notes EE 354 November 13, 2017 ARM UART Notes For serial communications you should be familiar with the following terms: UART/USART Baud rate Synchronous/Asynchronous communication Half-Duplex/Full-Duplex The

More information

Amarjeet Singh. January 30, 2012

Amarjeet Singh. January 30, 2012 Amarjeet Singh January 30, 2012 Website updated - https://sites.google.com/a/iiitd.ac.in/emsys2012/ Lecture slides, audio from last class Assignment-2 How many of you have already finished it? Final deadline

More information

More on the 9S12 SPI Using the Dallas Semiconductor DS1302 Real Time Clock with the 9S12 SPI

More on the 9S12 SPI Using the Dallas Semiconductor DS1302 Real Time Clock with the 9S12 SPI More on the 9S12 SPI Using the Dallas Semiconductor DS1302 Real Time Clock with the 9S12 SPI Using the 9S12 SPI The SPI has a data register (SPIDR) and a shift register. To write data to the SPI, you write

More information

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers Serial Perpherial Interface (SPI) Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA April 9, 2018 Aly El-Osery

More information

EE 308 Spring Using the 9S12 SPI

EE 308 Spring Using the 9S12 SPI Using the 9S12 SPI The SPI has a data register (SPIDR) and a shift register. To write data to the SPI, you write to the SPIDR data register. The 9S12 automatically transfers the data to the shift register

More information

Informatics for industrial applications

Informatics for industrial applications Informatics for industrial applications Lecture 5 - Peripherals: USART and DMA Martino Migliavacca martino.migliavacca@gmail.com October 20, 2011 Outline 1 Introduction to USART Introduction Synchronous

More information

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

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -4 1 UNIT 4 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -4 1 UNIT 4 4.1. Serial data communication basics ----------- 1 4.2. UART ------------------------------------------------ 4 4.3. Serial Peripheral

More information

Using the Z8051 MCU s USI Peripheral as an SPI Interface

Using the Z8051 MCU s USI Peripheral as an SPI Interface Using the Z8051 MCU s USI Peripheral as an SPI Interface AN035901-0513 Abstract This document describes how to configure Zilog s Z8051 Universal Serial Interface (USI) peripheral to operate as Serial Peripheral

More information

Understanding SPI with Precision Data Converters

Understanding SPI with Precision Data Converters Understanding SPI with Precision Data Converters By: Tony Calabria Presented by: 1 Communication Comparison SPI - Serial Peripheral Interface Bus I2C - Inter- Integrated Circuit Parallel Bus Advantages

More information

An SPI Temperature Sensor Interface with the Z8 Encore! SPI Bus

An SPI Temperature Sensor Interface with the Z8 Encore! SPI Bus Application Note An SPI Temperature Sensor Interface with the Z8 Encore! SPI Bus AN012703-0608 Abstract This Application Note provides an overview of Zilog s Z8 Encore! Serial Peripheral Interface (SPI)

More information

1 Contents 2 2 Overview 3 3 Hardware Interface 4 4 Software Interface Register Map Interrupts 6 5 Revision History 8

1 Contents 2 2 Overview 3 3 Hardware Interface 4 4 Software Interface Register Map Interrupts 6 5 Revision History 8 1 Contents 1 Contents 2 2 Overview 3 3 Hardware Interface 4 4 Software Interface 5 4.1 Register Map 5 4.2 Interrupts 6 5 Revision History 8 Version 2.3.2 - Confidential 2 of 8 2011 EnSilica Ltd, All Rights

More information

Interfacing Techniques in Embedded Systems

Interfacing Techniques in Embedded Systems Interfacing Techniques in Embedded Systems Hassan M. Bayram Training & Development Department training@uruktech.com www.uruktech.com Introduction Serial and Parallel Communication Serial Vs. Parallel Asynchronous

More information

Concepts of Serial Communication

Concepts of Serial Communication Section 6. Serial Communication Communication Using Serial Interfaces: UART and SPI Concepts of Serial Communication Limitations of Parallel Bus Clock skew becomes a serious issue for high speed and long

More information

Communication. Chirag Sangani

Communication. Chirag Sangani Communication Scope of Communication Telephones and cell phones. Satellite networks. Radio and DTH services. Campus LAN and wireless. Internet. Intra-galactic communication. Essentials of Communication

More information

LABORATORIO DI ARCHITETTURE E PROGRAMMAZIONE DEI SISTEMI ELETTRONICI INDUSTRIALI. Laboratory Lesson 9: Serial Peripheral Interface (SPI)

LABORATORIO DI ARCHITETTURE E PROGRAMMAZIONE DEI SISTEMI ELETTRONICI INDUSTRIALI. Laboratory Lesson 9: Serial Peripheral Interface (SPI) LABORATORIO DI ARCHITETTURE E PROGRAMMAZIONE DEI SISTEMI ELETTRONICI INDUSTRIALI Laboratory Lesson 9: Serial Peripheral Interface (SPI) Prof. Luca Benini Prof Davide Rossi

More information

Serial Buses in Industrial and Automotive Applications

Serial Buses in Industrial and Automotive Applications Serial Buses in Industrial and Automotive Applications Presented by Neelima Chaurasia Class: #368 1 Overview As consumer electronics, computer peripherals, vehicles and industrial applications add embedded

More information

SPI 3-Wire Master (VHDL)

SPI 3-Wire Master (VHDL) SPI 3-Wire Master (VHDL) Code Download Features Introduction Background Port Descriptions Clocking Polarity and Phase Command and Data Widths Transactions Reset Conclusion Contact Code Download spi_3_wire_master.vhd

More information

Raspberry Pi - I/O Interfaces

Raspberry Pi - I/O Interfaces ECE 1160/2160 Embedded Systems Design Raspberry Pi - I/O Interfaces Wei Gao ECE 1160/2160 Embedded Systems Design 1 I/O Interfaces Parallel I/O and Serial I/O Parallel I/O: multiple input/output simultaneously

More information

< W3150A+ / W5100 Application Note for SPI >

< W3150A+ / W5100 Application Note for SPI > < W3150A+ / W5100 Application Note for SPI > Introduction This application note describes how to set up the SPI in W3150A+ or W5100. Both the W3150A+ and W5100 have same architecture. W5100 is operated

More information

Module Introduction. PURPOSE: The intent of this module, is to explain several of the important features of Freescale s i.mx1 applications processor.

Module Introduction. PURPOSE: The intent of this module, is to explain several of the important features of Freescale s i.mx1 applications processor. Module Introduction PURPOSE: The intent of this module, is to explain several of the important features of Freescale s i.mx1 applications processor. OBJECTIVES: - Describe the features and functions of

More information

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

Embedded Systems and Software. Serial Interconnect Buses I 2 C (SMB) and SPI Embedded Systems and Software Serial Interconnect Buses I 2 C (SMB) and SPI I2C, SPI, etc. Slide 1 Provide low-cost i.e., low wire/pin count connection between IC devices There are many of serial bus standards

More information

Serial Peripheral Interface (SPI)

Serial Peripheral Interface (SPI) Serial Peripheral Interface (SPI) MSP432 SPI eusci = enhanced Universal Serial Communications Interface 2 tj MSP432 SPI ARM (AMBA Compliant) 7/8 bit transmission Master/Slave LSB/MSB first Separate RX/TX

More information

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

Serial Peripheral Interface (SPI) Last updated 8/7/18 Serial Peripheral Interface (SPI) Last updated 8/7/18 MSP432 SPI eusci = enhanced Universal Serial Communications Interface 2 tj MSP432 SPI ARM (AMBA Compliant) 7/8 bit transmission Master/Slave LSB/MSB

More information

Serial Communication. Simplex Half-Duplex Duplex

Serial Communication. Simplex Half-Duplex Duplex 1.5. I/O 128 Serial Communication Simplex Half-Duplex Duplex 129 Serial Communication Master-Slave Master Master-Multi-Slave Master Slave Slave Slave (Multi-)Master Multi-Slave Master Slave Slave Slave

More information

C8051F700 Serial Peripheral Interface (SPI) Overview

C8051F700 Serial Peripheral Interface (SPI) Overview C8051F700 Serial Peripheral Interface (SPI) Overview Agenda C8051F700 block diagram C8051F700 device features SPI operation overview SPI module overview Where to learn more 2 Introducing The C8051F700

More information

a Serial Peripheral Interace (SPI). Embedded RISC Microcontroller Core Peripheral

a Serial Peripheral Interace (SPI). Embedded RISC Microcontroller Core Peripheral Features Full-duplex, 3-wire Synchronous Data Transfer Master or Slave Operation Maximum Bit Frequency of f CLOCK /4 (in M-bits/second) LSB First or MSB First Data Transfer Four Programmable Bit Rates

More information

RL78 Serial interfaces

RL78 Serial interfaces RL78 Serial interfaces Renesas Electronics 00000-A Introduction Purpose This course provides an introduction to the RL78 serial interface architecture. In detail the different serial interfaces and their

More information

BLE 1.4 SPI Driver Design Version 1.x (Draft)

BLE 1.4 SPI Driver Design Version 1.x (Draft) BLE 1.4 SPI Driver Design Version 1.x (Draft) Document Number: TBD TABLE OF CONTENTS 1. FUNCTIONAL OVERVIEW... 1 2. DEFINITIONS, ABBREVIATIONS, ACRONYMS... 2 3. REVISION HISTORY... 2 4. SPI INTERFACE...

More information

AN-1435 APPLICATION NOTE

AN-1435 APPLICATION NOTE APPLICATION NOTE One Technology Way P.O. Box 9106 Norwood, MA 02062-9106, U.S.A. Tel: 781.329.4700 Fax: 781.461.3113 www.analog.com Implementing UART Using the ADuCM3027/ADuCM3029 Serial Ports INTRODUCTION

More information

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

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 October 2012 Introduction Reference Design RD1142 The Serial Peripheral Interface (SPI) is used primarily for synchronous serial communication between a host processor and its peripherals. The SPI bus

More information

Application Note, V1.0, Jul AP XC16x. Interfacing the XC16x Microcontroller to a Serial SPI EEPROM. Microcontrollers

Application Note, V1.0, Jul AP XC16x. Interfacing the XC16x Microcontroller to a Serial SPI EEPROM. Microcontrollers Application Note, V1.0, Jul. 2006 AP16095 XC16x Interfacing the XC16x Microcontroller to a Serial SPI EEPROM Microcontrollers Edition 2006-07-10 Published by Infineon Technologies AG 81726 München, Germany

More information

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide Introduction the Serial Communications Huang Sections 9.2,.2 SCI Block User Guide SPI Block User Guide Parallel Data Transfer Suppose you need to transfer data from one HCS2 to another. How can you do

More information

Real-Time Embedded Systems. CpE-450 Spring 06

Real-Time Embedded Systems. CpE-450 Spring 06 Real-Time Embedded Systems CpE-450 Spring 06 Class 5 Bruce McNair bmcnair@stevens.edu 5-1/42 Interfacing to Embedded Systems Distance 100 m 10 m 1 m 100 cm 10 cm "Transmission line" capacitance ( C) Distance

More information

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

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 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 to connect devices such as microcontrollers, sensors,

More information

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

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this? Introduction the Serial Communications Huang Sections 9.2, 10.2, 11.2 SCI Block User Guide SPI Block User Guide IIC Block User Guide o Parallel vs Serial Communication o Synchronous and Asynchronous Serial

More information

Serial Peripheral Interface Bus SPI

Serial Peripheral Interface Bus SPI Serial Peripheral Interface Bus SPI SPI Bus Developed by Motorola in the mid 1980 s Full-duplex, master-slave serial bus suited to data streaming applications for embedded systems Existing peripheral busses

More information

Serial Peripheral Interface (SPI)

Serial Peripheral Interface (SPI) SPI = Simple, 3 wire, full duplex, synchronous serial data transfer Interfaces to many devices, even many non-spi peripherals Can be a master or slave interface 4 interface pins: -MOSI master out slave

More information

Emulating Dual SPI Using FlexIO

Emulating Dual SPI Using FlexIO Freescale Semiconductor, Inc. Document Number: AN5242 Application Note Rev. 0, 01/2016 Emulating Dual SPI Using FlexIO 1. Introduction This application note discusses one example of how to use FlexIO module

More information

Synchronous = SPI (3 options)

Synchronous = SPI (3 options) CS/ECE 6780/5780 Al Davis Today s topics: Last lecture general serial I/O concepts more specifics on asynchronous SCI protocol Today specifics of synchronous SPI details of the SCI programming ritual 1

More information

Serial Communication

Serial Communication Serial Communication What is serial communication? Basic Serial port operation. Classification of serial communication. (UART,SPI,I2C) Serial port module in PIC16F887 IR Remote Controller Prepared By-

More information

Microcontrollers and Interfacing

Microcontrollers and Interfacing Microcontrollers and Interfacing Week 10 Serial communication with devices: Serial Peripheral Interconnect (SPI) and Inter-Integrated Circuit (I 2 C) protocols College of Information Science and Engineering

More information

ECE 4510/5530 Microcontroller Applications Week 6

ECE 4510/5530 Microcontroller Applications Week 6 ECE 4510/5530 Microcontroller Applications Week 6 Dr. Bradley J. Bazuin Associate Professor Department of Electrical and Computer Engineering College of Engineering and Applied Sciences Lab 5 Element Hardware

More information

Section 5 SERCOM. Tasks SPI. In this section you will learn:

Section 5 SERCOM. Tasks SPI. In this section you will learn: Section 5 SERCOM SPI Tasks In this section you will learn: SPI protocol SERCOM Engine on SAMD20 How to use SERRCOM in SPI mode Implementation of SPI communication 04/12/2013 Table of Contents 1. The SPI

More information

The SPI supports data bus widths of 32 bits.

The SPI supports data bus widths of 32 bits. 19. SPI Controller November 2012 av_54019-1.2 av_54019-1.2 The hard processor system (HPS) provides two serial peripheral interface (SPI) masters and two SPI slaves. The SPI masters and slaves are instances

More information

Growing Together Globally Serial Communication Design In Embedded System

Growing Together Globally Serial Communication Design In Embedded System Growing Together Globally Serial Communication Design In Embedded System Contents Serial communication introduction......... 01 The advantages of serial design......... 02 RS232 interface......... 04 RS422

More information

Serial Communication Prof. James L. Frankel Harvard University. Version of 2:30 PM 6-Oct-2015 Copyright 2015 James L. Frankel. All rights reserved.

Serial Communication Prof. James L. Frankel Harvard University. Version of 2:30 PM 6-Oct-2015 Copyright 2015 James L. Frankel. All rights reserved. Serial Communication Prof. James L. Frankel Harvard University Version of 2:30 PM 6-Oct-2015 Copyright 2015 James L. Frankel. All rights reserved. Overview of the Serial Protocol Simple protocol for communicating

More information

Chapter 10 Sections 1,2,9,10 Dr. Iyad Jafar

Chapter 10 Sections 1,2,9,10 Dr. Iyad Jafar Starting with Serial Chapter 10 Sections 1,2,9,10 Dr. Iyad Jafar Outline Introduction Synchronous Serial Communication Asynchronous Serial Communication Physical Limitations Overview of PIC 16 Series The

More information

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

An SPI interface for the 65(C)02 family of microprocessors Rev 4/B Dec 30, 2011 65SPI/B An SPI interface for the 65(C)02 family of microprocessors This device was created to provide a basic SPI interface for the 65xx family of microprocessors. Currently, the only

More information

CprE 488 Embedded Systems Design. Lecture 4 Interfacing Technologies

CprE 488 Embedded Systems Design. Lecture 4 Interfacing Technologies CprE 488 Embedded Systems Design Lecture 4 Interfacing Technologies Joseph Zambreno Electrical and Computer Engineering Iowa State University www.ece.iastate.edu/~zambreno rcl.ece.iastate.edu Never trust

More information

Using FlexIO to emulate communications and timing peripherals

Using FlexIO to emulate communications and timing peripherals NXP Semiconductors Document Number: AN12174 Application Note Rev. 0, 06/2018 Using FlexIO to emulate communications and timing peripherals 1. Introduction The FlexIO is a new on-chip peripheral available

More information

SPI Framework Module Guide

SPI Framework Module Guide Application Note Introduction This module guide will enable you to effectively use a module in your own design. Upon completion of this guide, you will be able to add this module to your own design, configure

More information

PIC32 Family Reference Manual

PIC32 Family Reference Manual 23.3 MODES OF OPERATION The SPI module offers the following operating modes: 8-bit, 16-bit, and 32-bit data transmission modes 8-bit, 16-bit, and 32-bit data reception modes Master and Slave modes Framed

More information

BUS TIMING ANALYSIS. George E Hadley, Timothy Rogers, and David G Meyer 2018, Images Property of their Respective Owners

BUS TIMING ANALYSIS. George E Hadley, Timothy Rogers, and David G Meyer 2018, Images Property of their Respective Owners BUS TIMING ANALYSIS George E Hadley, Timothy Rogers, and David G Meyer 2018, Images Property of their Respective Owners LEARNING OBJECTIVES identify CPU and memory timing parameters draw a bus timing diagram

More information

AN Multifunction Serial Interface of FM MCU. Contents. 1 Introduction

AN Multifunction Serial Interface of FM MCU. Contents. 1 Introduction AN99218 Author: Edison Zhang Associated Part Family: FM0+, FM3, FM4 Associated Code Examples: None Related Application Notes: None AN99218 explains the various modes of the multifunction serial (MFS) interface.

More information

Device: MOD This document Version: 1.0. Matches module version: v3 [29 June 2016] Date: 23 October 2017

Device: MOD This document Version: 1.0. Matches module version: v3 [29 June 2016] Date: 23 October 2017 Device: MOD-1025 This document Version: 1.0 Matches module version: v3 [29 June 2016] Date: 23 October 2017 Description: UART (async serial) to I2C adapter module MOD-1025 v3 datasheet Page 2 Contents

More information

NS9360. Errata _F. Release date: March 2008

NS9360. Errata _F. Release date: March 2008 NS9360 Unused USB module can cause failures SPI boot fails intermittently - updated SPI slave data output high impedance control UART gap timer UART CTS-related transmit data errors Ethernet receive data

More information

COMP2121: Microprocessors and Interfacing

COMP2121: Microprocessors and Interfacing COMP2121: Microprocessors and Interfacing Lecture 25: Serial Input/Output (II) Overview USART (Universal Synchronous and Asynchronous serial Receiver and Transmitter) in AVR http://www.cse.unsw.edu.au/~cs2121

More information

MCS-51 Serial Port A T 8 9 C 5 2 1

MCS-51 Serial Port A T 8 9 C 5 2 1 MCS-51 Serial Port AT89C52 1 Introduction to Serial Communications Serial vs. Parallel transfer of data Simplex, Duplex and half-duplex modes Synchronous, Asynchronous UART Universal Asynchronous Receiver/Transmitter.

More information

SPI Controller. Features of the SPI Controller. SPI Block Diagram and System Integration

SPI Controller. Features of the SPI Controller. SPI Block Diagram and System Integration 19 cv_54019 Subscribe The hard processor system (HPS) provides two serial peripheral interface (SPI) masters and two SPI slaves. The SPI masters and slaves are instances of the Synopsys DesignWare Synchronous

More information

Digital Storage Oscilloscope

Digital Storage Oscilloscope Digital Storage Oscilloscope GDS-3000 Series SERIAL DECODE MANUAL GW INSTEK PART NO. 82DS-SBD00U01 ISO-9001 CERTIFIED MANUFACTURER October 2010 This manual contains proprietary information, which is protected

More information

NS9750B-0. Use in conjunction with: Errata , Rev G. Release date: May Phone: Web:

NS9750B-0. Use in conjunction with: Errata , Rev G. Release date: May Phone: Web: NS9750B-0 Errata 90000530, Rev G Release date: May 2006 Use in conjunction with: NS9750 Hardware Reference, Rev. E Part number: 90000624_E Released: April 2006 SPI slave data output high impedance control

More information

Welcome to this presentation of the STM32 direct memory access controller (DMA). It covers the main features of this module, which is widely used to

Welcome to this presentation of the STM32 direct memory access controller (DMA). It covers the main features of this module, which is widely used to Welcome to this presentation of the STM32 direct memory access controller (DMA). It covers the main features of this module, which is widely used to handle the STM32 peripheral data transfers. 1 The Direct

More information

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

ice40 UltraPlus I 2 C and SPI Hardened IP Usage Guide Radiant Software ice40 UltraPlus I 2 C and SPI Hardened IP Usage Guide Radiant Software FPGA-TN-02053-1.0 February 2018 Contents Acronyms in This Document... 4 1. Introduction... 5 2. I 2 C IP Core Overview... 6 2.1. Key

More information

Serial versus Parallel Data Transfers

Serial versus Parallel Data Transfers Serial versus Parallel Data Transfers 1 SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Serial communications Most communications is carried out over serial links Fewer wires needed Less electronics

More information

Unit 19 - Serial Communications 19.1

Unit 19 - Serial Communications 19.1 Unit 19 - Serial Communications 19.1 19.2 Serial Interfaces Embedded systems often use a serial interface to communicate with other devices. Serial implies that it sends or receives one bit at a time.

More information

INTRODUCTION TO FLEXIO

INTRODUCTION TO FLEXIO INTRODUCTION TO FLEXIO Osvaldo Romero Applications Engineer EXTERNAL USE Agenda Introduction to FlexIO FlexIO Main Features FlexIO Applications Freescale Products with FlexIO Collaterals\Tools for FlexIO

More information

Parallel IO. Serial IO. Parallel vs. Serial IO. simplex vs half-duplex vs full-duplex. Wires: Full Duplex. Wires: Simplex, Half-duplex.

Parallel IO. Serial IO. Parallel vs. Serial IO. simplex vs half-duplex vs full-duplex. Wires: Full Duplex. Wires: Simplex, Half-duplex. Parallel IO Parallel IO data sent over a group of parallel wires. Typically, a clock is used for synchronization. D[15:0] clk Serial IO Serial IO data sent one bit at a time, over a single wire. A clock

More information

8051 Serial Communication

8051 Serial Communication 8051 Serial Communication Basics of serial communication Parallel: transfers eight bits of data simultaneously over eight data lines expensive - short distance fast Serial : one bit at a time is transferred

More information

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

Serial Peripheral Interface. What is it? Basic SPI. Capabilities. Protocol. Pros and Cons. Uses Serial Peripheral Interface What is it? Basic SPI Capabilities Protocol Serial Peripheral Interface http://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/ SPI_single_slave.svg/350px-SPI_single_slave.svg.png

More information

Lecture 14 Serial Peripheral Interface

Lecture 14 Serial Peripheral Interface www.atomicrhubarb.com/systems Lecture 14 Serial Peripheral Interface Section Topic Where in the books Zilog PS220 "Enhanced Serial Peripheral Interface" Assorted datasheets Synchronous Serial Buses 1-wire

More information

Application Note AN_289. FT51A Programming Guide

Application Note AN_289. FT51A Programming Guide AN_289 FT51A Programming Guide Issue Date: 2016-09-19 This document provides a guide for using FT51A firmware libraries supplied by FTDI and writing applications. Use of FTDI devices in life support and/or

More information

AREA OPTIMIZATION OF SPI MODULE USING VERILOG HDL

AREA OPTIMIZATION OF SPI MODULE USING VERILOG HDL International Journal of Electronics and Communication Engineering & Technology (IJECET) Volume 7, Issue 3, May June 2016, pp. 38 45, Article ID: IJECET_07_03_005 Available online at http://www.iaeme.com/ijecet/issues.asp?jtype=ijecet&vtype=7&itype=3

More information

Design Development and Implementation of SPI

Design Development and Implementation of SPI MIT International Journal of Electronics and Communication Engineering, Vol. 4, No. 2, August 2014, pp. 65 69 65 Design Development and Implementation of SPI A. Sirisha Kurnool (DT), A.P, INDIA M. Sravanthi

More information

ECE 4510 Introduction to Microprocessors. Chapter 10

ECE 4510 Introduction to Microprocessors. Chapter 10 ECE 451 Introduction to Microprocessors Chapter 1 Dr. Bradley J. Bazuin Associate Professor Department of Electrical and Computer Engineering College of Engineering and Applied Sciences Chapter 1 Serial

More information

STM32F030x4/x6/x8/xC Errata sheet

STM32F030x4/x6/x8/xC Errata sheet Errata sheet STM32F030x4/x6/x8/xC device limitations Silicon identification This document applies to the part numbers of STM32F030x4/x6/x8/xC devices listed in Table 1 and their silicon revisions shown

More information

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

App Note Application Note: Addressing Multiple FPAAs Using a SPI Interface Rev: 1.0.0 Date: 23 rd Jan 2015 App Note - 310 Application Note: Addressing Multiple FPAAs Using a SPI Interface TABLE OF CONTENTS 1 PURPOSE... 2 2 THE SPI INTERFACE... 3 2.1 OVERVIEW... 3 2.2 DETAILED

More information

UART TO SPI SPECIFICATION

UART TO SPI SPECIFICATION UART TO SPI SPECIFICATION Author: Dinesh Annayya dinesha@opencores.org Table of Contents Preface... 3 Scope... 3 Revision History... 3 Abbreviations... 3 Introduction... 3 Architecture... 4 Baud-rate generator

More information

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

McMaster University Embedded Systems. Computer Engineering 4DS4 Lecture 6 Serial Peripherals Amin Vali Feb. 2016 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

More information

UART Register Set. UART Master Controller. Tx FSM. Rx FSM XMIT FIFO RCVR. i_rx_clk o_intr. o_out1 o_txrdy_n. o_out2 o_rxdy_n i_cs0 i_cs1 i_ads_n

UART Register Set. UART Master Controller. Tx FSM. Rx FSM XMIT FIFO RCVR. i_rx_clk o_intr. o_out1 o_txrdy_n. o_out2 o_rxdy_n i_cs0 i_cs1 i_ads_n October 2012 Reference Design RD1138 Introduction The Universal Asynchronous Receiver/Transmitter (UART) performs serial-to-parallel conversion on data characters received from a peripheral device or a

More information

Review for Exam 3. Write 0x05 to ATD0CTL4 to set at fastest conversion speed and 10-bit conversions

Review for Exam 3. Write 0x05 to ATD0CTL4 to set at fastest conversion speed and 10-bit conversions Review for Exam 3 A/D Converter Power-up A/D converter (ATD0CTL2) Write 0x05 to ATD0CTL4 to set at fastest conversion speed and 10-bit conversions Write 0x85 to ATD0CTL4 to set at fastest conversion speed

More information