Distributed Real- Time Control Systems

Size: px
Start display at page:

Download "Distributed Real- Time Control Systems"

Transcription

1 Distributed Real- Time Control Systems Lecture 4 Embedded Systems Communica:ons A. Bernardino, C. Silvestre, IST- ACSDC 1

2 Interfaces I/O Digital I/O Analog Input PWM Serial SPI TWI A. Bernardino, C. Silvestre, IST- ACSDC 2

3 Asynchronous Serial Communica:ons The asyncrononous serial communica:ons protocol allows to communicate with a wide range of devices: Dial- up modems. Computer mouse and keyboards GPS devices LCDs MIDI etc Simple and cost effec:ve. No clock is required and the data link can be reduced to three wires (RX, TX, GND). Electrical implementa:ons: Raw (TTL) RS232- C (PC serial) RS485 - Twisted cable, current signaling, large distances. A. Bernardino, C. Silvestre, IST- ACSDC 3

4 Transmission Protocol Frame structure Configura:ons Full or half- duplex Number of bits per character (5-9) Order in which bits are sent (endianness) Bits per second ( K ) Parity (Odd, Even, None) Number of stop bits (1-2) A. Bernardino, C. Silvestre, IST- ACSDC 4

5 ATMEL 328 USART USART connected to pins 0 (Rx) and 1 (Tx). Full Duplex Opera:on (Independent Serial Receive and Transmit Registers) Asynchronous or Synchronous Opera:on Master or Slave Clocked Synchronous Opera:on High Resolu:on Baud Rate Generator Supports Serial Frames with 5, 6, 7, 8, or 9 Data Bits and 1 or 2 Stop Bits Odd or Even Parity Genera:on and Parity Check Supported by Hardware Data OverRun Detec:on Framing Error Detec:on Noise Filtering Includes False Start Bit Detec:on and Digital Low Pass Filter Three Separate Interrupts on TX Complete, TX Data Register Empty and RX Complete Mul:- processor Communica:on Mode Double Speed Asynchronous Communica:on Mode A. Bernardino, C. Silvestre, IST- ACSDC 5

6 Example: Reading RFID tags RFID Tags are small devices that transmit data wirelessly and without contact from a tag adached to an object. They can be passive, responding when subject to an electromagne:c field, or ac:ve, powered with small bateries. They are used for mul:ple purposes: Tracking goods Access control Automa:c payment Passports and ID documents A. Bernardino, C. Silvestre, IST- ACSDC 6

