Concept of Serial Communication
Agenda Serial v.s. Parallel Simplex, Half Duplex, Full Duplex Communication RS-485 Advantage over RS-232
Serial v.s. Parallel
Application: How to Measure the temperature in a long distance? Measuring with a DAC card: 1200 m Remote sensor T/C T/C wire Control room A/D noise
Application: How to Measure the temperature in a long distance? Measuring with a remote I/O module: 1200 m Remote sensor Control room T/C Remote I/O Standard T/C signal, 4-20mA, 0-5V Serial Communication Noise rejection (Differential signal)
Most Popular 3 types of Serial Comm. RS-232 Most commonly available Simple wiring Low cost Short length (40 ft) Slow data rates Subject to noise Tx Rx CTS RTS DTR DSR GND Rx Tx RTS CTS DSR DTR GND Bar code reader RS-422 High data rates Longer cable lengths (4000 ft) Full-duplex Noise rejection Tx+ Tx- Rx+ Rx- GND PLC Multipoint application (Up to 32 units) RS-485 Low cost Longer cable lengths (4000 ft) Noise immunity Data+ Data- GND Half-duplex PLC
Serial V.S. Parallel Communication Serial Communication Transfer the data bit by bit Synchronous Data Transfer Bit Send Data Parallel Communication Transfer the all data simultaneously Asynchronous Data Transfer Receive Data Bit Bit Bit Bit Bit Bit Bit Bit Send Data Receive Data
Simplex, Half Duplex, Full Duplex Communication
Simplex Communication Simplex Communication : Data in a simplex channel is always one way. Simplex channels are not often used because it is not possible to send back error or control signals to the transmit end. The examples of simplex are broadcasting, or Radio Simplex Channel Operation One way only
Half-Duplex Communication Half Duplex Communication : A half-duplex channel can send and receive, but not at the same time. It's like a one-lane bridge where two way traffic must give way in order to cross. Only one end transmits at a time, the other end receives. Another examples of half-duplex are talk-back radio, RS-485 Half-Duplex Operation Two way but not at the same time
Full-Duplex Communication Full Duplex Communication Data can travel in both directions simultaneously. There is no need to switch from transmit to receive mode like in half duplex. Its like a two lane bridge on a two-lane highway. Have you ever watched these television talk shows where the host has a number of people on the show, and they all try to talk at once. Well, that s full duplex! All examples of full-duplex are RS-232, RS-422, telephone Full-Duplex Operation Both Way at the same time
RS-485 Advantage over RS-232
RS-232 Communication Full-Duplex Operation No noise rejection (single-ended) Short transmission distance (within 15m) Low transmission speed (within 115.2kbps) Protocol 1. Point-to-point : Handle communication between 2 devices. 2. Unbalanced lines (Single-ended.) : Signal applied to one line and referenced to ground. 3. Most common use as a communication device for a Serial port of the PC and peripherals Single-Ended Driver Tx Single-Ended Receiver signal Rx
RS-232 Pin Assignment Layouts and signals of DB25 and DB9 connector (RS-232) 25 pin 9 pin Signal Direction Description 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 1 - Shield - protection ground 2 3 TD DTE DCE transmitted data 3 2 RD DCE DTE received data 4 7 RTS DTE DCE request to send 5 8 CTS DCE DTE clear to send 6 6 DSR DCE DTE data set ready 7 5 GND - signal ground (common) 8 1 DCD DCE DTE data carrier detect 20 4 DTR DTE DCE data terminal ready 22 9 RI DCE DTE ring indicator 23 - DSRD DCE DTE data signal rate detector DCE : Data Carrier Equipment (Modem) DTE : Data Terminal Equipment (PC s COMport) 9 8 7 6 5 4 3 2 1
RS-232 Hand-Shaking Wiring Transfer Data with no handshaking Signal Pin Pin Signal TX RX GND 3 2 5 3 2 5 TX RX GND Transfer Data with handshaking Signal Pin Pin Signal TX RX RTS CTS DSR CD DTR GND 3 2 7 8 6 1 4 5 3 2 7 8 6 1 4 5 TX RX RTS CTS DSR CD DTR GND
RS-232 Application The Application for RS-232 1. PC s and Laptops 2. Point of Sales Equipment (POS) 3. PDA s and GPS s 4. PC Peripherals (printers, faxes, mouse,..) 5. Barcode Reader
RS-485 Communication Half-Duplex Operation Noise rejection and cross wire (Differential) Long transmission distance (Up to 1200m) High transmission speed (Up to 10Mbps ) Auto-Flow Control Differential Driver Twisted-pair Differential Receiver Signal Voltage Twist Pair: to reduce the electromagnetic interference V CM
RS-485 Communication Save the wiring cost Easy to setup and maintain Communication is more reliable DATA+ (Y) Host RS-485 DATA- (G) Rt Rt + - Power Supply +10 to +30 V DC +Vs(R) GND(B) Local power supply Y RGY GY B R G
RS-485 Multi-drop Network and Termination Terminal Resistor: To decrease the distortion of the signal RT repeater RT RX TX RX TX RX TX RX TX Device 0 Device 31 Device 0 Device 31 32 driver / receiver 32 driver / receiver
RS-485 Application Typical RS-485 Applications 1. Point of Sales Equipment ( ex. Remote price checker,.) 2. Control System Automation (ex. PLC,.) 3. Power/Gas Meters PLC Temperature Controller AC Power Monitor
RS-422 Communication The electrical spec. is similar to RS-485 protocol Key difference 1 driver only can connect up to 10 receivers Full-Duplex
RS-422/485 Pin Assignment Pin RS-422 RS-485 Pin RS-422 RS-485 1 TxD- Data- 2 RxD+ 9 8 7 6 5 4 3 2 1 2 TxD+ Data+ 3 RxD+ 4 RxD- 5 GND GND 6 RTS- 7 RTS+ 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 3 TxD+ Data+ 4 RTS+ 5 CTS- 6 RTS- 7 GND GND 8 TxD- Data- 8 CTS+ 20 RxD- 9 CTS- 22 CTS-
RS-232 V.S. RS-422/485 Protocol RS-232 RS-422 RS-485 Signal Single-Ended Differential Differential Driving No. 1 10 32 Receiving No. 1 10 32 Distance 15m 1200m 1200m Max. Data Transfer Rate 115.2Kbps 10Mbps 10Mbps Transmission Mode Full-Duplex Point to Point Full-Duplex Point to Point Half-Duplex Multi-Drop
Q & A
Thanks~~~