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

Similar documents
Sender Receiver Sender

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

DATA COMMUNICATION. Part TWO Data Transmission

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

Input-Output Organization

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

INPUT-OUTPUT ORGANIZATION

ECE251: Thursday November 8

8051SERIAL PORT PROGRAMMING

Fig.12.5 Serial Data Line during Serial Communication

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

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

PD215 Mechatronics. Week 3/4 Interfacing Hardware and Communication Systems

ELEG3923 Microprocessor Ch.10 Serial Port Programming

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

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

Chapter 7 : Input-Output Organization

Microprocessors and Microcontrollers Prof. Santanu Chattopadhyay Department of E & EC Engineering Indian Institute of Technology, Kharagpur

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

RS-232 DATA COMMUNICATIONS WITH THE TANDY COLOR COMPUTER

Amarjeet Singh. January 30, 2012


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

Advantages and disadvantages

Integrity Instruments Application Notes. Release 1

THE MICROCOMPUTER SYSTEM CHAPTER - 2

Lecture-9 Intel 8085 Microprocessor It is a 40-pin DIP(Dual in package) chip, base on NMOS technology, on a single chip of silicon.

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Informatics for industrial applications

Advanced Electronic Communications Systems Wayne Tomasi Sixth Edition

Growing Together Globally Serial Communication Design In Embedded System

4.3 Digital Communication

Embedded Systems and Software. Serial Communication

Embedded Systems and Software

Course 10: Interfaces Agenda

FCC Information. RoHS This product is RoHS compliant. SJ/T The following contains information that relates to China.

Serial Communications

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

EEM336 Microprocessors I. I/O Interface

Low Power RS-232C Driver and Receiver in CMOS

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

Serial Communications

UNIT-V COMMUNICATION INTERFACE

Segment 1A. Introduction to Microcomputer and Microprocessor

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

Interface Converter. Installation Manual IC485S IC485SGB IC485SEU. RS-232 to RS-485/422 Serial Interface Converter

More on IO: The Universal Serial Bus (USB)

Computer Architecture and Organization: L10: I/O Organization

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

TRAINING GUIDE LEVEL 3 MODBUS WRITE IMPORT COMMAND

Serial Communication. Simplex Half-Duplex Duplex

Station 2. Inverter. PU connector (Note1)

Lecture 2 Microcomputer Organization: Fig.1.1 Basic Components of Microcomputer

Lecture 13 Serial Interfaces

SINUMERIK System 800 Universal Interface

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

DS2405. Addressable Switch PIN ASSIGNMENT

Serial Interfacing. Asynchronous Frame

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

RS RS-485 INTERFACE CONVERTER IC-485S & IC-485SI. User s Manual

TSW200E1. Description


18-349: Introduction to Embedded Real-Time Systems

Select a Data Communication Interface

Universität Dortmund. IO and Peripheral Interfaces

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

Z Z-280 MT8930, MT8992/3/4/5 MT8880 MT8888 MT8889 MT8980/1 MT8985, MT8986 (DIP-40) MT8986 (PLCC-44) MT8920B MT8952B

Communication. Chirag Sangani

Blog -

Hints and tips when using RC1xx0 RF Modules

COMP2121: Microprocessors and Interfacing. Introduction to Microprocessors

Data Communications & Computer Networks. Digital Data Communications Techniques

Features. Target Applications. V1.6 TBS07 RS485 to SDI-12 Converter

Hierarchy of I/O Control Devices

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

Asynchronous Transmission. Asynchronous Serial Communications & UARTS

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

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller.

I/O Design. Input / Output Instructions. Engineering 4862 Microprocessors. Lecture 23. Cheng Li

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

1. Define Peripherals. Explain I/O Bus and Interface Modules. Peripherals: Input-output device attached to the computer are also called peripherals.

MED102A. Industrial Serial to Single-mode Fiber Converter

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


8. I/O Buses and Interfaces

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

Basics of UART Communication

Design and Simulation of UART for Serial Communication

Serial Communication. Spring, 2018 Prof. Jungkeun Park

ECE 1160/2160 Embedded Systems Design. Midterm Review. Wei Gao. ECE 1160/2160 Embedded Systems Design

HS-RN. 4-Channel Low Speed Data Module with End-to-End Signaling OPERATION MANUAL INSTALLATION AND

EECS 373 Design of Microprocessor-Based Systems

Interfacing Techniques in Embedded Systems

205 CPU NETWORK ADAPTER F2-UNICON

BASIC INTERFACING CONCEPTS

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

EECS 373 Design of Microprocessor-Based Systems

MEV Limited USB232/485 INSTRUCTION MANUAL

Unit 19 - Serial Communications 19.1

