Presentation on theme: "DATA COMMUNICATIONS Some organisations concerned with standards: EIA - Electroonic Industries Association (RS standards including RS-232) IEEE - Institute."— Presentation transcript:
DATA COMMUNICATIONS Some organisations concerned with standards: EIA - Electroonic Industries Association (RS standards including RS-232) IEEE - Institute of Electrical and Electronic Engineers (IEEE parallel interface standard.) CCITT - Consultive Committee in International Telegraphy - UN body concerned with world communications standards. ISO - International Standards Organisation A communication standard is made up of several layers - (The ISO proposes VII layers.) two of which are. Physical Layer - Describing the design of the connectors and the electrical characteristics of the hardware Data Link Layer - Defines the protocol for data exchange
Data communication standards Most data comms channels use serial pathways most common of which are 1.CURRENT LOOP 2.RS232 Parallel channels include 3.Centronic interface 4.IEEE Current loop Originally used for TTY (teletypewriter) equipment. Logic 1 - Presence of current (20 mA or 60 mA as standard) Logic 0 - Absence of current Infrequently used today but it is still attractive as it can transmit at 9600 baud over cable lengths of 500m. Which is better than RS232. Fig.1. shows a current loop interface for full duplex communication (simultaneous transmission and reception) between two TTL serial ports.
The opto-isolators protect the USARTs from transients on the lines. When the photo Darlington is ON the transmitter allows current to flow through the loop and the receiver outputs a logic 1 via the 74LS04. Note that the current loop power sources (+12 and -12 V) can be located at one end of the cable. This is an advantage over some other schemes that require power sources at both ends (receive and transmit) such as RS232. Because the current transients can couple noise into adjacent conductors, sensitive lines such as telephone cables should not be routed in the vicinity of the current loop.
RS232 Characteristics EIA RS 232C (1969 and RS 232 D ) RS 232 used negative logic (true = Low). An RS 232 driver must generate voltages of typically, +5 to +15 V (logic LOW input) (i.e. => logic 1 = negative = SPACE) and (-5 to -15 V) (logic HIGH input) (i.e. => logic 0 = positive =MARK) An RS232 receiver must present 3k to 7k load resistance, converting an input of : +3 to +25 V to logic LOW and -3 to -25 V to logic HIGH As an example, the Intel 8051 micro controller is equipped with a full duplex UART (Universal Asynchronous Receiver and Transmitter). This means that it has the ability to receive and transmit at the same time. Serial communication with the 8051 can be performed via Serial Communication Chip (i.e. Maxim RS232 serial chip) on the RS232C line provided on the micro controller. Communication equipment will be configured as DTE - Data terminal equipment (i.e. Terminal) or as the DCE - Data communication equipment (Modem)
RS232 – Characteristics continued **DTE - Data terminal equipment PC (i.e., male connector 9-pin) DCE - Data communication equipment MPSU (i.e., female connector 9-pin) Serial data standards defined as RS-232C/D are as follows Mode - single-ended Max. number of drivers 1 Max. number of receivers1 Max. cable length15m Max. data rates bits/s20k Transmit levels 5 V min 15 V max. Receive sensitivity3V Load impedance3k to 7k Output current limit500mA to Vcc or gnd Driver Zout min (pwr off)300 Following table shows all the important lines on the RS 232.
RS232 Handshake signals Name25- pin 9-pinDTEDCE**Function as seen by DTEhand-shake TD 2 3 Transmitted datadata pair 1 RD32Received data data pair 1 RTS47request to send (=DTE ready) handshake Pair 1 CTS58clear to send (=DCE ready) handshake Pair 1 DTR204data terminal readyhandshake Pair 2 DSR66data set readyhandshake Pair 2 DCD81data carrier detectenable DTE input RI229ring indicatorenable DTE input FG1- frame ground (chassis) SG75 signal ground
RS232 Connections, and wiring up serial devices RS232 Pin Assignments (DB25 PC signal set) Pin 1 Protective Ground Pin 2 Transmit Data Pin 3 Received Data Pin 4 Request To Send Pin 5 Clear To Send Pin 6 Data Set Ready Pin 7 Signal Ground Pin 8 Received Line Signal Detector (Data Carrier Detect) Pin 20 Data Terminal Ready Pin 22 Ring Indicator The connector on the PC has male pins, therefore the mating cable needs to terminate in a DB25/F (Female pin) connector.
RS232 Pin Assignments (DB9 PC signal set) Pin 1 Received Line Signal Detector (Data Carrier Detect) Pin 2 Received Data Pin 3 Transmit Data Pin 4 Data Terminal Ready Pin 5 Signal Ground Pin 6 Data Set Ready Pin 7 Request To Send Pin 8 Clear To Send Pin 9 Ring Indicator The connector on the PC has male pins, therefore the mating cable needs to terminate in a DB9/F (Female pin) connector.
Wiring up something nice and simple, for instance a plain old "dumb terminal", is just a matter of connecting Tx, Rx and Ground, right? Usually Not. While the normal PC hardware might well run with just Tx, Rx and Ground connected, most driver software will wait forever for one of the handshaking lines to go to the correct level. Depending on the signal state it might sometimes work, other times it might not. The reliable solution is to loop back the handshake lines if they are not used.
1.TD and RD - Data transmit and receive lines. 2.RTS and CTS - Ready To Send : Out put by DTE to indicate that it is ready to send data Clear To Send: Output by DCE to acknowledge RTS signal reception and indicates that the DCE is ready to receive transmission. 3.DTR, DSR, DCD - Data Terminal Ready: Out put by DTE to indicate that it is ready to send data. It can be used to switch a modem. Data Set Ready: Output by DCE to acknowledge RTS signal reception and indicates that the DCE is ready to receive transmission Data Carrier Detect: Output by the DCE indicating that the modem has detected a valid carrier. (i.e. a logic 1 signal) 4.There are two grounds, Pin 1 = chassis, Pin 7 signal ground. (most machines tie these together) 5.The five signals (2 & 3) above that are not data are 'handshaking - type control signals.
Connecting together two serial devices involves connecting the Rx of one device to the Tx of the other, and vice versa. The diagram below indicates how you would go about connecting two PC's together, without handshaking. Connecting two PCs together using RS232, without handshaking
When Handshaking is required, generally RTS of one device connects to CTS of the other, and vice versa, and also DSR of one device connects to DTR of the other device, and vice versa. The particular requirements for different equipment may vary. Connecting two PCs together using RS232, with handshaking
RS-232 communication is asynchronous. That is a clock signal is not sent with the data. Each word is synchronized using it's start bit, and an internal clock on each side, keeps tabs on the timing. TTL/CMOS Serial Logic Waveform The diagram above, shows the expected waveform from the UART when using the common 8N1 format. 8N1 signifies 8 Data bits, No Parity and 1 Stop Bit. The RS-232 line, when idle is in the Mark State (Logic 1). A transmission starts with a start bit which is (Logic 0). Then each bit is sent down the line, one at a time. The LSB (Least Significant Bit) is sent first. A Stop Bit (Logic 1) is then appended to the signal to make up the transmission. RS-232 Waveforms
The first step to connecting a device to the RS-232 port is to transform the RS-232 levels into 0 and 5 Volts, AND, this is done by RS-232 Level Converters. the MAX-232. It includes a Charge Pump, which generates +10V and -10V from a single 5v supply. This I.C. also includes two receivers and two transmitters in the same package RS-232 Level Converters