Communication. Chirag Sangani

Similar documents
DIGITAL COMMUNICATION SWAPNIL UPADHYAY

Basics of UART Communication

Serial Communication. Simplex Half-Duplex Duplex

Serial Communications

Interfacing Techniques in Embedded Systems

Growing Together Globally Serial Communication Design In Embedded System

PARALLEL COMMUNICATIONS

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

Serial Communication. Simplex Half-Duplex Duplex

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

or between microcontrollers)

Christian Brothers High School, Lewisham. Year 12 Information Processes & Technology. Assessment Task 3: Communications Systems.

ECE251: Thursday November 8

Digital Storage Oscilloscope

Introduction to I2C & SPI. Chapter 22

Unit 19 - Serial Communications 19.1

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

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

EECS 373 Design of Microprocessor-Based Systems

Serial Communication. Spring, 2018 Prof. Jungkeun Park

Microcontrollers and Interfacing

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

Sender Receiver Sender

DESIGN AND VERIFICATION OF LOW SPEED PERIPHERAL SUBSYSTEM SUPPORTING PROTOCOLS LIKE SPI, I 2 C AND UART

Universität Dortmund. IO and Peripheral Interfaces

Serial Communications

EECS 373 Design of Microprocessor-Based Systems

Innovati s Bluetooth 100M Universal Wireless Bluetooth Module

UART TO SPI SPECIFICATION

DATA COMMUNICATION. Part TWO Data Transmission

EECS 373 Design of Microprocessor-Based Systems

More on IO: The Universal Serial Bus (USB)

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

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

HZX N03 Bluetooth 4.0 Low Energy Module Datasheet

Digital Storage Oscilloscope

Laboratory 5 Communication Interfaces

SPI Universal Serial Communication Interface SPI Mode

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

Keyboards. The PS/2 Protocol

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

Using the Z8051 MCU s USI Peripheral as an SPI Interface

Raspberry Pi - I/O Interfaces

Chapter 6 Digital Data Communications Techniques

ELET114A Bluetooth Module DATASHEET. Website: / 7

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

< W3150A+ / W5100 Application Note for SPI >

By: Haron Abdel-Raziq

Design with Microprocessors

Lecture 25 March 23, 2012 Introduction to Serial Communications

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

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

19.1. Unit 19. Serial Communications

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

8051SERIAL PORT PROGRAMMING

Real-Time Embedded Systems. CpE-450 Spring 06

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

HDLC-ETH. Serial Ethernet Converter. Rev. Dec 20, Datasheet. Website:

Input-Output Organization

C:\Users\jacob\Documents\MtSAC\ELEC74 Mt SAC - chipkit\homework Sheets.docx

HDLC-USB. Portable Protocol Converter. Rev. Dec 25, Datasheet. Website:

Asynchronous & Synchronous Serial Communications Interface. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

For reference only Refer to the latest documents for details

SPI (Serial & Peripheral Interface)

RECONFIGURABLE SPI DRIVER FOR MIPS SOFT-CORE PROCESSOR USING FPGA

USER GUIDE EDBG. Description

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

Product Specification

Data Communication. Chapter # 1: Introduction. By: William Stalling

LCM-160. Low-Power Embedded Communication Module. Rev. Dec 26, LCM-160 Datasheet. Website:

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

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

Data Communications & Computer Networks. Digital Data Communications Techniques

Product Specification

A Half-duplex Synchronous Serial Fieldbus S 2 CAN with Multi-host Structure

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

Serial Peripheral Interface (SPI)

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

SKB360I Bluetooth 4.0 Low Energy Module Datasheet

ELE492 Embedded System Design

FPGA Implementation Of SPI To I2C Bridge

Optimal Implementation Of UART_SPI Controller and Slave Interface With Master.

Lecture-65 SERIAL DATA COMMMUNICATION The data bus of a microcomputer system is designed to transfer data to and from I/O device in parallel - all

Enhanced Data Rate (EDR) compliant with V2.0.E.2 of the. specification for both 2Mbps and 3Mbps modulation modes

EDBG. Description. Programmers and Debuggers USER GUIDE

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

On a daily basis, first responders are tasked with entering dangerous, often unknown environments

BroadR-Reach click PID: MIKROE Weight: 26 g

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

FULL DUPLEX BIDIRECTIONAL UART COMMUNICATION BETWEEN PIC MICROCONTROLLERS

BLE Bluetooth Low Energy Modules SBC2112-B. Preliminary Specification. Version 1.0

Serial Peripheral Interface (SPI) Host Controller Data Sheet

Electronics Single wire communication

Pmod ESP32 Reference Manual

UART Devices. ECE 480: Design Team 3. Application Note. By: Hoyoung Jung. Date: 4/3/15

IC-485S /IC-485SI. If anything is damaged or missing, contact your dealer.

Team 2228 CougarTech 1. Training L2. Software Environment

Nano RK And Zigduino. wnfa ta course hikaru4

Interfacing with ANT General Purpose Chipsets and Modules

Serial Interfaces Part 1. ECE 153B Sensor & Peripheral Interface Design Winter 2016

