Fig.12.5 Serial Data Line during Serial Communication

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

CoE3DJ4 Digital Systems Design. Chapter 5: Serial Port Operation

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

Sender Receiver Sender

1 = Enable SOD 0 = Disable SOD. Serial Output Data. Fig.12.9 SIM Instruction Format

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

Hierarchy of I/O Control Devices

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

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

Serial communication

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

COMP asynchronous buses April 5, 2016

Chapter 9: Data Transmission

COMP2121: Microprocessors and Interfacing

Serial I-O for Dinesh K. Sharma Electrical Engineering Department I.I.T. Bombay Mumbai (version 14/10/07)

8051 Serial Communication

Data Communication/MIDI. Juan P Bello

ECE251: Thursday November 8

Asynchronous Transmission. Asynchronous Serial Communications & UARTS

Emulating an asynchronous serial interface (ASC0) via software routines

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text

SCI Serial Communication Interface

Asynchronous Data Transfer

CHAPTER 4 DATA COMMUNICATION MODES

Advantages and disadvantages

Lecture / The Data Link Layer: Framing and Error Detection

Serial Communication. Simplex Half-Duplex Duplex

Universal Asynchronous Receiver / Transmitter (UART)

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

COMP 273 Winter asynchronous I/O April 5, 2012

Laboratory Finite State Machines and Serial Communication

A B C D E F 0480 FE B F5 3B FC F3 E 1A 1D 2A 2D 3A 3D 4A 4D 5A 5D 6A 6D 7A 7D

CHAPTER 5 REGISTER DESCRIPTIONS

Design and Simulation of UART for Serial Communication

Chapter 2 Number Systems and Codes Dr. Xu

SPART. SPART Design. A Special Purpose Asynchronous Receiver/Transmitter. The objectives of this miniproject are to:

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

ECEN 468 Advanced Logic Design Department of Electrical and Computer Engineering Texas A&M University. Lab 2

AP16050 SAB C161V/K/O. Emulating an asynchronous serial interface (ASC) via software routines. Microcontrollers. Application Note, V 1.0, Feb.

International Journal of Research in Advent Technology IMPLEMENTATION OF UNIVERSAL ASYNCHRONOUS RECEIVER TRANSMITTER BASED ON VHDL

Interfacing a Hyper Terminal to the Flight 86 Kit

CS/ECE 5780/6780: Embedded System Design

Serial Interfacing. Asynchronous Frame

(Refer Slide Time: 2:20)

ECE/CS 5780/6780: Embedded System Design

Direct Link Networks: Building Blocks (2.1), Encoding (2.2), Framing (2.3)

Dallas Semiconductor DS1307 Real Time Clock. The DS 1307 is a real-time clock with 56 bytes of NV (nonvolatile)

lecture 22 Input / Output (I/O) 4

8051 Timers and Serial Port

I/O Organization John D. Carpinelli, All Rights Reserved 1

Content beyond Syllabus. Parity checker and generator

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

Design with Microprocessors

In this lecture, we will focus on two very important digital building blocks: counters which can either count events or keep time information, and

Special Memory (SM) Bits

Data Communication Protocol Host Computer to FAS-A

Direct Link Networks. Lecture - Encoding & Framing 1. Areas for Discussion. Problems

OEM Proximity Reader with Keypad Manual REV1

Chapter 8 Summary: The 8086 Microprocessor and its Memory and Input/Output Interface

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

8-bit RISC Microcontroller. Application Note. AVR 305: Half Duplex Compact Software UART

Lecture 25 March 23, 2012 Introduction to Serial Communications

School of Computer Science Faculty of Engineering and Computer Science Student ID Number. Lab Cover Page. Lab Date and Time:

4.3 Digital Communication

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

Digital Fundamentals

Features: 3 8-bit IO ports PA, PB, PC. PA can be set for Modes 0, 1, 2. PB for 0,1 and PC for mode 0 and for BSR. Modes 1 and 2 are interrupt driven.

Temperature Sensor TMP2 PMOD Part 1

C-MAX CME8000-BUS. Module Layout CME8000-BUS-LP02 RS232. Industrial Module with CME8000 receiver IC. Short Description

Data Transmission Definition Data Transmission Analog Transmission Digital Transmission

