ECE2049: Embedded Computing in Engineering Design C Term Spring 2018

Size: px
Start display at page:

Download "ECE2049: Embedded Computing in Engineering Design C Term Spring 2018"

Transcription

1 ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #19: Using SPI The LCD Screen and DAC Reading for Today: User's Manual Ch 35, Davies 101.5, DAC datasheet Reading for Next Class: -- Lab #3 (on web): Due NOW! Lab #4 (on web): Report due Friday 3/2/2018! (at 9 a.m. in class) HW #5 (on web): Due Tueday 2/27 (in class) Last Class: >> Serial vs. Parallel interfaces >> USCI are parallel-to-serial and serial-to-parallel converters >> Asynchronous UART mode for asynchronous serial comms Serial Peripheral Interface Bus (SPI) >> Used primarily for synchronous serial comms between a CPU and peripherals within the box = off-chip but on same PCB >> Unlike Asynchronous Serial comms like (RS-232), usually SPI sends or receives data Most Significant Bit (MSB) first!! (But, can be selectable in MSP430) --> Synchronous = shared clock (supplied by master) = Higher transfer speeds (~Mbps) MSP430 (master) SIMO SOMI GND SCLK some SPI device (slave) CS >> We'll be using 3 wire connection SIMO = Slave In/Master Out data line SOMI = Slave Out/Master In data line SCLK = Serial Clock (SCK in MSP430 USCI) (Plus, CS = Chip Select)

2 >> To use SPI the programmer must... 1) Enable USCI for SPI mode Including SELecting SPI data pins and SCLK pin for Function mode (= 1) 2) Select data format 3) Setup synchronous clock Then programmer must... 4) Select peripheral using its chip select (CS) Plus asserting any other digital IO/control lines that external device requires -- For LCD this is labeled SPI CS -- The LCD also needs to be turned turned on (LCD Power Control) and enabled

3 Let's look at the Sharp LCD Display... //*************************************************************** // HAL_MSP-EXP430F5529_Sharp96x96.h - Prototypes for the // Sharp96x96 LCD display driver. There is no output from // Sharp96x96 LCD. // *************************************************************** // // Pin definitions for LCD driver // //*************************************************************** /* * Power P6.5 // Digital IO * DISP P1.6 // Digital IO * CS P6.6 // Digital IO * MOSI P3.0 // Function mode USCI B0 * SCLK P3.2 // Function mode USCI B0 */ #define PORT_SPI_SEL #define PORT_SPI_DIR #define PORT_DISP_SEL #define PORT_DISP_DIR #define PORT_DISP_OUT #define PORT_CS_SEL #define PORT_CS_DIR #define PORT_CS_OUT #define PORT_PWR_SEL #define PORT_PWR_DIR #define PORT_PWR_OUT P3SEL P3DIR P1SEL P1DIR P1OUT P6SEL P6DIR P6OUT P6SEL P6DIR P6OUT #define PIN_SPI_MOSI #define PIN_SPI_SCLK #define PIN_PWR #define PIN_DISP #define PIN_CS #define SPI_REG_CTL0 #define SPI_REG_CTL1 #define SPI_REG_BRL #define SPI_REG_BRH #define SPI_REG_IFG #define SPI_REG_STAT #define SPI_REG_TXBUF #define SPI_REG_RXBUF BIT0 BIT2 BIT5 BIT6 BIT6 UCB0CTL0 UCB0CTL1 UCB0BR0 UCB0BR1 UCB0IFG UCB0STAT UCB0TXBUF UCB0RXBUF #define SPI_CLK_SRC (UCSSEL SMCLK) #define SPI_CLK_TICKS 0

