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

Similar documents
Sender Receiver Sender

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

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

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Serial Port Communication Module No: CS/ES/11 Quadrant 1 e-text

8051SERIAL PORT PROGRAMMING

Chapter 11: Input/Output Organisation. Lesson 05: Asynchronous RS232C Serial Port data transfer

Serial Communication. Spring, 2018 Prof. Jungkeun Park

Interfacing a Hyper Terminal to the Flight 86 Kit

Informatics for industrial applications

Fig.12.5 Serial Data Line during Serial Communication

Select a Data Communication Interface

Asynchronous Transmission. Asynchronous Serial Communications & UARTS

Serial Communication. Simplex Half-Duplex Duplex

Embedded Systems and Software. Serial Communication

Embedded Systems and Software

ECE251: Thursday November 8

Parallel-to-Serial and Serial-to-Parallel Converters

Interfacing Techniques in Embedded Systems

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

Table 8 shows the pin configuration and function of a standard computer-to-printer parallel cable. Table 8 Parallel Cable Pin Configuration

Asynchronous Data Transfer

Basics of UART Communication

AD-8923-BCD. Remote Controller (BCD) INSTRUCTION MANUAL 1WMPD

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

Universal Asynchronous Receiver Transmitter Communication

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

ELEG3923 Microprocessor Ch.10 Serial Port Programming

Hierarchy of I/O Control Devices

Serial communication

CoE3DJ4 Digital Systems Design. Chapter 5: Serial Port Operation

Laboratory 5 Communication Interfaces

4.3 Digital Communication

USER S MANUAL SI-700 SI EIA-232/ EIA-485 INTERFACE JUL / 05 SI-700 VERSION 1 FOUNDATION

Serial I/O. 4: Serial I/O. CET360 Microprocessor Engineering. J. Sumey

Commercial-grade Interface Converter User Manual

Wiring Section 3-3. NQ-Series communication ports support various types of (serial) communication.

More on IO: The Universal Serial Bus (USB)

ELE492 Embedded System Design

SCI Serial Communication Interface

Serial Communications

Advanced Electronic Communications Systems Wayne Tomasi Sixth Edition

Maxim > Design Support > Technical Documents > Application Notes > Microcontrollers > APP 4465

EECS 373 Design of Microprocessor-Based Systems

RS-232 SERIAL INTERFACE PHOTOELECTRIC ISOLATOR

The Wireless Connectivity Expert

Nios Embedded Processor UART Peripheral

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

Demo 17 - Receiving data from Host through Serial Port. Introduction:

EECS 373 Design of Microprocessor-Based Systems

PCI Express 16-Port Serial I/O Cards

Serial Communication. Simplex Half-Duplex Duplex

WiFi to RS-232 adapter user manual

Serial Communications

(renamed the "EIA232 Standard" in the early 1990 s)

Serial Interfacing. Asynchronous Frame

Course 10: Interfaces Agenda

To be familiar with the USART (RS-232) protocol. To be familiar with one type of internal storage system in PIC (EEPROM).

Integrity Instruments

HP 48 I/O Technical Interfacing Guide

8051 Serial Communication

RS-232 DATA COMMUNICATIONS WITH THE TANDY COLOR COMPUTER

RS-422 Code-Operated Switches

Wrenchman, Inc Old Hwy. # 8 Suite # 122 New Brighton, Minnesota (651)

EET203 MICROCONTROLLER SYSTEMS DESIGN Serial Port Interfacing

Serial Communication Converters & Adapters Instruction Manual

USER MANUAL. MODEL 1000P Non-Powered Short Haul Modem. SALES OFFICE (301) TECHNICAL SUPPORT (301)

RTU560 Remote Terminal Unit Connections and Settings

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

MEV Limited USB232/485 INSTRUCTION MANUAL

TKT-3500 Microcontroller systems

USB/RS232 TO cctalk COMMUNICATION BOARD Technical Information

USB to RS-485/RS-422 Interface Converter. User Manual

TRP-C08X. USB To 4 RS232/422/485 Converter. User s Manual

The modems are made in industrial 108mm wide aluminium housing for DIN rail mounting. UCM RS232 interface

TRP-C08. USB to RS232/422/485 Isolated Converter. User s Manual. Printed Sep.2014 Rev 1.4

COMP2121: Microprocessors and Interfacing

RTU560 Connections and Settings DIN Rail RTU 560CIG10

+ (5~27 VDC) GND. Bluetooth V4.2 BLE RS-232 Serial Adapter. Model: BLE-232D-E. 1. Package content: BLE RS-232 adapter

Bluetooth to RS-232&RS422/485. EX-9132B/BI Bluetooth Adapter Operation Manual

Typical modules include interfaces to ARINC-429, ARINC-561, ARINC-629 and RS-422. Each module supports up to 8 Rx or 8Tx channels.

19.1. Unit 19. Serial Communications

Real-Time Embedded Systems. CpE-450 Spring 06

USART. USART stands for Universal Synchronous Asynchronous Receiver Transmitter. Full-duplex NRZ asynchronous serial data transmission

EECS 373 Design of Microprocessor-Based Systems

TRANSMITTER PINOUT CODE 15

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

Data Communications & Computer Networks. Digital Data Communications Techniques

PCI-SIO8BXS-SYNC. Features:

Auxiliary Port, Console Port, and Adapter Pinouts for Cisco 1000, 1600, 2500, 2600, and 3600 Series Routers

Functional Diagram: Serial Interface: Serial Signals:

PCL-741 Isolated Dual Port RS-232/Current-Loop Interface Card

ELAN DIGITAL SYSTEMS LTD. CF428 COMPACT FLASH CF+ CARD USER S GUIDE