Serial Communication. Simplex Half-Duplex Duplex

LCD Display. Other I/O. LCD display Flash ROM SPI EPROM Keyboard (PS/2) UART connectors DAC ADC. 2-line, 16 character LCD display

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

The IIC interface based on ATmega8 realizes the applications of PS/2 keyboard/mouse in the system

ECE 4450:427/527 - Computer Networks Spring 2017

Desktop Reader and Wall Reader Adaptor USER MANUAL DOCUMENT REVISIONS

Menu. What is SPI? EEL 3744 EEL 3744 SPI

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT IV I/O INTERFACING PART A (2 Marks)

Basics of UART Communication

TECH TIP. Tritex Modbus Protocol Specification

User Manual. IP BiSerial BA4. Bidirectional Serial Data Interface IP Module

These three counters can be programmed for either binary or BCD count.

Serial versus Parallel Data Transfers

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

EITF35 - Introduction to the Structured VLSI Design (Fall 2016) Interfacing Keyboard with FPGA Board. (FPGA Interfacing) Teacher: Dr.

Chapter 6 Digital Data Communications Techniques

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

HDLC-PCIE. Synchronous Serial Card. Rev. Dec 22, Datasheet. Website:

Tutorial for I 2 C Serial Protocol

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

EECS 373 Design of Microprocessor-Based Systems

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

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

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

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

11 ASYNCHRONOUS SERIAL PORTS

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

Data Representation and Binary Arithmetic. Lecture 2

Lecture (03) Binary Codes Registers and Logic Gates

Transcription:

Lecture-66 Asynchronous Serial Data Communication A serial data signal is divided into time intervals called bit times as shown in fig.2.5. During each bit time interval (T B ), the signal is either a 0 or ; it can change logic levels only at the start of a new bit time interval. Serial Data 0 TB TB TB TB TB TB time Fig.2.5 Serial Data Line during Serial Communication The rate at which serial transmission takes place is called the Baud Rate. It is essentially equal to the number of bits of information that are transmitted per second. Since bit is transmitted for a time interval equal to bit time, T B, the baud rate is given by Baud Rate= Time = T B (s/ second) For example, in a teletypewriter (TTY) system, T B is 9.09 msec. This gives a baud rate of 0 bits/sec. Commonly used baud rates are 0, 50, 300, 600, 900,200, 2400, 4800, 9600,3.8k,4.4k,9.2k, 38.4k, 57.8k. When asynchronous serial data are transmitted between two devices such as CRT terminal & microprocessor, a standard format is used to transmit a single data character as shown in fig.2.6. This format consists of three or four parts:

) A START bit, which is always logic 0 called space. 2) Five to eight data bits, representing the actual information being transmitted. The LSB are normally transmitted first. 3) An optional priority bit for error detection capability. If the parity bit is included, either odd or even parity can be used. 4), ½ or 2 stop bits which are always s. ½ (one and half stop bits) would be represented as a level, which lasts for ½ bit time. Most frequently, there will be 2 STOP bits. Mark/ Idle State Serial Data 0 START (5 to8 data bits) D0 D D2 D3 D4 D5 D6 D7 Optinal Parity Stop (s) TB TB TB TB TB TB TB TB TB TB TB TB Fig.2.6 Serial Data Line to Transmit a during Asynchronous Serial Communication For a given system, the number of data bits, the optional parity bit and the number of STOP bits are fixed by the design. Fig.2.7 shows an example of a serial data word that uses 7 data bits, an even parity bit and 2 STOP bits. The 7 data bits are the ASCII code to time alpha numeric character K being transmitted. Mark/ Idle State Serial Data 0 START (7 data bits for character 'K') D0 D D2 D3 D4 D5 D6 Even Parity Two Stop (s) TB TB TB TB TB TB TB TB TB TB TB time Fig.2.7 Serial Data Line to Transmit K in Asynchronous Mode