4 void Sharp96x96_Init(void) { // Configure SCLK and MOSI for peripheral function mode = 1 PORT_SPI_SEL = (PIN_SPI_MOSI PIN_SPI_SCLK); // LCD is powered using a GPIO pin, configure it as output PORT_PWR_SEL &= ~PIN_PWR; PORT_PWR_DIR = PIN_PWR; // Drive the power pin high to power the LCD PORT_PWR_OUT = PIN_PWR; // Configure the LCD display enable signal DISP, // Drive it high to enable the LCD PORT_DISP_SEL &= ~PIN_DISP; PORT_DISP_DIR = PIN_DISP; PORT_DISP_OUT = PIN_DISP; // Configure the display Chip Select as an output PORT_CS_SEL &= ~PIN_CS; PORT_CS_DIR = PIN_CS; // Initialize the chip select in a deasserted state PORT_CS_OUT &= ~PIN_CS; // // Now configure UCSIB0 to function as our SPI controller // Disable the module before we can configure it SPI_REG_CTL1 = UCSWRST; // Reset the controller config parameters SPI_REG_CTL0 &= ~(UCCKPH UCCKPL UC7BIT UCMSB); / SPI_REG_CTL1 &= ~UCSSEL_3; // Reset the clock configuration // Select SMCLK for our clock source SPI_REG_CTL1 = SPI_CLK_SRC; // Set SPI clock frequency (which is the same frequency as // SMCLK so this can apparently be 0) // Set the low byte then set the high byte SPI_REG_BRL = ((uint16_t)spi_clk_ticks) & 0xFF; SPI_REG_BRH = (((uint16_t)spi_clk_ticks) >> 8) & 0xFF; // Configure for SPI master, synchronous, 3 wire SPI, // MSB first, capture data on first edge, // and inactive low polarity SPI_REG_CTL0 = (UCMST UCSYNC UCMODE_0 UCMSB UCCKPH); } // Re-enable the module s0 it can be used SPI_REG_CTL1 &= ~UCSWRST; SPI_REG_IFG &= ~UCRXIFG; // clear interrupt flag

5 Next program should... 5) Send or Receive data to/from the peripheral -- This code polls transfer complete bits to determine when data transfer complete (interrupts not enabled here... they could be) -- Also, reading from an SPI device often requires addresses or command words be sent. These will all be device specific The LCD uses the TI grlib in addition to device specific files It's a bit hidden in the demo code but to eventually the MSP430 must send data to the LCD one byte at a time and the transmission would be achieve by a function like the following where uccmddata is the byte currently being sent. write_spi(unsigned char uccmddata) { // Put byte to send in transmit TX buffer SPI_REG_TXBUF =uccmddata; } /* Wait for the TX buffer to empty */ while(!(spi_reg_ifg & UCTXIFG)) no_operation();

6 The LCD Screen's functions are already wrapped for us -- Sharp96x96_Init() is called at the beginning of our configdisplay() function which is called at the beginning of our demo project write_spi() functionality is buried underneath higher-level grlib functions like GrStringDrawCentered() So how do we deal with other SPI devices from scratch?? -- First thing we need to do is figure out how to use the device of interest! -- Our Lab Board has the MCP4921 SPI DAC Overview of a Digital-to-Analog Convert (DAC) >> Converts integer value to a voltage >> MCP4921 is 12-bit DAC that outputs voltages rail-to-rail (0 to Vcc)

7 >> DAC performs the inverse operation of an ADC Ex: Consider a the following DAC what is the value of the output voltage? >> To use SPI to run the DAC the programmer must... 1) Enable USCI for SPI mode 2) Select data format 3) Setup synchronous clock Isn't that what the LCD had to do to use SPI? Can't we just use that set up? >> YES! That's the whole idea behind SPI

ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #20: Using SPI The DAC

ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #20: Using SPI The DAC ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #20: Using SPI The DAC Reading for Today: Users Guide Ch 35, MCP4921, data sheet, on-line articles Reading for Next Class: Users

More information

Interfacing CMA3000-D01 to an MSP430 ultra low-power microcontroller

Interfacing CMA3000-D01 to an MSP430 ultra low-power microcontroller Interfacing CMA3000-D01 to an MSP430 ultra low-power microcontroller 1 INTRODUCTION The objective of this document is to show how to set up SPI/I2C communication between VTI Technologies CMA3000-D01 digital