Lecture 13 Serial Interfaces

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

Installation and Operation Manual. Ethernet Interface for SIMREX Radio Modems. SIMREX P/N: MAN.UBRIDGE Rev. B APRIL 2005

Product Manual. USB to Optical Adapter Industrial Isolated RS- 232/422/485. Coolgear, Inc. Version 2.1 December 2018 Model Number: USB-COMi-Si-M

UNIT-V COMMUNICATION INTERFACE

ICP PANEL-TEC PEX3000 II

+ (5~27 VDC) GND. Bluetooth V4.1 BLE RS-232 Serial Adapter. Model: BLE-232B. 1. Package content: BLE RS-232 adapter

EEE310 MICROPROCESSORS M. Fatih Tüysüz CHAPTER 7

Transcription:

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

Overview of the Serial Protocol Simple protocol for communicating data usually character by character Existed before more complex protocols such as Ethernet, USB, etc. Data is transmitted and received in a bit serial manner Transmission and reception can both proceed at the same time For serial communication, this is referred to as full duplex operation Communication that can occur in only one direction is referred to as simplex operation If no concurrent transmission and reception is allowed but both directions can occur, this is referred to as half duplex operation The simplest bi-directional version has three wires in the cable GND A common ground wire (for ground reference) TxD A transmit wire RxD A receive wire There are many other control wires Standardized versions are referred to as RS-232 EIA RS-232 or EIA-232 TIA-232

Voltage Levels Two states for data (& control signals) Space Indicates a 0 for data +3 to +15 VDC Originally +12 VDC Indicates asserted or on or true for control lines Mark Indicates a 1 for data -15 to -3 VDC Originally -12 VDC Indicates deasserted or off or false for control lines These voltages cause problems Additional power supplies or voltage converters are required Higher voltage limits transmission speed Reference to a transmitted common ground limits cable length and can cause ground loop issues

Two Sides of the Connection DTE Data Terminal Equipment Examples are terminals & peripheral devices DCE Data Communication Equipment Examples are modems & computers TxD sends data from DTE to DCE RxD sends data from DCE to DTE

Connectors D-Subminiature Connector with 25 pins DB-25 D-Subminiature Connector with 9 pins DE-9 (Often referred to as DB-9) A metal shield provides protection from interference Connector with pins is referred to as male (DB-25M, DE-9M) DTE defines the pins Connector with sockets is referred to as female (DB-25F, DE-9F) DCE defines the pins The standard defines which pins are used for which signals

DE-9M Connector

DE-9F Connector

Speed of Connection Bit rate (frequency) is named the baud rate For example, 9,600 baud is 9,600 bits per second The baud rate determines the timing per bit (cycle time) the bit time bit time = 1/(baud rate) At 9,600 baud, the bit time is ~0.10417 ms

Synchronous vs. Asynchronous Synchronous communication transmits a clock with data Asynchronous communication embeds an implicit clock in the data EIA-232 is asynchronous The two subsequent examples show eight data bits

Example of Synchronous Communication Data 0 (Usually LSB) 1 0 0 1 0 1 1 (Usually MSB) Rising-Edge Clock Time

Example of Asynchronous Communication Data with Implicit Clock Idle (Mark) Start bit (Space) 0 (Usually LSB) 1 0 0 1 0 1 1 (Usually MSB) Optional Parity bit Stop bit(s) (Mark) Idle Time

Details of Asynchronous Protocol To transmit back-to-back data, there is no need for any idle period Transmitter and receiver must agree on the protocol First, they must agree on the baud rate The number of data bits is usually between 5 and 9, inclusive The optional parity bit is used to detect single-bit errors Can be even or odd Need not be present The stop bit(s) is used to frame the data In most usage, there may be 1 stop bit, 1.5 stop bits, or 2 stop bits The low start bit and high stop bit(s) mean that there are at least two voltage transitions in each frame If the data line is held low for longer than one frame length, this is called a break condition

Receiver Action Receiver samples the data line at a rate higher than the baud rate this is called the sampling rate Say, at sixteen times the baud rate When the receiver detects the start bit, it waits for half the bit time and resamples the data line If the start bit is not still present, it was a spurious start bit If the start bit is still present, it is a valid start bit The higher the receiver sample rate, the more accurately the middle of the start bit can be determined Subsequent bits are sampled at the bit time from the middle of the start bit This allows for some difference between the clock rate of the transmitter and that of the receiver More advanced receivers resynchronize their sampling point whenever they see a change in the data line After all the data bits and the optional parity bit, the receiver checks for the stop bit(s)

Receiver Buffering After a complete frame has been received, the serial data is made available to the computer as a parallel byte or word In order to allow the receiver to receive the next data frame, at a minimum, most receivers are able to store the data from one frame while receiving the next frame More advanced receivers use a FIFO to store the received parallel data In this usage, the term FIFO is used to refer to a hardware FIFO (First-in, Firstout) queue This buffering allows the receiver to function without losing data before the computer reads data from the receiver

Errors Found by the Receiver Spurious start bit Parity error Received parity does not have expected value Framing error The stop bit was not present where expected Overrun error The buffering was insufficient (old data was overwritten by new data)

Component to Transmit/Receive Bit Pattern UART Universal Asynchronous Receiver/Transmitter Asynchronous only USART Universal Synchronous/Asynchronous Receiver/Transmitter Both Synchronous & Asynchronous These devices work at circuit logic voltage level (e.g. 3.3 V) An additional device is required to produce and receive the EIA-232 voltage levels Often called a RS-232 Voltage Converter or RS-232 Driver/Receiver For example, see the Maxim MAX232A