The complete serial data word counting begins with a START bit of 0. The signal line is assumed to be transmitting a constant HIGH level prior to the START bit. This is called mark state or idle state. Whenever a data is not being transmitted, the signal line is always in mark state. Thus, the beginning of each data character is characterized by a to 0 transmission when the START bit occurs. Here the START bit is followed by 7 bits of data, beginning with LSB and ending with MSB. These the actual data being transmitted here are read as 00 0 which happens to be the ASCII code for K. The data bits are followed by an even parity bit; in this case it is 0. Since 7 data bits contain an even number of s. The parity bit is followed by 2 STOP bits, which are always s. Even though the receiver and transmitter in an asynchronous data transfer are not synchronized with respect to the time at which a character is transmitted, once the transmitter starts to send a character, the receiver synchronizes itself with the bit times of the character in order to sample them at the correct time. The baud rate of the transmitter & receiver are set to the same value. A start bit synchronizes transmitter and receiver. The receiver synchronizes its operation with the transmitter on the to 0 transition of the data line. It waits one half a bit time, checks the input to make sure it is still logic 0 and therefore a valid start bit - and begins sampling the data line at intervals equal to one bit time. The data line is sampled at the centre of each transmitted bit. This eliminates errors that might occurs if sampling takes place at the beginning of each bit time, since

the leading or trailing edges of the transmission on the data line are distorted in transmission. It then samples the parity bit & stop bits. The actual information, which the transmitter is sending to the receiver, is contained in the data bits. The data bits of each transmitted word are formed by the START & STOP bits. The receiver uses these framing bits as a means for determining which bits are the data bits. Synchronous Serial Data Transmission: Asynchronous serial data transmission in the most widely used type of serial communication. In this transmission each character needs start bit, 2 stops bit and may be one parity bit in addition to data bits to separate the characters. These extra bits increase the amount of time required to transmit a single character. Synchronous serial data communication does not use the extra START & STOP bits. Data words are transmitted continuously one after the other with no indication of character boundaries. The synchronization between the receiver and transmitting is accomplished by transmitting a special synchronizing word or character after a specific number of data words. The synchronizing character is an 8-bit character that would not normally appear in a stream of data words. A commonly used sync character is 00000 2 = 6 6 which is the ASCII code for the synchronizing character SYN. A typical synchronizing transmission sequence is shown in fig.2.8. DATA DATA DATA DATA Fig.2.8 Typical Sequence of Data Transmitted in Synchronous Mode

In case of asynchronous data communication, each character is transmitted in a frame with START and STOP bits but in synchronous communication there is no START or STOP bit. The information consisting of data or synchronizing characters are transmitted continually as a stream of logic and logic 0. In the beginning of data transmission, only synchronizing characters are transmitted and only after that the actual data transmission begins. Therefore, to synchronize the transmitter with the starting of a character, the receiver operates in a hunt mode. Initially all the bits of the data received are set. Then the data line is sampled and the received bit is put on MSB shifting rest of the bits towards right. The data so formed is compared with the synchronizing character. If the data is different than synchronizing character, the data line is again sampled and the new data is formed and compared with the synchronizing character. In this way, the receiver operated in hunt mode - making bit by bit comparison of the input stream with the value of the synchronizing character until it detects the synchronizing character. Once the desired character is detected, the receiver treats each subsequent group of n-bits as a character. The transmitter continues to send synchronizing characters to maintain the synchronization, even if the sources of data character do not have data ready for transmission. In this case the transmitter sends the synchronizing character continuously and thus the time interval between two characters is fixed. The clocks in the transmitter and receiver operate at exactly the same frequently and must be very stable to maintain synchronization for a long period of time. Typically, thousands of blocks if character can be sent without re-synchronizing the receiver.

In case of asynchronous communication, the data bits are sampled in the middle of the data bit to ensure that the data received is correct and this is implemented by giving a delay of T B /2 after the START pulse is detected. In case of synchronous communication, it is implemented with the help of common clock signal. The transmitted transmits the data bits on TxD line at the falling edge of clock signal and the receiver samples the RxD line on the rising edge of clock signal. Thus the data bits are sampled in the middle of each bit. In this case, the baud rate is same as the frequency of clock signal. It is possible sometimes that the special SYN character may be present in the data itself, thus making it difficult to differentiate data with the synchronizing character. In such cases, instead of single synchronizing character, two synchronizing characters SYN and SYN2, are transmitted together. The synchronization is also established when both the characters were detected together. Synchronous communication is typically used for high speed transfer of large block of data. This is because only 2% of the transmitted data is taken up by the synchronizing characters as compared to 20% for asynchronous communication.