More information

Interfacing CMR3000-D01 to an MSP430 ultra low-power microcontroller

Interfacing CMR3000-D01 to an MSP430 ultra low-power microcontroller Interfacing CMR3000-D01 to an MSP430 ultra low-power microcontroller 1 INTRODUCTION The objective of this document is to show how to set up SPI/I2C communication between VTI Technologies CMR3000-D01 digital

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

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

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I.

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I. University of Texas at El Paso Electrical and Computer Engineering Department EE 3176 Laboratory for Microprocessors I Fall 2016 LAB 08 UART Communication Goals: Learn about UART Communication and the

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

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

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

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

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

PIC Serial Peripheral Interface (SPI) to Digital Pot

PIC Serial Peripheral Interface (SPI) to Digital Pot Name Lab Section PIC Serial Peripheral Interface (SPI) to Digital Pot Lab 7 Introduction: SPI is a popular synchronous serial communication protocol that allows ICs to communicate over short distances

More information

CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview

CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview Aleksandar Milenkovic Electrical and Computer Engineering The University of Alabama in Huntsville milenka@ece.uah.edu

More information

4 Degrees of Freedom MEMS Sensor Improvements

4 Degrees of Freedom MEMS Sensor Improvements 4 Degrees of Freedom MEMS Sensor Improvements Design Document Name: Xin Zhou Yue Zhang Team Dec12-09 Ang Lv Nicholas Everett Jenn Grubb Advisor: Degang Chen Client: Bee Line Company Bob Last Updated: Dec

More information

ECE Microcontrollers. Serial Peripheral Interface (SPI) & NRF24 Radio

ECE Microcontrollers. Serial Peripheral Interface (SPI) & NRF24 Radio ECE 381 - Microcontrollers Serial Peripheral Interface (SPI) & NRF24 Radio Lab 9 Summary We will develop a wireless temperature sensor Once a second, sample LM34CZ voltage Convert to floating point with

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

ArduCAM-M-2MP Camera Shield

ArduCAM-M-2MP Camera Shield 33275-MP ArduCAM-M-2MP Camera Shield 2MP SPI Camera Hardware Application Note Rev 1.0, Mar 2015 33275-MP ArduCAM-M-2MP Hardware Application Note Table of Contents 1 Introduction... 2 2 Typical Wiring...

More information

PARALLEL COMMUNICATIONS

PARALLEL COMMUNICATIONS Parallel Data Transfer Suppose you need to transfer data from one HCS12 to another. How can you do this? You could connect PORTA of the sending computer (set up as an output port) to PORTA of the receiving

More information

CPE 323: MSP430 Serial Communication

CPE 323: MSP430 Serial Communication CPE 323: MSP430 Serial Communication Aleksandar Milenkovic Electrical and Computer Engineering The University of Alabama in Huntsville milenka@ece.uah.edu http://www.ece.uah.edu/~milenka Outline Introduction

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

In-Depth with MSP430 s New Communication Interfaces

In-Depth with MSP430 s New Communication Interfaces In-Depth with MSP430 s New Communication Interfaces Volker Rzehak MSP430 Systems Engineer Texas Instruments 2006 Texas Instruments Inc, Slide 1 Agenda USCI vs. USI Introduction to USI USI communication

More information

EEL 4924 Electrical Engineering Design (Senior Design) Team Baudiophile. Wireless Headphones

EEL 4924 Electrical Engineering Design (Senior Design) Team Baudiophile. Wireless Headphones EEL 4924 Electrical Engineering Design (Senior Design) Final Design Report 25 April 2012 Team Baudiophile Wireless Headphones Team Members: Name: Stephen Brewer Name: Eli Chen Project Abstract Our project

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

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

Microcontroller basics

Microcontroller basics FYS3240 PC-based instrumentation and microcontrollers Microcontroller basics Spring 2017 Lecture #4 Bekkeng, 30.01.2017 Lab: AVR Studio Microcontrollers can be programmed using Assembly or C language In

More information