Transcription:

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 bits of a data word are transformed simultaneously. This is the fastest way of transferring the data to and from I/O device. There are many cases when it is preferable to transfer data serially (1 bit at a time). In this case the data is transferred bit by bit by making signal line High or Low depending on whether logic 1 or logic 0 is to be transmitted. The data transmitted serially is often sent in groups of bits that constitute a character or word. The characters are generally coded in ASCII. Serial transfer requires only one signal line or communication channel and is used under following conditions: 1) The I/O device to/from which the data is transferred is inherently serial in operation. E.g. CRT terminals, magnetic tape cardridges and cassettes. These devices are designed to receive or transmit data bit at a time. 2) The distance between the microprocessor and the I/O device is great. As the distance between a microprocessor and an I/O device increases, the cost of running a colored cable with a number of conductors equal to the data bus width increases compared to running a single cable. The parallel data transfer also requires multiple line drivers and receivers in order to take care of loading and noise problem. A point is reached beyond which it becomes more economical to use serial data transfer, even though it may require additional hardware and /or software, than to use a multiple conductor

cable. In other applications, the distance may be so great that common facilities such as telephone lines are required & then the data must be transferred in serial form. For serial data transfer between the microprocessor and an I/O device, an interface is required in between. The interface provides two functions: 1) The logical formatting of data, including serial to parallel /parallel to serial conversion. Parallel to serial conversion is required for transmission of data (information) and serial to parallel conversion is required so that it can be easily transferred to the microcomputer bus. 2) Translation of logic signals to the electrical signal appropriate for transmitting data over the communication channel connecting the microcomputer and I/O device. Voltage and current levels used for data communication are rarely TTL compatible. Electrical signal translation is implemented by hardware. Logical formatting of data may be implemented by software or hardware. In the software method of data transformation, the CPU executes a program to generate the serial waveform for transmission or to determine the data from the received data from a serial device. Although this method requires a minimum of external hardware, it does require a significant amount of program instruction for both transmitting & receiving of data. Furthermore, with the software method, the CPU time is occupied during the complete transmission or reception of serial data word. With slow serial devices like a teletype writer, the time required to transmit or receive a single

ASCII coded character can be as long as 0.1 sec. In many applications this use of CPU time would be prohibited because it may have other tasks it could be performing while the serial communication is taking place. For these reasons the hardware approach is often preferred. Serial Communication Systems: Serial data transfer systems are of three types: simplex, half duplex and full duplex. In a simplex system, data line can transmit data only in one direction. For instance, communication link needed to connect a serial printer to a microcomputer. Printer is an output device; therefore, the CPU only needs to transmit data to the printer. Data are not transmitted back. In this case a single unidirectional communication line can be used to connect the printer and microcomputer. This is known as simplex communication link. The other common example is radio station in which information is broadcasted by the radio station. In half duplex system, data communication can take place in either direction but can only occur in one direction at a time. For example CRT terminal with keyboard need to both transmit data and receive data from the CPU. This requirement can be satisfied with a single communication line set up in half duplex mode. Therefore, transmission and reception of data cannot take place at the same time. The other example is two-way radio system where one user always listens while the other talks because the receiver circuitry is turned off during transmission. Once the data is transmitted in one

direction, the user say over and then the direction is reversed to receive the data. In a full duplex mode, the data can be transmitted in both directions simultaneously therefore, separate transmission and receive lines are used to connect the peripheral and microcomputer. For example CRT terminal with keyboard can be connected to microcomputer in full duplex mode. A normal phone conversation is another example. In this chapter we will consider only full duplex serial communication. Types of Serial Communication: There are two basics basic types of serial communication. The data can be sent serially either in asynchronous mode or in synchronous mode. In asynchronous serial communication a character is sent by the transmitter whenever it is available. Thus, the time internal between two characters is variable. In other words, there can be indefinite time intervals when the transmitter is not transmitting data to the receiver. However the time interval between bits of a single character is fixed. When no character is available for transmission, the line is said to in IDLE state or HIGH state or MARK state. Each character carries the information of the START & the STOP bits for identification. In this case, only three-wire cable is required to connect two systems for serial communication as shown in fig.12.1. The (transmit data) line of one system is connected to (receive data)

line of other system. The third line is used to connect the signal ground of two systems. System 1 System 2 Signal Ground Fig.12.1 Connections for Asynchronous Serial Communication In synchronous communication the transmitter continually transmitting data to the receiver irrespective of whether information is available or not. The data words are sent in group called blocks, and the blocks are separated by special data words called Synchronizing Character(s). In other words, when the transmitter has no data to transmit, it continually transmits synchronizing characters as fillers. These synchronizing characters are used by the receiver to synchronize its clock signal to that of the receiver. In synchronous communication, the two systems that are communicating with each other run synchronously. Therefore, the interface between two systems includes clock signal as well as, and signal common lines as shown in fig.12.2. System 1 System 2 Common Clock Signal Signal Ground Fig.12.2 Connections for Synchronous Serial Communication

