Serial Communications

Slides:



Advertisements
Similar presentations
INPUT-OUTPUT ORGANIZATION
Advertisements

Serial Communications Interface (SCI) Michael LennardZachary PetersBao Nguyen.
Data Communication Topics to be discussed:  Data Communication Terminology.  Data Transmission Signals.  Data Transmission Circuits.  Serial & Parallel.
Serial I/O - Programmable Communication Interface
Hierarchy of I/O Control Devices
The Transmission of Binary Data in Communication Systems
Data Transmission Most digital messages are longer than just a few bits. It is neither practical nor economic to transfer all bits of a long message simultaneously.
Chapter 8 Data and Network Communication Technology
CS335 Networking & Network Administration Tuesday, April 6.
Long distance communication Multiplexing  Allow multiple signals to travel through one medium  Types Frequency division multiplexing Synchronous time.
Network Data Organizational Communications and Technologies Prithvi N. Rao Carnegie Mellon University Web:
Data Transmission Most digital messages are longer than just a few bits. It is neither practical nor economical to transfer all bits of a long message.
Input/Output and Communication
Chapter 8 COMMUNICATION AND COMPUTER NETWORK
Data transmission refers to the movement of data in form of bits between two or more digital devices. This transfer of data takes place via some form.
1 SCI Serial Communication Interface Gerrit Becker James McClearen Charlie Hagadorn October 21, 2004.
INPUT-OUTPUT ORGANIZATION
Computers in Surveying SVY2301 / E4006 Automated Surveying.
Chapter 2 Basic Communication Theory Basic Communications Theory w Understand the basic transmission theory, and figure out the maximum data rate. w.
Simplex, Half Duplex & Duplex Serial & Parallel transmission Synchronous & Asynchronous Bit & Baud Rate.
AS Computing F451 F451 Data Transmission. What data is transmitted? Phone SMS Radio TV Internet.
Universal Asynchronous Receiver/Transmitter (UART)
Scott Baker Will Cross Belinda Frieri March 9 th, 2005 Serial Communication Overview ME4447/6405.
ECS 152A 4. Communications Techniques. Asynchronous and Synchronous Transmission Timing problems require a mechanism to synchronize the transmitter and.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
7. Peripherals 7.3 Data transmission Computer Studies (AL)
The Principle of Electronic Data Serial and Parallel Data Communication Transmission Rate Bandwidth Bit Rate Parity bits.
1 October 26, 2006ME 6405 MechatronicsSerial Communication Interface Brian Guerriero Jon Rogers Robert Thiets.
AS Computing Data transmission. Basic data transmission Baud The rate that the voltage changes is called the Baud. If the voltage changes 10 times every.
FUNDAMENTALS OF NETWORKING
Unit 1 Lecture 4.
CE-2810 Dr. Mark L. Hornick 1 Serial Communications Sending and receiving data between devices.
Chapter Nine: Data Transmission. Introduction Binary data is transmitted by either by serial or parallel methods Data transmission over long distances.
Data and Computer Communications Digital Data Communications Techniques + Error Control+ Digital Data Communications Techniques + Error Control+Multiplexing.
Serial I/O Port.
Serial mode of data transfer
Data Link Layer.
6.1 Communication Methods
Input/Output and Communication
Chapter Goals Explain communication protocols
Data Transmission Keep errors to an acceptable low probability
Serial I/O and Data Communication.
Transmission Modes The term transmission mode to refer to the manner in which data is sent over the underlying medium Transmission modes can be divided.
SERIAL PORT PROGRAMMING
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
E3165 DIGITAL ELECTRONIC SYSTEM
Local Asynchronous Communication (RS-232)
DIGITAL DATA COMMUNICATION TECHNIQUES
Computer Organization and Design
Lecture 4 Continuation of transmission basics Chapter 3, pages 75-96
DIGITAL DATA COMMUNICATION TECHNIQUES
Asynchronous Serial Communications
Serial Communication Interface: Using 8251
Communications channels تقديم المهندس سنان محمد حسن
DIGITAL DATA COMMUNICATION TECHNIQUES
Data Transmission Most digital messages are longer than just a few bits. It is neither practical nor economical to transfer all bits of a long message.
Chapter Nine: Data Transmission
Suppose that a certain program takes 200 seconds of elapsed time to execute. Out of these 200 seconds, 180 seconds is the CPU time and the rest is I/O.
Programmable Data Communication Blocks
Chapter 2 Transmission Basics.
Data Communication.
CHAPTER SERIAL PORT PROGRAMMING. Basics of Serial Communication Computers transfer data in two ways: ◦ Parallel  Often 8 or more lines (wire.
Chapter 6 Transmission of Digital Data Interfaces and Modems
Chapter 9 Transmission Modes
communications system
1.2.1 Data transmission.
Microprocessor I 7/18/2019.
Serial Communications
Data Link Layer. Position of the data-link layer.
Introduction Communication Modes Transmission Modes
Presentation transcript:

Serial Communications 1/30/2018

What is Serial I/O Computer input / output techniques fall into one of two basic categories, serial I/O or parallel I/O. Since microcomputer data busses are 8-bits or a multiple of 8-bits wide, then the most natural and quickest technique of transferring data to or from a computer is to transmit or receive data words which are of the same number of bits as the data bus. This is called parallel I/O. However, since a single electrical conductor can only carry 1-bit of data at any instant of time, parallel I/O necessitates using multiple conductors to interface the sending or receiving device to the computer. Although parallel I/O systems are fast, they tend to be expensive and complex. 1/30/2018

What is Serial I/O To reduce cost and complexity of the communications system, data is either sent to, or received from, a computer a bit at a time. Such systems are referred to as serial I/O systems. Because data is only sent a bit at a time serial I/O is slower than parallel I/O in terms of data rate. However, with modern technology data can still be transmitted and received serially at rates up to 1000,000,000 bits per second. 1/30/2018

The Simplex System The simplex system is a serial communications system in which the data flow is uni-directional. It comprises two electrical conductors, a signal wire and a reference. In the example the computer is the source of the data ( transmitter ) and the printer is the destination for the data ( receiver ). 1/30/2018

The Half-duplex System A half-duplex system is also a two wire system, with a signal wire and a reference. Data flow is bi-directional but only in one direction at any instant in time. 1/30/2018

The Full-duplex System The full-duplex communication system, in its simplest form, can transmit and receive serial data simultaneously. It requires a minimum of two signal wires together with a reference. 1/30/2018

Synchronous Serial Communications In synchronous communication systems both the transmitter and receiver are referenced to the same clock. This means that the clock reference has to be transmitted along with the data. There are two approaches to achieving this : Transmit the clock along a separate signal wire Encode clock information in the data stream 1/30/2018

Synchronous Serial Communications The data is sent as a bit stream. For the receiver to be able to identify the start and the end of a message, synchronising characters are added to the beginning and the end of the data stream. The transmitter adds the synchronisation information before the data is transmitted. Also the transmitter adds data integrity check information, which the receiver can read and determine if it has received the data packet without error. The main advantage of synchronous communication systems is that data can be transmitted at the clock rate as no synchronisation of transmitter and receiver clocks is necessary. Synchronous communication systems are rarely used with embedded microcomputer systems and will not be considered further here. 1/30/2018

Asynchronous Serial Communications Most microcomputer systems use the slower, but technically simpler, asynchronous techniques for serial communications purposes. In asynchronous systems the transmitter and receiver are referenced to their own independent clocks. The clock frequencies are matched as near as is possible - usually by using crystal based oscillators. 1/30/2018

Asynchronous Serial Communications Asynchronous serial communication systems are character based. One character (6-bits, 7-bits or 8-bits), usually ASCII coded, is sent at a time. The character is enclosed by synchronising information in the form of : a start bit to signify the start of the character one (or more ) stop bits to signify the end of the character A parity bit is often added, by the transmitter, to the end of the character and before the stop bits to enable a degree of error checking by the receiver. 1/30/2018

Interfacing a Serial Communications Channel to a Parallel Bus 1/30/2018

Interfacing a Serial Communications Channel to a Parallel Bus When a processor wishes to send data, via the serial channel, it writes parallel data to the transmit data buffer. Once the previous data has been sent, the data is transferred from the transmit data buffer to a parallel in / serial out shift register. The shift register, shifts the data out at a bit at a time with respect to the transmit clock. The LSB of the data is sent first. The receiver collects the incoming data in a serial in / parallel out shift register at a rate determined by the receive clock. When the full character has been collected the shift register transfers the data, in parallel, to the receive data buffer. It remains in the buffer until it is read by the receiving processor. 1/30/2018

Asynchronous Serial Data Format When no data is being transmitted the signal wire is held at logic ‘1’ - called a mark. When transmitting a character it is preceded by a logic ‘0’ (called a space) for one bit time. The space preceding the character is referred to as the start bit. The bits of the character then follow with the least significant bit (LSB) first and the most significant bit (MSB) last. One or more logic ‘1’ bits - called stop bits, complete transmission of the character. The character is said to be framed by the start bits and the stop bits. 1/30/2018

Data Rates The rate at which data is transmitted over a serial communications link is sometimes expressed in bits per second (commonly referred to as Baud rate) The rate at which data is transmitted over a serial communications link is sometimes expressed in characters per second (commonly abbreviated to cps) Over the years a number of standard data rates for asynchronous communications systems have been established by manufacturers, including: 1200 Baud 2400 Baud 4800 Baud 9600 Baud 19.2 k Baud 38.4 k Baud 57.6 k Baud 115.2 k Baud 1/30/2018

Data Rates 1200 bits = 1 sec For 1 bit = 1/1200 = 0.83ms The data rate define the delay between two successive bits or interval time. 1200 bits = 1 sec For 1 bit = 1/1200 = 0.83ms Therefore, to transmit 1 character, it should be converted into a stream of 10 bits by adding start and stop bits and each bit must be transmitted at the interval of 0.83 ms 1/30/2018

Limitation on Data Rates Data rates are limited by the bandwidth of the transmitter and receiver. Data rates are limited by the bandwidth of the interconnecting medium ( copper cable, fibre optic cable, telephone channel, radio channel etc. ) Data can only be received without error provided that the transmitting device does not send data at a faster rate than the receiver can read. 1/30/2018

Potential Synchronization Problems with Asynchronous Systems For an asynchronous serial system to operate without error, the rate at which data is read by the receiver has to be matched to the rate at which the transmitter is sending data. Data is read by the receiver with respect to the receiver clock. Data is sent by the transmitter with respect to the transmitters clock. The question arises “ Does the transmit clock have to be matched to the receive clock, in both frequency and phase, for the received data to be read without error”. The phase problem is overcome by sampling the received data in the middle of a bit interval. This is achieved by detecting the negative edge of the start bit, wait a half-bit interval and then subsequently sample at full bit intervals. In this manner the incoming data is sampled at approximately the middle of the bit intervals. 1/30/2018

Potential Synchronisation Problems with Asynchronous Systems The diagram shows three scenarios. 1. The data rate is precisely the receive sampling rate 2. The data rate is greater than the receive sampling rate 3 The data rate is less than the receive sampling rate 1/30/2018

Potential Synchronization Problems with Asynchronous Systems If the data rate is precisely the same as the receive sampling rate, then the received data will always be sampled in the middle of the bit interval. If the incoming data rate is either greater or less then the receive sampling rate, then the instant the receive data is sampled will, accumulatively, move away from the middle of the incoming bit interval. If both incoming data rates and receive sampling rates are stable then the maximum error that can accumulate over one character, and the receiver still read the correct data, is: The error does not accumulate beyond one character as the system is re-synchronised after every character by the start and stop bits. 1/30/2018

Error Checks in Data Communication Many types of error can occurs in data transmission such as data bits may change due to noise or can be misunderstood by the receiver because of differences in receiver and transmitter clock. Three methods are generally in common practice use to check this error Parity Check Used to check each character by counting the number of 1s in the character Cyclic Redundancy Check (CRC) Used when data are transferred from and to a floppy disk and in a synchronous data communication 1/30/2018

Error Checks in Data Communication Checksum Used when a blocks of data are transferred Adding all the bytes in a block without carries Then, the 2’s compliment of the sum (negative of the sum) is transmitted as the last byte Checksum , CS = 2’s complement of To check the error: - the addition of all the bytes including the 2’s complement of the sum = 0 1/30/2018

Error Checks in Data Communication Example of intel hex format : 0A 2000 00 06 32 0E A2 79 80 32 50 20 76 DD Length Checksum Starting Add Data Type 1/30/2018