UNIT IV SERIAL COMMUNICATIONS

UNIT IV SERIAL COMMUNICATIONS UNIT IV SERIAL COMMUNICATIONS Serial channels are the main form of communications used in digital systems nowadays. Diverse forms of serial communication formats and protocols can be found in applications

More information

HZX N03 Bluetooth 4.0 Low Energy Module Datasheet

HZX N03 Bluetooth 4.0 Low Energy Module Datasheet HZX-51822-16N03 Bluetooth 4.0 Low Energy Module Datasheet SHEN ZHEN HUAZHIXIN TECHNOLOGY LTD 2017.7 NAME : Bluetooth 4.0 Low Energy Module MODEL NO. : HZX-51822-16N03 VERSION : V1.0 1.Revision History

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

ECE2049-E18 Lecture 6 Notes 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review

ECE2049-E18 Lecture 6 Notes 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review ECE2049-E18 Lecture 6 Notes 1 ECE2049: Embedded Computing in Engineering Design E Term 2018 Lecture #6: Exam Review Administrivia Exam 1: Next Tuesday (6/5) HW4: Short assignment, due Tuesday Lab 1: Due

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

< 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

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #7: More Digital IO

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #7: More Digital IO ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #7: More Digital IO Reading for Today: Davies 7.5-7.9, Users Guide Ch 12 Reading for Next Class: Davies 7.5-7.9, Users Guide

More information

1.6inch SPI Module user manual

1.6inch SPI Module user manual 1.6inch SPI Module user manual www.lcdwiki.com 1 / 10 Rev1.0 Product Description The 1.6 module is tested using the ESP8266MOD D1 Mini development board, Both the test program and the dependent libraries

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

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

SPI (Serial & Peripheral Interface)