The clocks at the opposite ends of an asynchronous transmission line do not need to have exactly the same frequency because of re-synchronization at the beginning of each character. But in synchronous communication, it is the clock that determines the position of each bit. Therefore, the clocks of both transmitter and receiver must be same and normally generated by the transmitter for the receiver. In synchronous serial communication, the characters are sent at constant rate though some characters are synchronous. Although both types of communication may waste time sending identification bits, the maximum information rate of synchronous line is higher than that of synchronous line with the same bit rate because asynchronous transmission must include extra bits with each character. Serial Communication Standards: As discussed above in serial communication the data is transmitted and received serially either in asynchronous mode or synchronous mode. To transmit the data serially it is converter to into serial form either through hardware or through software. Once the data is converted to serial form, it must be translated from TTL to appropriate logic levels so that it can be sent on serial link. Similarly once the data is received serially it must be converted into TTL form before converting it to parallel form for the microcomputer. There are several standards used for data translation: A. Current Loops B. RS-232C interface

Current Loops: In current loop systems such as teletype writer a nominal current of 20 ma in signal line represents logic 1 or mark state and no current represents logic 0 or a space. The terms space and mask are often used to indicate the absence and presence of the current in teletype communication links. Some manufactures use 60mA as the nominal current level. Fig.12.3 shows the schematic diagram of interfacing teletype writer with the system that uses TTL data levels. The teletype sends data to the device receiver data input line, and receives data from the device transmit data output line. The and lines might be SID or SOD of microprocessor or part of an interfacing device for serial to parallel or vice versa. +5V Teletype Writer 2.2k TTY Tx Q2 2.2k Printer Solenoid TTY TxRET N.C. Switch 680-15V Rx RxRET -15V +5V 220 4.7k 750 Q1 2.2k Microcomputer System Fig.12.3 Interfacing of Teletype Writer with the Microcomputer The signal is a TTL- level signal (i.e., 0V and +5V) that controls Q 2. A high on will produce a low on the PNP transistor. This will turn the transistor ON and cause a positive current of 20mA to flow

out of the TTY Tx line. Inside a teletype writer this current flows through the printer solenoid and back to the TTY TxRET line. The current then flows on to -15V through 680Ω to complete the path. If signal is 0 then no current flows through the solenoid. If the is an ASCII coded serial signal, the pattern of current and no current through the solenoid sets up internal electro-magnets to print the desired character. The teletype sends data to the μc interface by opening and closing an internal switch. When it is not transmitting, the teletype switch is normal closed so that Q 1 is ON and +5V is applied to the input. This is idling or masking condition. The teletype begins its transmission of opening the switch that turn OFF Q 1 and applies 0V to. This in the START bit, which begins the serial transmission. The teletype then opens and closes the switch according to the ASCII code of the keyboard character it is transmitting. EIA RS-232C Standard: The devices used the serial data over long distance are called Data Communication Equipment (DCE). The terminal or computer that is sending and receiving the data is referred to Data Terminal Equipment (DTE). In response to the need for signal and handshake standards between DCE and DTE, the Electronic Industries Association (EIA) developed EIA standard RS-232C. This standard describes the function of 25 signal and handshake pins for serial data transfer. It also describes the voltage levels, rise and full times, maximum bit rate and maximum capacitance for these signals. The voltage levels for all RS 232C signals are as follows:

1) A logic 1 or mark, is a voltage between -3V and -15V under load (-25V no load). 2) A logic 0 or space is a voltage between +3V and +15V under load (+25V no load). Any voltage between -3V & +3V is undefined. Typically, an RS-232C system uses nominal voltage of -12V and +12V for logic 1 and 0 respectively. Most of standard ICs and microcomputer components use TTL logic level (0V, +5V) and are not directly compatible with peripheral equipment that uses RS-232C. This requires an interface circuitry to convert TTL level to RS232C and vice-versa. Two ICs are designed especially for this purpose the Motorola MC-1488 converts TTL inputs to RS-232C output and the MC-1489 converts RS-232C inputs to TTL outputs. It is shown in fig.12.4. TTL Logic 0V, +5V MC1488 RS-232C Logic +12V, -12V RS-232C Logic +12V, -12V MC1489 TTL Logic 0V, +5V Fig.12.4 Conversion of TTL to RS-232C Logic Levels and Vice-versa Whenever two devices, one uses TTL logic and other RS-232C logic, are to be connected, the above ICs are used in between for logic level conversion. If the data is to be transmitted using telephone lines, MODEM are used as DCE.