7 Example: Reading RFID tags A tag consists of a start character followed by a 10- digit tag and is terminated by an end character. Example: Parallax RFID reader: const int startbyte = 10; const int endbyte = 13; const int taglength = 10; const int totallength = taglength + 2; char tag[taglength + 1]; int bytesread = 0; void setup() { Serial.begin(2400); // set to the baud rate of your RFID reader pinmode(2,output); // connected to the RFID ENABLE pin digitalwrite(2, LOW); // enable the RFID reader void loop() { if(serial.available() >= totallength) // check if enough data { if(serial.read() == startbyte) { bytesread = 0; // start of tag so reset count to 0 while(bytesread < taglength) // read 10 digit code { int val = Serial.read(); if((val == startbyte) (val == endbyte)) // end of code break; tag[bytesread] = val; bytesread = bytesread + 1; // ready to read next digit if( Serial.read() == endbyte) // check end character { tag[bytesread] = 0; // terminate the string Serial.print("RFID tag is: "); Serial.println(tag); A. Bernardino, C. Silvestre, IST- ACSDC 7

8 Example: Playing MIDI MIDI allows mul:ple instruments to be played from a single controller. const byte notes[8] = {60, 62, 64, 65, 67, 69, 71, 72; const int length = 8; const int switchpin = 2; void setup() { Serial.begin(31250); pinmode(switchpin, INPUT); digitalwrite(switchpin, HIGH); void loop() { if (digitalread(switchpin == LOW)) { for (byte notenumber = 0; notenumber < 8; notenumber++) { playmidinote(1, notes[notenumber], 127); delay(70); playmidinote(1, notes[notenumber], 0); //MUTE delay(30); void playmidinote(byte channel, byte note, byte velocity) { byte midimessage= 0x90 + (channel - 1); //play on channel 1 Serial.write(midiMessage); Serial.write(note); Serial.write(velocity); //volume A. Bernardino, C. Silvestre, IST- ACSDC 8

9 Soqware Serial Ports To use mul:ple serial devices (e.g. to communicate with a serial device and the host computer), Soqware serial ports can be used. Soqware serial ports are regular I/O ports that implement the serial protocol in Soqware. Use library SoqwareSerial A. Bernardino, C. Silvestre, IST- ACSDC 9

10 Example: Serial LCD #include <SoqwareSerial.h> const int rxpin = 2; // pin used to receive (not used) const int txpin = 3; // pin used to send to LCD SoqwareSerial serial_lcd(rxpin, txpin); // on pins 2 and 3 void setup() { Serial.begin(9600); // 9600 baud for the built- in serial port serial_lcd.begin(9600); //soqware serial port also for 9600 int number = 0; void loop() { serial_lcd.print("the number is "); // send text to the LCD serial_lcd.println(number); // print the number on the LCD Serial.print("The number is "); Serial.println(number); // print the number on the PC console delay(500); // delay half second between numbers number++; // to the next number A. Bernardino, C. Silvestre, IST- ACSDC 10

11 I2C and SPI Busses I2C Inter- Integrated Circuit Also known as TWI (two wire interface) Two wires (clock+data), half- duplex, require pull- ups, for low- data rate devices (sensors) Level Triggered Use Acknowledge Reduced Noise Immunity SPI Serial Peripheral Interface Also Known as SSI (syncronous serial interface). SPI Full- duplex, for high- data raterequirements (e.g. ethernet). Edge Triggered No Acknowledge Good Noise Immunity A. Bernardino, C. Silvestre, IST- ACSDC 11

12 I2C Connec:ons Only one master (typicaly the arduino), mul:ple slaves. Each slave must have a unique address (7 bit typ.). SCL Serial control line SDA Serial data line A. Bernardino, C. Silvestre, IST- ACSDC 12

13 I2C Timing Diagram A. Bernardino, C. Silvestre, IST- ACSDC 13

14 I2C Protocol A. Bernardino, C. Silvestre, IST- ACSDC 14

15 SPI Connec:ons Use slave select lines. Do not require pull- ups. SCLK - serial clock (output from master); MOSI: master output, slave input (output from master); MISO: master input, slave output (output from slave); SS: slave select (ac:ve low, output from master). A. Bernardino, C. Silvestre, IST- ACSDC 15

16 SPI Timing Diagram A. Bernardino, C. Silvestre, IST- ACSDC 16

17 Using the Wii Nunchunk The Wii Nunchunk uses I2C bus. Uses Wire Library. Nunchunk: No datasheet but was reverse engineered. #include <Wire.h> // ini:alize wire const int vccpin = A3; // +v provided by pin 17 const int gndpin = A2; // gnd provided by pin 16 const int datalength = 6; // number of bytes to request sta:c byte rawdata[datalength]; // array to store nunchuck data enum nunchuckitems { joyx, joyy, accelx, accely, accelz, btnz, btnc ; void setup() { pinmode(gndpin, OUTPUT); // set power pins pinmode(vccpin, OUTPUT); digitalwrite(gndpin, LOW); digitalwrite(vccpin, HIGH); delay(100); // wait for things to stabilize Serial.begin(9600); nunchuckinit(); void nunchuckinit(){ Wire.begin(); // join i2c bus as master Wire.beginTransmission(0x52);// transmit to device 0x52 Wire.write((byte)0x40); // sends memory address Wire.write((byte)0x00); // sends sent a zero. Wire.endTransmission(); // stop transmiwng A. Bernardino, C. Silvestre, IST- ACSDC 17

18 Using the Wii Nunchunk (cont) void loop(){ nunchuckread(); int accelera:on = getvalue(accelx); if((accelera:on >= 75) && (accelera:on <= 185)) { //map returns a value from 0 to 63 for values from 75 to 185 byte x = map(accelera:on, 75, 185, 0, 63); Serial.write(x); delay(20); // the :me in milliseconds between redraws boolean nunchuckread(){ int cnt=0; Wire.requestFrom (0x52, datalength); // request data while (Wire.available ()) { rawdata[cnt] = nunchuckdecode(wire.read()); cnt++; nunchuckrequest(); // send request for next data payload if (cnt >= datalength) return true; // if all 6 bytes received else return false; //failure int getvalue(int item){ if (item <= accelz) return (int)rawdata[item]; else if (item == btnz) return bitread(rawdata[5], 0)? 0: 1; else if (item == btnc) return bitread(rawdata[5], 1)? 0: 1; // Encode data to format that most wiimote drivers accept sta:c char nunchuckdecode (byte x) { return (x ^ 0x17) + 0x17; // Send a request for data to the nunchuck sta:c void nunchuckrequest(){ Wire.beginTransmission(0x52);// transmit to device 0x52 Wire.write((byte)0x00); // sends one byte Wire.endTransmission(); // stop transmiwng A. Bernardino, C. Silvestre, IST- ACSDC 18

19 Driving 7- Segment Displays The MAX7221 A. Bernardino, C. Silvestre, IST- ACSDC 19

20 Driving 7- Segment Displays #include <SPI.h> const int slaveselect = 10; // pin used to enable the ac:ve slave const int numberofdigits = 2; // change to match desired const int maxcount = 99; int count = 0; void setup() { SPI.begin(); // ini:alize SPI pinmode(slaveselect, OUTPUT); digitalwrite(slaveselect,low); // select slave // prepare the 7221 to display 7- segment data - see data sheet sendcommand(12,1); // normal mode (default is shutdown) sendcommand(15,0); // Display test off sendcommand(10,8); // set medium intensity (range is 0-15) sendcommand(11,numberofdigits); // 7221 digit scan limit sendcommand(9,255); // use standard 7- segment digits digitalwrite(slaveselect,high); // deselect slave void loop() { displaynumber(count); count = count + 1; if (count > maxcount) count = 0; delay(100); // func:on to display up to four digits on a 7- segment display void displaynumber( int number) { for (int i = 0; i < numberofdigits; i++) { byte character = number % 10; // rightmost decade // send digit number as command, first digit is command 1 sendcommand(numberofdigits- i, character); number = number / 10; void sendcommand( int command, int value) { digitalwrite(slaveselect,low); // chip select is ac:ve low // 2 byte data transfer to the 7221 SPI.transfer(command); SPI.transfer(value); digitalwrite(slaveselect,high); // release chip, signal end A. Bernardino, C. Silvestre, IST- ACSDC 20

21 Other I2C and SPI devices Port Expanders Digital Thermometers External Real- Time Clocks External EEPROM 7- Segment leds LED drivers Mul:plexers ADC, DAC Pressure Sensors Ethernet controllers CAN controllers UART Digital Poten:ometers Flash Memories Touch screen controllers Audio Mixers Sample Rate Converters A. Bernardino, C. Silvestre, IST- ACSDC 21

22 Connect Two Arduinos with I2C Master- Slave A. Bernardino, C. Silvestre, IST- ACSDC 22

23 The Master The master sends characters received on the serial port to an Arduino slave using I2C. #include <Wire.h> const int address = 4; // the address to be used by the communica:ng devices void setup() { Wire.begin(); void loop() { char c; if(serial.available() > 0 ) { // send the data Wire.beginTransmission(address); // transmit to device Wire.write(c); Wire.endTransmission(); A. Bernardino, C. Silvestre, IST- ACSDC 23

24 The Slave The slave prints characters received over I2C to its serial port: #include <Wire.h> const int address = 4; // the address to be used by the communica:ng devices void setup() { Serial.begin(9600); Wire.begin(address); // join I2C bus using this address Wire.onReceive(receiveEvent); // register event to handle requests void loop() { // nothing here, all the work is done in receiveevent void receiveevent(int howmany) { while(wire.available() > 0) { char c = Wire.read(); // receive byte as a character Serial.write(c); // echo A. Bernardino, C. Silvestre, IST- ACSDC 24

Distributed Real-Time Control Systems. Lecture 11 Data Communication

Distributed Real-Time Control Systems. Lecture 11 Data Communication Distributed Real-Time Control Systems Lecture 11 Data Communication 1 Some History Soemmerring Electrical Telegraph, 1810 One line per letter and numerals Few Kilometers Electric current produces hidrogen

More information

Distributed Real- Time Control Systems. Lecture 9 Data Communication

Distributed Real- Time Control Systems. Lecture 9 Data Communication Distributed Real- Time Control Systems Lecture 9 Data Communication 1 Some History Soemmerring Electrical Telegraph, 1810 One line per letter and numerals Few Kilometers Electric current produces hidrogen

More information

Laboratory 5 Communication Interfaces

Laboratory 5 Communication Interfaces Laboratory 5 Communication Interfaces Embedded electronics refers to the interconnection of circuits (micro-processors or other integrated circuits) with the goal of creating a unified system. In order

More information

Sensors III.... Awaiting... Jens Dalsgaard Nielsen - 1/25

Sensors III.... Awaiting... Jens Dalsgaard Nielsen - 1/25 Sensors III... Awaiting... Jens Dalsgaard Nielsen - 1/25 NTC resume which end of curve? Accuracy Selection of R, R ntc Jens Dalsgaard Nielsen - 2/25 NTC II - simple version http://www.control.aau.dk/~jdn/edu/doc/datasheets/ntccode/

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

ADC to I 2 C. Data Sheet. 10 Channel Analog to Digital Converter. with output via I 2 C

ADC to I 2 C. Data Sheet. 10 Channel Analog to Digital Converter. with output via I 2 C Data Sheet 10 Channel Analog to Digital Converter with output via I 2 C Introduction Many microcontroller projects involve the use of sensors like Accelerometers, Gyroscopes, Temperature, Compass, Barometric,

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

Copyright. Getting Started with Arduino Wiring for Windows 10 IoT Core Agus Kurniawan 1st Edition, Copyright 2016 Agus Kurniawan

Copyright. Getting Started with Arduino Wiring for Windows 10 IoT Core Agus Kurniawan 1st Edition, Copyright 2016 Agus Kurniawan Copyright Getting Started with Arduino Wiring for Windows 10 IoT Core Agus Kurniawan 1st Edition, 2016 Copyright 2016 Agus Kurniawan ** Windows 10 IoT Core, Visual Studio and Logo are trademark and copyright

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

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

Embedded Workshop 10/28/15 Rusty Cain

Embedded Workshop 10/28/15 Rusty Cain 2 IC Embedded Workshop 10/28/15 Rusty Cain Set up for Workshop: Please Sign in on Sheet. Please include your email. While you are waiting for the Workshop to begin 1. Make sure you are connected to the

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

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

keyestudio Keyestudio MEGA 2560 R3 Board

keyestudio Keyestudio MEGA 2560 R3 Board Keyestudio MEGA 2560 R3 Board Introduction: Keyestudio Mega 2560 R3 is a microcontroller board based on the ATMEGA2560-16AU, fully compatible with ARDUINO MEGA 2560 REV3. It has 54 digital input/output

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

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

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

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

Sten-SLATE ESP. Accelerometer and I2C Bus

Sten-SLATE ESP. Accelerometer and I2C Bus Sten-SLATE ESP Accelerometer and I2C Bus Stensat Group LLC, Copyright 2016 I2C Bus I2C stands for Inter-Integrated Circuit. It is a serial type interface requiring only two signals, a clock signal and

More information

Arduino Uno R3 INTRODUCTION

Arduino Uno R3 INTRODUCTION Arduino Uno R3 INTRODUCTION Arduino is used for building different types of electronic circuits easily using of both a physical programmable circuit board usually microcontroller and piece of code running

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

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

ARDUINO LEONARDO ETH Code: A000022

ARDUINO LEONARDO ETH Code: A000022 ARDUINO LEONARDO ETH Code: A000022 All the fun of a Leonardo, plus an Ethernet port to extend your project to the IoT world. You can control sensors and actuators via the internet as a client or server.

More information

Workshop on Microcontroller Based Project Development

Workshop on Microcontroller Based Project Development Organized by: EEE Club Workshop on Microcontroller Based Project Development Presented By Mohammed Abdul Kader Assistant Professor, Dept. of EEE, IIUC Email:kader05cuet@gmail.com Website: kader05cuet.wordpress.com

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

ELE492 Embedded System Design

ELE492 Embedded System Design Overview ELE9 Embedded System Design Examples of Human I/O Interfaces Types of System Interfaces Use of standards RS Serial Communication Overview of SPI, I C, L, and CAN Class //0 Eugene Chabot Examples

More information

I2C interface Tutorial

I2C interface Tutorial UG108: Praxis II January 2013 Asian Institute of Technology Undergraduate Program Handout: I2C interface Instructor: Chaiyaporn Silawatchananai, Matthew N. Dailey I2C interface Tutorial Introduction: In

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

TMP100 Temperature Sensor (SKU:TOY0045)

TMP100 Temperature Sensor (SKU:TOY0045) TMP100 Temperature Sensor (SKU:TOY0045) Contents 1 Introduction 1.1 Applications 1.2 Specification 2 Documents 3 Diagram 3.1 More details 4 TMP100 Rsgister Introduction 4.1 Address Pins and Slave Addresses

More information

RS485 3 click. How does it work? PID: MIKROE-2821

RS485 3 click. How does it work? PID: MIKROE-2821 RS485 3 click PID: MIKROE-2821 RS485 3 click is an RS422/485 transceiver Click board, which can be used as an interface between the TTL level UART and the RS422/485 communication bus. It features a full-duplex

More information

Innovati s Bluetooth 100M Universal Wireless Bluetooth Module

Innovati s Bluetooth 100M Universal Wireless Bluetooth Module Innovati s Bluetooth 100M Universal Wireless Bluetooth Module Bluetooth 100M module is a simple to use Bluetooth module, command control through a simple UART Tx and Rx which are connected to other Bluetooth

More information

ARDUINO MICRO WITHOUT HEADERS Code: A000093

ARDUINO MICRO WITHOUT HEADERS Code: A000093 ARDUINO MICRO WITHOUT HEADERS Code: A000093 Arduino Micro is the smallest board of the family, easy to integrate it in everyday objects to make them interactive. The Micro is based on the ATmega32U4 microcontroller

More information

Design with Microprocessors

Design with Microprocessors Design with Microprocessors Year III Computer Science 1-st Semester Lecture 6: Serial data transfer Serial Interfaces on AVR Universal Synchronous and Asynchronous serial Receiver and Transmitter (USART)

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

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

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

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

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

Arduino EEPROM module 512K for Sensor Shield

Arduino EEPROM module 512K for Sensor Shield Arduino EEPROM module 512K for Sensor Shield Experiment Steps This is a new designed for small data size storage. It can help to extend the EEPROM storage of Arduino. This module uses I2C to connect to

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

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

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

Design with Microprocessors

Design with Microprocessors Design with Microprocessors Year III Computer Science 1-st Semester Lecture 6: Serial data transfer Serial Interfaces on AVR Universal Synchronous and Asynchronous serial Receiver and Transmitter (USART)

More information

By: Haron Abdel-Raziq

By: Haron Abdel-Raziq By: Haron Abdel-Raziq We noticed the struggle with Lab 2 Lab 2 is now due on October 5 th Milestone 2 is Due on October 12 th Next week (Monday) there is an FPGA lecture Will be given by Professor Bruce

More information

Arduino ADK Rev.3 Board A000069

Arduino ADK Rev.3 Board A000069 Arduino ADK Rev.3 Board A000069 Overview The Arduino ADK is a microcontroller board based on the ATmega2560 (datasheet). It has a USB host interface to connect with Android based phones, based on the MAX3421e

More information

Distributed Real- Time Control Systems

Distributed Real- Time Control Systems Distributed Real- Time Control Systems Lecture 2 Embedded Systems Basics A. Bernardino, C. Silvestre, IST- ACSDC 1 What are embedded systems? Small computers to efficiently address specific purposes, e.g.

More information

Digital Circuits Part 2 - Communication

Digital Circuits Part 2 - Communication Introductory Medical Device Prototyping Digital Circuits Part 2 - Communication, http://saliterman.umn.edu/ Department of Biomedical Engineering, University of Minnesota Topics Microcontrollers Memory

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

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front Arduino Uno Arduino Uno R3 Front Arduino Uno R2 Front Arduino Uno SMD Arduino Uno R3 Back Arduino Uno Front Arduino Uno Back Overview The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet).

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

Arduino Prof. Dr. Magdy M. Abdelhameed

Arduino Prof. Dr. Magdy M. Abdelhameed Course Code: MDP 454, Course Name:, Second Semester 2014 Arduino What is Arduino? Microcontroller Platform Okay but what s a Microcontroller? Tiny, self-contained computers in an IC Often contain peripherals

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

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

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Design of Microprocessor-Based Systems EECS 7 Design of Microprocessor-Based Systems Matt Smith University of Michigan Serial buses, digital design Material taken from Brehob, Dutta, Le, Ramadas, Tikhonov & Mahal 1 Timer Program //Setup Timer

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

ARDUINO MEGA ADK REV3 Code: A000069

ARDUINO MEGA ADK REV3 Code: A000069 ARDUINO MEGA ADK REV3 Code: A000069 OVERVIEW The Arduino MEGA ADK is a microcontroller board based on the ATmega2560. It has a USB host interface to connect with Android based phones, based on the MAX3421e

More information

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform. Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform www.sierraradio.net www.hamstack.com Topics Introduction Hardware options Software development HamStack project

More information

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

Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications o Asynchronous Serial (SCI, RS-232) o Synchronous Serial (SPI, IIC) The MC9S12

More information

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

OUTLINE. SPI Theory SPI Implementation STM32F0 SPI Resources System Overview Registers SPI Application Initialization Interface Examples SERIAL PERIPHERAL INTERFACE (SPI) George E Hadley, Timothy Rogers, and David G Meyer 2018, Images Property of their Respective Owners OUTLINE SPI Theory SPI Implementation STM32F0 SPI Resources System

More information

ARDUINO LEONARDO WITH HEADERS Code: A000057

ARDUINO LEONARDO WITH HEADERS Code: A000057 ARDUINO LEONARDO WITH HEADERS Code: A000057 Similar to an Arduino UNO, can be recognized by computer as a mouse or keyboard. The Arduino Leonardo is a microcontroller board based on the ATmega32u4 (datasheet).

More information

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Design of Microprocessor-Based Systems EECS 373 Design of Microprocessor-Based Systems Mark Brehob University of Michigan Timers Material taken from Dreslinski, Dutta, Le, Ramadas, Smith, Tikhonov & Mahal 1 Agenda A bit on timers Project overview

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

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

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

Nano RK And Zigduino. wnfa ta course hikaru4

Nano RK And Zigduino. wnfa ta course hikaru4 Nano RK And Zigduino wnfa ta course hikaru4 Today's outline Zigduino v.s. Firefly Atmel processor and the program chip I/O Interface on the board Atmega128rfa1, FTDI chip... GPIO, ADC, UART, SPI, I2C...

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

ESPino - Specifications

ESPino - Specifications ESPino - Specifications Summary Microcontroller ESP8266 (32-bit RISC) WiFi 802.11 (station, access point, P2P) Operating Voltage 3.3V Input Voltage 4.4-15V Digital I/O Pins 9 Analog Input Pins 1 (10-bit

More information

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Design of Microprocessor-Based Systems EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 10: Serial buses October 2, 2014 Some material from: Brehob, Le, Ramadas, Tikhonov & Mahal 1 Announcements Special

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

ARDUINO YÚN MINI Code: A000108

ARDUINO YÚN MINI Code: A000108 ARDUINO YÚN MINI Code: A000108 The Arduino Yún Mini is a compact version of the Arduino YUN OVERVIEW: Arduino Yún Mini is a breadboard PCB developed with ATmega 32u4 MCU and QCA MIPS 24K SoC CPU operating

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

Seeeduino Stalker. Overview. Basic features: License

Seeeduino Stalker. Overview. Basic features: License Seeeduino Stalker Overview Seeeduino Stalker is an extensive Wireless Sensor Network node, with native data logging features and considered modular structure. It could be conveniently used as sensor hub

More information

IOX-16 User s Manual. Version 1.00 April Overview

IOX-16 User s Manual. Version 1.00 April Overview UM Unified Microsystems IOX-16 User s Manual Version 1.00 April 2013 Overview The IOX-16 Arduino compatible shield is an easy way to add 16 additional digital Input/Output (I/O) lines to your Arduino system.

More information

Introduction to Arduino

Introduction to Arduino Introduction to Arduino Paco Abad May 20 th, 2011 WGM #21 Outline What is Arduino? Where to start Types Shields Alternatives Know your board Installing and using the IDE Digital output Serial communication

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

Arduino Cookbook O'REILLY* Michael Margolis. Tokyo. Cambridge. Beijing. Farnham Koln Sebastopol

Arduino Cookbook O'REILLY* Michael Margolis. Tokyo. Cambridge. Beijing. Farnham Koln Sebastopol Arduino Cookbook Michael Margolis O'REILLY* Beijing Cambridge Farnham Koln Sebastopol Tokyo Table of Contents Preface xiii 1. Getting Started 1 1.1 Installing the Integrated Development Environment (IDE)

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

Doc: page 1 of 8

Doc: page 1 of 8 Minicon Reference Manual Revision: February 9, 2009 Note: This document applies to REV C of the board. 215 E Main Suite D Pullman, WA 99163 (509) 334 6306 Voice and Fax Overview The Minicon board is a

More information

ARDUINO YÚN Code: A000008

ARDUINO YÚN Code: A000008 ARDUINO YÚN Code: A000008 Arduino YÚN is the perfect board to use when designing connected devices and, more in general, Internet of Things projects. It combines the power of Linux with the ease of use

More information

Serial Communication

Serial Communication Serial Communication Asynchronous communication Synchronous communication Device A TX RX RX TX Device B Device A clock data A->B data B->A Device B asynchronous no clock Data represented by setting HIGH/LOW

More information

DIGITAL COMMUNICATION SWAPNIL UPADHYAY

DIGITAL COMMUNICATION SWAPNIL UPADHYAY DIGITAL COMMUNICATION SWAPNIL UPADHYAY SCOPE OF DIGITAL COMMUNICATION Internet Mobile Networks Wireless Networks OUR INTEREST ARDUINO SHIELDS Use SPI or UART to communicate with arduino boards JPG COLOR

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

Serial Communications

Serial Communications April 2014 7 Serial Communications Objectives - To be familiar with the USART (RS-232) protocol. - To be able to transfer data from PIC-PC, PC-PIC and PIC-PIC. - To test serial communications with virtual

More information

BroadR-Reach click PID: MIKROE Weight: 26 g

BroadR-Reach click PID: MIKROE Weight: 26 g BroadR-Reach click PID: MIKROE-2796 Weight: 26 g BroadR-Reach click brings the industry grade communication standard to the mikrobus, which is built to be used in an Ethernet-based open network. The click

More information

YOU WILL NOT BE ALLOWED INTO YOUR LAB SECTION WITHOUT THE REQUIRED PRE-LAB.

YOU WILL NOT BE ALLOWED INTO YOUR LAB SECTION WITHOUT THE REQUIRED PRE-LAB. Page 1/5 Revision 2 OBJECTIVES Learn how to use SPI communication to interact with an external IMU sensor package. Stream and plot real-time XYZ acceleration data with USART to Atmel Studio s data visualizer.

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

ARDUINO UNO REV3 Code: A000066

ARDUINO UNO REV3 Code: A000066 ARDUINO UNO REV3 Code: A000066 The UNO is the best board to get started with electronics and coding. If this is your first experience tinkering with the platform, the UNO is the most robust board you can

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

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

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

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT 1 Lecture 5: Computing Platforms Asbjørn Djupdal ARM Norway, IDI NTNU 2013 2 Lecture overview Bus based systems Timing diagrams Bus protocols Various busses Basic I/O devices RAM Custom logic FPGA Debug

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

How to Use an Arduino

How to Use an Arduino How to Use an Arduino By Vivian Law Introduction The first microcontroller, TMS-1802-NC, was built in 1971 by Texas Instruments. It owed its existence to the innovation and versatility of silicon and the

More information

SECOND EDITION. Arduino Cookbook. Michael Margolis O'REILLY- Tokyo. Farnham Koln Sebastopol. Cambridge. Beijing

SECOND EDITION. Arduino Cookbook. Michael Margolis O'REILLY- Tokyo. Farnham Koln Sebastopol. Cambridge. Beijing SECOND EDITION Arduino Cookbook Michael Margolis Beijing Cambridge Farnham Koln Sebastopol O'REILLY- Tokyo Table of Contents Preface xi 1. Getting Started 1 1.1 Installing the Integrated Development Environment

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

SH1030 Rev Introduction. Ultra low power DASH7 Arduino Shield Modem. Applications. Description. 868 MHz. Features

SH1030 Rev Introduction. Ultra low power DASH7 Arduino Shield Modem. Applications. Description. 868 MHz. Features SH1030 Rev. 1.2 Applications Wireless sensor network Data acquisition equipment Security systems Industrial monitor and control Internet of things (IoT) Ultra low power DASH7 Arduino Shield Modem 868 MHz

More information

Gamma sensor module GDK101

Gamma sensor module GDK101 Application Note: Interfacing with Arduino over I 2 C The Arduino makes an ideal platform for prototyping and data collection with the Gamma sensors. Electrical Connections Interfacing with the sensor

More information

3.3V regulator. JA H-bridge. Doc: page 1 of 7

3.3V regulator. JA H-bridge. Doc: page 1 of 7 Digilent Cerebot Board Reference Manual Revision: 11/17/2005 www.digilentinc.com 215 E Main Suite D Pullman, WA 99163 (509) 334 6306 Voice and Fax Overview The Digilent Cerebot Board is a useful tool for

More information

Embedded Systems and Software

Embedded Systems and Software Embedded Systems and Software Serial Communication Serial Communication, Slide 1 Lab 5 Administrative Students should start working on this LCD issues Caution on using Reset Line on AVR Project Posted

More information

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

Raspberry Pi. Hans-Petter Halvorsen, M.Sc. Raspberry Pi Hans-Petter Halvorsen, M.Sc. Raspberry Pi https://www.raspberrypi.org https://dev.windows.com/iot Hans-Petter Halvorsen, M.Sc. Raspberry Pi - Overview The Raspberry Pi 2 is a low cost, credit-card

More information