SPI (Serial & Peripheral Interface) SPI (Serial & Peripheral Interface) What is SPI SPI is a high-speed, full-duplex bus that uses a minimum of 3 wires to exchange data. The popularity of this bus rose when SD cards (and its variants ie:

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

Motherboard to MicroZed Interfaces

Motherboard to MicroZed Interfaces Motherboard to MicroZed Interfaces Excerpts and Thoughts on Various Interfaces Christopher Woodall Benjamin Havey ADC Data (Parallel) Interface Requirements

More information

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #9: Exam Review w/ Solutions

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #9: Exam Review w/ Solutions ECE2049: Embedded Computing in Engineering Design A Term Fall 2018 Lecture #9: Exam Review w/ Solutions Reading for Today: Review all reading and notes, Davies Ch 1, 2, 4,7, MSP430 User's Guide Ch 6.1,

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

063[[[0LFURFRQWUROOHUV 63,

063[[[0LFURFRQWUROOHUV 63, 63[[[LFURFRQWUROOHUV 63, CPE 621 Advanced Microcomputer Techniques Dr. Emil Jovanov 6HULDO3HULSKHUDO,QWHUIDFH3URWRFRO USART s SPI features: Control bit SYNC in UCTL is set to select synchronous mode Supports

More information

PSIM Tutorial. How to Use SPI in F2833x Target. February Powersim Inc.

PSIM Tutorial. How to Use SPI in F2833x Target. February Powersim Inc. PSIM Tutorial How to Use SPI in F2833x Target February 2013-1 - Powersim Inc. With the SimCoder Module and the F2833x Hardware Target, PSIM can generate ready-to-run codes for DSP boards that use TI F2833x

More information

ECE2049-E17 Lecture 6 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review

ECE2049-E17 Lecture 6 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review ECE2049-E17 Lecture 6 1 ECE2049: Embedded Computing in Engineering Design E Term 2017 Lecture #6: Exam Review Administrivia Exam 1: Next Tuesday (6/6) HW2: Due Tonight at 7pm Lab 1: Due next Tuesday (6/6),

More information

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang, Network Embedded Systems Sensor Networks Fall 2013 Hardware Marcus Chang, mchang@cs.jhu.edu 1 Embedded Systems Designed to do one or a few dedicated and/or specific functions Embedded as part of a complete

More information

ECE 471 Embedded Systems Lecture 20

ECE 471 Embedded Systems Lecture 20 ECE 471 Embedded Systems Lecture 20 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 20 October 2017 Announcements Project coming Only one person was in class Wednesday due to Career

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

In this module we ll take a look at the MSP430 communications modules and the protocols that can be implemented over them.

In this module we ll take a look at the MSP430 communications modules and the protocols that can be implemented over them. Communication Introduction In this module we ll take a look at the MSP430 communications modules and the protocols that can be implemented over them. Objectives USART USCI USI MSP430 One Day Workshop -

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

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

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

SPI: Serial Peripheral Interface

SPI: Serial Peripheral Interface ECE3411 Fall 2015 Lab 6c. SPI: Serial Peripheral Interface Marten van Dijk, Syed Kamran Haider Department of Electrical & Computer Engineering University of Connecticut Email: {vandijk, syed.haider}@engr.uconn.edu

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

volatile int results[5]; // variables para la interrupcion del acelerometro //Funciones del acelerometro para mandar y recibir información

volatile int results[5]; // variables para la interrupcion del acelerometro //Funciones del acelerometro para mandar y recibir información Anexo A. Código de programación #include #include #include "lcdlib.h" // variables para guardar informacion de los canales analógicos volatile int results[5]; // variables para la interrupcion

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

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

SPI Universal Serial Communication Interface SPI Mode

SPI Universal Serial Communication Interface SPI Mode SPI Universal Serial Communication Interface SPI Mode Serial Peripheral Interface (SPI) is not really a protocol, but more of a general idea. It s the bare-minimum way to transfer a lot of data between

More information

2.996/6.971 Biomedical Devices Design Laboratory Lecture 6: Microprocessors II

2.996/6.971 Biomedical Devices Design Laboratory Lecture 6: Microprocessors II 2.996/6.971 Biomedical Devices Design Laboratory Lecture 6: Microprocessors II Instructor: Dr. Hong Ma Oct. 1, 2007 Structure of MSP430 Program 1. Declarations 2. main() 1. Watch-dog timer servicing 2.

More information

ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class)

ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class) ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class) Your homework should be neat and professional looking. You will loose points if your HW is not properly

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

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

Getting Started with ESPI Interface Using the Z8 Encore! XP F1680

Getting Started with ESPI Interface Using the Z8 Encore! XP F1680 Application Note Getting Started with ESPI Interface Using the Z8 Encore! XP F1680 AN027301-0308 Abstract This application note demonstrates how to use the Enhanced Serial Peripheral Interface (ESPI) in

More information

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O ECE2049-E17 Lecture 4 1 ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O Administrivia Homework 1: Due today by 7pm o Either place in box in ECE office or give to me o Office hours tonight!

More information

Marten van Dijk Department of Electrical & Computer Engineering University of Connecticut

Marten van Dijk Department of Electrical & Computer Engineering University of Connecticut ECE3411 Fall 2016 Wrap Up Review Session Marten van Dijk Department of Electrical & Computer Engineering University of Connecticut Email: marten.van_dijk@uconn.edu Slides are copied from Lecture 7b, ECE3411

More information

In this module we ll take a look at the MSP430 communications modules and the protocols that can be implemented over them.

In this module we ll take a look at the MSP430 communications modules and the protocols that can be implemented over them. Communication Introduction In this module we ll take a look at the MSP430 communications modules and the protocols that can be implemented over them. Objectives USART USCI USI MSP430 One Day Workshop -

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

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

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

Color 7 click. PID: MIKROE 3062 Weight: 19 g

Color 7 click. PID: MIKROE 3062 Weight: 19 g Color 7 click PID: MIKROE 3062 Weight: 19 g Color 7 click is a very accurate color sensing Click board which features the TCS3472 color light to digital converter with IR filter, from ams. It contains

More information

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #8: Making it work: LEDs, Buttons & Keypad

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #8: Making it work: LEDs, Buttons & Keypad ECE2049: Embedded Computing in Engineering Design A Term Fall 2018 Lecture #8: Making it work: LEDs, Buttons & Keypad Reading for Today: Users Guide Ch 12 Reading for Next Class: Review all reading, notes,

More information

From Datasheets to Digital Logic. synthesizing an FPGA SPI slave from the gates

From Datasheets to Digital Logic. synthesizing an FPGA SPI slave from the gates From Datasheets to Digital Logic synthesizing an FPGA SPI slave from the gates Joshua Vasquez March 26, 2015 The Road Map Top-Level Goal Motivation What is SPI? SPI Topology SPI Wiring SPI Protocol* Defining

More information

Serial communications with SPI

Serial communications with SPI Serial communications with SPI DRAFT VERSION - This is part of a course slide set, currently under development at: http://mbed.org/cookbook/course-notes We welcome your feedback in the comments section

More information

Embedded Systems. 3. Hardware Software Interface. Lothar Thiele. Computer Engineering and Networks Laboratory

Embedded Systems. 3. Hardware Software Interface. Lothar Thiele. Computer Engineering and Networks Laboratory Embedded Systems 3. Hardware Software Interface Lothar Thiele Computer Engineering and Networks Laboratory Do you Remember? 3 2 3 3 High Level Physical View 3 4 High Level Physical View 3 5 What you will

More information

ECE251: Thursday November 8

ECE251: Thursday November 8 ECE251: Thursday November 8 Universal Asynchronous Receiver & Transmitter Text Chapter 22, Sections 22.1.1-22.1.4-read carefully TM4C Data Sheet Section 14-no need to read this A key topic but not a lab

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

Marten van Dijk, Syed Kamran Haider

Marten van Dijk, Syed Kamran Haider ECE3411 Fall 2015 Wrap Up Review Session Marten van Dijk, Syed Kamran Haider Department of Electrical & Computer Engineering University of Connecticut Email: vandijk, syed.haider@engr.uconn.edu Pulse Width

More information

Introduction to I2C & SPI. Chapter 22

Introduction to I2C & SPI. Chapter 22 Introduction to I2C & SPI Chapter 22 Issues with Asynch. Communication Protocols Asynchronous Communications Devices must agree ahead of time on a data rate The two devices must also have clocks that are

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

DEVBOARD3 DATASHEET. 10Mbits Ethernet & SD card Development Board PIC18F67J60 MICROCHIP

DEVBOARD3 DATASHEET. 10Mbits Ethernet & SD card Development Board PIC18F67J60 MICROCHIP DEVBOARD3 DATASHEET 10Mbits Ethernet & SD card PIC18F67J60 MICROCHIP Version 1.0 - March 2009 DEVBOARD3 Version 1.0 March 2009 Page 1 of 7 The DEVBOARD3 is a proto-typing board used to quickly and easily

More information

Prototyping Module Datasheet

Prototyping Module Datasheet Prototyping Module Datasheet Part Numbers: MPROTO100 rev 002 Zenseio LLC Updated: September 2016 Table of Contents Table of Contents Functional description PROTOTYPING MODULE OVERVIEW FEATURES BLOCK DIAGRAM

More information

Microcontrollers and Interfacing week 10 exercises

Microcontrollers and Interfacing week 10 exercises 1 SERIAL PERIPHERAL INTERFACE (SPI) HARDWARE Microcontrollers and Interfacing week 10 exercises 1 Serial Peripheral Interface (SPI) hardware Complex devices (persistent memory and flash memory cards, D/A

More information

임베디드시스템기초 (# ) #11. Serial Communications 한림대학교전자공학과이선우

임베디드시스템기초 (# ) #11. Serial Communications 한림대학교전자공학과이선우 임베디드시스템기초 (#514115 ) #11. Serial Communications 한림대학교전자공학과이선우 Contents General Serial communications Asynchronous serial communications (UART) 2 Parallel vs. Serial 패러럴 ( 병렬 ) 데이터통신 복수의신호선을이용 ( 대개 8/16/32bit)

More information

3.2inch SPI Module MSP3218 User Manual

3.2inch SPI Module MSP3218 User Manual 3.2inch SPI Module MSP3218 User Manual www.lcdwiki.com 1 / 23 Rev1.0 Product Description The LCD module uses a 4-wire SPI communication method with a driver IC of ILI9341 with a resolution of 240x320 and

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

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

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

19.1. Unit 19. Serial Communications

19.1. Unit 19. Serial Communications 9. Unit 9 Serial Communications 9.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. µc Device

More information

Groking the Linux SPI Subsystem FOSDEM Matt Porter

Groking the Linux SPI Subsystem FOSDEM Matt Porter Groking the Linux SPI Subsystem FOSDEM 2017 Matt Porter Obligatory geek reference deobfuscation grok (/gräk/) verb to understand intuitively or by empathy, to establish rapport with. Overview What is SPI?

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

11.4 THE SERIAL PERIPHERAL INTERFACE (SPI)

11.4 THE SERIAL PERIPHERAL INTERFACE (SPI) Synchronous Serial IO 331 TRISC6 TRISC[6] Must be 0 so that RC6/TX/CK pin is an output. TRISC7 TRISC[7] Must be 1 so that RC7/RX/DT pin is an input. 11.4 THE SERIAL PERIPHERAL INTERFACE (SPI) The Serial

More information

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

Pmod modules are powered by the host via the interface s power and ground pins. 1300 Henley Court Pullman, WA 99163 509.334.6306 www.store. digilent.com Digilent Pmod Interface Specification 1.2.0 Revised October 5, 2017 1 Introduction The Digilent Pmod interface is used to connect

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

ELET114A Bluetooth Module DATASHEET. Website:http://www.elinketone.com / 7

ELET114A Bluetooth Module DATASHEET. Website:http://www.elinketone.com / 7 Bluetooth Module DATASHEET Website:http://www.elinketone.com 2013 06 09 1 / 7 A. Overview Bluetooth Module is designed by ShenZhen ElinkEtone Technology Company for intelligent wireless transmission, with

More information

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.

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. Key Design Features Block Diagram Synthesizable, technology independent IP Core for FPGA, ASIC and SoC reset Supplied as human readable VHDL (or Verilog) source code mast_sel SPI serial-bus compliant Supports

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

Pmod I2S2 Reference Manual

Pmod I2S2 Reference Manual Pmod I2S2 Reference Manual The Digilent Pmod I2S2 (Revision A) features a Cirrus CS5343 Multi Bit Audio A/D Converter and a Cirrus CS4344 Stereo D/A Converter, each connected to one of two audio jacks.

More information

MSP430 Microcontroller Basics

MSP430 Microcontroller Basics MSP430 Microcontroller Basics John H. Davies AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE SYDNEY TOKYO Newnes is an imprint of Elsevier N WPIGS Contents Preface

More information

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #11: More Clocks and Timers

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #11: More Clocks and Timers ECE2049: Embedded Computing in Engineering Design C Term Spring 2018 Lecture #11: More Clocks and Timers Reading for Today: Davie's Ch 8.3-8.4, 8.9-8.10, User's Guide Ch. 17 Reading for Next Class: User's

More information

SKB360I Bluetooth 4.0 Low Energy Module Datasheet

SKB360I Bluetooth 4.0 Low Energy Module Datasheet SKB360I Bluetooth 4.0 Low Energy Module Datasheet Name: Bluetooth 4.0 Low Energy Module Model No.: SKB360I Version: V1.01 Revision History: Revision Description Approved Date V1.01 Initial Release Hogan

More information

AN HI-3200 Avionics Data Management Engine Evaluation Board Software Guide

AN HI-3200 Avionics Data Management Engine Evaluation Board Software Guide August 12, 2011 AN - 166 HI-3200 Avionics Data Management Engine Evaluation Board Software Guide Introduction This application note provides more detail on the HI-3200 demo software provided in the Holt

More information