Transcription:

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 The basic task: to convey a message (data) from one end to the other end. Sounds simple enough, however, there are a lot of assumptions that we re used to which need to be relooked at. The biggest assumption usually is that the message will reach the destination correctly.

Essentials of Communication Sender Communication Link Receiver

Assumptions in Communication The communication link exists. The communication link is sound. The sender and receiver are the correct nodes. The sender is sending the correct data. The receiver is able to correctly interpret the incoming data.

Protocols in Communication Assumptions in communication are harmful, yet important. To deal with these assumptions, we need an elaborate mechanism to ensure correctness of communication. These elaborate mechanisms have been codified and standardized as protocols.

Advantages of Protocols Standardized, so interoperability is ensured. Usually include error-detection and errorcorrection mechanisms. Are available as implemented chips that can be directly used.

Types of Protocols There are different ways of categorizing protocols. Protocols can be categorized technically as serial mode transfer or parallel mode transfer. Protocols can also be categorized as asynchronous mode transfer or synchronous mode transfer.

Serial and Parallel Mode Remember that we want to transfer data which, at its essence, is a binary number. We shall constrict ourselves to 8-bit binary numbers. Parallel protocols transfer 8 bits by 8 parallel wires. Serial protocols transfer 8 bits by using only one or two wires.

Serial and Parallel Mode Sender Sender Receiver Receiver Serial Mode Parallel Mode

Advantages and Disadvantages Serial Mode Advantages: Reliable Low-cost Low-power Disadvantages: Slow Requires complex control Parallel Mode Advantages: Very fast Simple to implement Disadvantages: Unreliable Short-range Expensive Draws more power

Synchronous and Asynchronous Mode Pertains to sender-receiver synchronization. Sender sends data at a certain speed. For flexibility, protocols allow for multiple speeds. If receiver does not know the speed or judges it incorrectly, errors may occur.

Perils of Desynchronization Sender: 0 1 1 0 1 1 1 0 t Receiver: 0 0 1 1 1 1 0 0 1 1 1 1 1 1 0 0 t/2

Synchronous Mode Sender sends a clock signal along with data: at every rising / falling edge of the clock, the data value is read by the receiver. Sender Data: 0 1 1 0 1 1 1 0 Sender Clock: Receiver: 0 1 1 0 1 1 1 0

Asynchronous Mode There is no clock signal. The receiver and the sender communicate at a predetermined speed (bauds or bits per second).

Advantages and Disadvantages Asynchronous Mode Advantages: Simple Inexpensive Disadvantages: High overhead Error-prone Synchronous Mode Advantages: Efficient Reliable Disadvantages: Complicated Expensive

Transmission Modes Simplex: A B Half-Duplex: A B Full-Duplex: A B

Serial Peripheral Interface (SPI) It is a serial, synchronous, full-duplex protocol. Sender and receiver follow a master-slave relationship. There may be multiple nodes in the network. One node is master, the rest are slaves. The slaves can communicate only with the master. Master decides when communication will occur.

SPI Schematics: Single Slave CLK CLK Master MOSI MISO SS MOSI MISO SS Slave

SPI Schematics: Multiple Slaves Multiplexer Slave SS Master CLK MOSI MISO Slave Slave

Pins in SPI CLK is generated by Master. MOSI is Master Out Slave In: Data sent by Master to Slave. MISO is Master In Slave Out: Data sent by Slave to Master. S S is slave select: Slave communicates with Master only if this pin s value is set as LOW.

Data Transfer in SPI M0 MOSI MISO S0 M1 S1 M2 S2 Master M3 M4 S3 S4 Slave M5 S5 M6 S6 M7 S7

Data Transfer in SPI M1 MOSI MISO S1 M2 S2 M3 S3 Master M4 M5 S4 S5 Slave M6 S6 M7 S7 S0 M0

Data Transfer in SPI M2 MOSI MISO S2 M3 S3 M4 S4 Master M5 M6 S5 S6 Slave M7 S7 S0 M0 S1 M1

Data Transfer in SPI S0 MOSI MISO M0 S1 M1 S2 M2 Master S3 S4 M3 M4 Slave S5 M5 S6 M6 S7 M7

SPI Code Master char A = spi( c ); lcd_putchar(a); Slave char B = spi( 1 ); This code will display 1 on the LCD.

Universal Asynchronous Receiver Transmitter (UART) UART is a simple half-duplex, asynchronous, serial protocol. Simple communication between two equivalent nodes. Any node can initiate communication. Since connection is half-duplex, the two lanes of communication are completely independent.

UART schematics Node RX TX TX RX Node GND GND

UART Characteristics The speed of communication (measured in bauds) is predetermined on both ends. A general rule of thumb is to use 9600 bauds for wired communication. UART implements error-detection in the form of parity bit.

UART Packet Structure D0 D1 D2 D3 D4 D5 D6 D7 P Start Bit Data Parity Stop Bits

Parity Bit Parity bit is HIGH when number of 1 s in the Data is odd. Respectively, it is LOW when number of 1 s in the Data is even.

UART Code Node A putchar( a ); /* Transmit the * character a */ Node B char B = getchar(); /* getchar() waits * for transmission */ lcd_putchar(b); This code will display a on the LCD.

Thank you.