SlideShare a Scribd company logo
Asynchronous Serial Communication
and Standards
Dr. N. Mathivanan
Visiting Professor
Department of Instrumentation and Control Engineering
National Institute of Technology,
TRICHY, TAMILNADU
INDIA
Parallel Communication Serial Communication
Cable Use large number of wires Use less number of wires
Cable length
Can’t use lengthy cables.
EMI limits data rate
Use long shield cables,
protected from EMI
Communication
modes
Only single shared path is
available.
Hence, can be only half-duplex
Can have separate paths for
transmission and reception.
Hence, can be full-duplex
Communication
error
Bits get corrupted due to
capacitance effects between
cable wires
Only one bit is communicated at
a time
Data rate It is faster.
Latest techniques offer faster
/ comparable rates.
E.g.: PCI-Ex, SATA
Serial Communication - Features
Dr. N. Mathivanan
Serial Communication Terminologies
• Mark and Space:
o Logic ‘H’ is Mark, Logic ‘L’ is Space
• BAUD rate:
o Baud rate & bit rate (bps) are different.
o No. of time the serial communication signal changes (voltage level,
frequency or phase angle) in one sec. If for each bit voltage level
changes once, then bit rate = baud rate.
• Channel:
o Pathway between communicating devices
o Physical wire, media (propagating radiated energy)
• Protocol:
o Set of rules defining procedures – no. of bits, framing, formatting,
error detection methods, and control of comm. hardware
Dr. N. Mathivanan
• Network
o Connecting multiple devices to same media for resource sharing
• Point-to-point, Multi-drop, Multipoint
o Point-to-point: Interface between devices having peer relationship
o Multi-drop: One transmitter communicating with multiple receivers
o Multipoint: Several devices communicating with several receivers
Interfacing using serial interfaces involves conversion of parallel data
bytes to stream of serial bits at transmitter end and detection,
collection & conversion of bits to bytes at receiver end. Transmitter &
receiver need to be synchronized for communication.
• Serial Communication Formats
o Synchronous communication
o Asynchronous communication
Dr. N. Mathivanan
• Synchronous communication
• Transmitter & receiver use common clock
• Used for short distance, high volume, in blocks (instead of
individual characters) and fast transfer
• Standards merge clock & data, eliminate separate wire for clock
(e.g. NRZ and bi-phase Manchester encoding)
• Synchronous serial communication interfaces: I2C, SPI,
Microwire, USB, IEEE1394 (FireWire)
Dr. N. Mathivanan
• Asynchronous communication
o Framing
 Start bit, data bits, parity bit, stop bits – Popular format 8N1
o Character oriented
 Standard communication speeds:
 110, 150, 300, 600, 1200, 2400, 4800, 9600, ………., 115.2 kbaud
• Serial communication – Error checking methods
o Checksum method
o Cyclic redundancy check
o Error flags Dr. N. Mathivanan
• Signal encoding
o RZ, NRZL, NRZL, Manchester, Manchester Differential
• Compression
o E.g.: Run-Length encoding, Huffman encoding
Dr. N. Mathivanan
• Serial communication modes
o Simplex, Half duplex, Full duplex
• Communication medium
o Generally, metallic cables for distance up to 50 m,
o Beyond 50 m and up to 4 km, signal is converted to differential
and sent thro’ twisted pair cable,
o Above 4 km, telephone line / fibre optic cable (has several
advantages) used.
• Serial communication – Classification of devices
o DTE (Data terminal equipment)
 Devices used as source / destination for the data, E.g.: PC
o DCE (Data communication or Data carrier equipment)
 Devices used in between DTEs, E.g.: Modem
Dr. N. Mathivanan
Asynchronous Serial Interface Standards
• RS-232, EIA/TIA-232-F
o The standard defines physical & electrical connection, voltage
levels, noise margin, speed, and distance.
o It is asynchronous interface,
o It provides point-to-point interface and peer relationship
between devices.
• Pins & Signals
o DCE devices have 25-pin socket, DTE devices have 25-pin plug
o IBM modifies the RS-232 25-pin definition to 9-pin serial port
o Applications use 2, 4 or all signals for communication
o Signals classified into: Data, Control, Common & Timing signals
Dr. N. Mathivanan
o Data Signals
TxD – pin no. 3 in DTE, pin no. 2 in DCE
RxD – pin no. 2 in DTE, pin no. 3 in DCE
o Control Signals
RTS, CTS – used by DTE for hardware handshaking,
DTE activates RTS when it has data to send, waits till CTS is activated by DCE
DTE starts transmitting, keeps RTS activated till the end of communication
DTR, DSR – used by DTE for hardware handshaking
DTE activates DTR to inform that it is on-line, ready to establish comm.
DCE activates DSR to inform that it is on-line, ready to establish comm.
DCD – used by modem (DCE)
Indicates DTE when it connects with another modem or detects carrier tone.
RI – used by modem
Indicates the presence of ringing signal on communication channel
o Common Signals: SG
Dr. N. Mathivanan
• Signal voltage levels:
o RS-232 voltage levels different from TTL, CMOS voltage levels
o Uses bipolar voltages,
o Driver output and receiver input voltage profiles - noise margin +/- 2 V
o RS-232 uses single-ended signal transmission
o Interfacing RS-232 devices to TTL devices require RS-232
driver/receivers (E.g.: MAX232, MC1488 and MC1489A)
o Advantages of MAX232
Dr. N. Mathivanan
• Linking embedded systems / PCs by phone line using modem
o Local PC monitors RI input, Remote PC activates RI
o Local PC activates DTR, Local modem responds by activating DSR, Local
PC monitors DCD, Modem asserts DCD if it receives carrier signal
o Data transfer begins using RTS, CTS handshaking
o Data transfer takes place via TxD, RxD
o When transfer is completed, disables DTR, modem inhibits DSR, DCD
signals.
Dr. N. Mathivanan
• Communication between two DTEs
• Null Modem wiring
without handshaking, with handshaking, with loop-back handshaking
Dr. N. Mathivanan
• Daisy chaining
• RS-232 Characteristics
o Uses single-ended signaling (unbalanced transmission)
o Peer-to-peer communication
o Networking – daisy-chaining
o Speed Max. – 19.6 kbps,
o Distance Max. – 20 m
o Drawbacks: noise immunity low, short distance, low speed
o Still popular and widely used for communication within 20 m.
Dr. N. Mathivanan
• RS-422 Standard
o Characteristics
 Uses differential signaling (balanced signaling)
 Can be networked, master-slave, multi-drop, 1 driver & up to 7 receiver
 Communicates up to 1.2 km at 100 kbps and up to 10 m at 10 Mbps
 Backward compatible to RS-232
 Apple Macintosh computers include RS-422 ports (LocalTalk)
 Does not define connector, pin configuration
o Differential signaling (balanced transmission)
Dr. N. Mathivanan
• RS-422 driver-output and receiver–input voltage profiles
• Pins designated as ‘A’ (or ‘+’) and ‘B’ (or ‘-’)
• Signals are defined based on voltage at ‘A’ w.r.t. ‘B’
• Common mode voltage within +/- 10 V.
• RS-232, TTL, RS-422 voltage levels - Illustration
Dr. N. Mathivanan
• RS-422 half-duplex (2-wire), full-duplex (4-wire) networks
o Master transmitter can drive up to 7 slave receivers
o Echo cancellation logic needs to be implemented
Dr. N. Mathivanan
• RS-485 Standard
• Uses differential signaling (balanced transmission)
• Drivers & receivers have enable inputs, voltage profiles similar to
RS-422
• Common mode voltage range: +12 V to -7V
• Speed: 100 kbps if distance is 10 km, 10 Mbps if distance is less
than 20 m
• Multi-point communication
Dr. N. Mathivanan
RS-485 networks
o Multi master network,
o Allows up to 32 master/
slave combination
o 2-wire network is used
in LAN,
o 4-wire network uses 1
master, multiple slaves
o Requires termination
(120 Ω resistor)
Dr. N. Mathivanan
Comparison of RS-232, RS-422 and RS-485
Characteristic
parameter
RS-232 RS-422 RS-485
1.
Wiring for
communication
Single-ended Differential Differential
2. Signal type Unbalanced Balanced Balanced
3. Output voltage
Logic 0
+ 5 to + 15 V
w.r.t GND
+ 2 to + 6 V
on terminal A w.r.t B
+ 2 to + 6 V
on terminal A wr.t B
Logic 1
- 5 to - 15 V
w.r.t GND
- 2 to - 6 V
on terminal A w.r.t B
- 2 to - 6 V
on terminal A wr.t B
4. Data rate 20 kbps (max)
10 Mbps at 15 m
100 kpbs at 1200m
10 Mbps at 15 m
100 kpbs at 1200 m
5. Maximum cable length 15 m 1.2 km 10 km
6. Maximum drivers 1 1 32
7. Maximum receivers 1 7 32
8. Source impedance 300 Ω 100 Ω 100 Ω
9. Load impedance 3 to 7 kΩ 4 kΩ
10 Direction Uni-direction Uni-direction Bi-direction
11 Communication type Full-duplex
Half-duplex – 2-wire
Full-duplex – 4-wire
Half-duplex
12
Point-to-point /
master-slave
Point-to-point Master-slave Master-slave
Dr. N. Mathivanan
Universal Asynchronous Receiver Transmitter (UART)
• Basic functions of UART
o Converts llel data to stream of bits, adds framing bits, transmits at set rate
o Receives stream of bits, removes framing bits, converts to llel data
• 16C550 type UART (most common type in microcontrollers, PC)
o Inputs & Outputs are TTL compatible
o Speed: 0 – 1.5x106 baud
o Programmable baud rate generator,
o Independent transmitter and receiver blocks
o Separate 16 byte FIFOs for transmitter and receiver
o 8-bit registers – 12 nos. (data, control and status registers)
o Programmed in two stages:
 Initialization,
 Operation control: Transmitting characters, Receiving characters
Dr. N. Mathivanan
• Registers
o Divisor Latch Low (DLL) byte, High (DLH) byte registers
 For programming baud rate generator for transmitter
o Transmitter Holding Register (THR)
 Data byte to be transmitted is placed in this register
o Receiver Buffer Register (RBR)
 Data byte received by UART is read from this register
o FIFO Control Register (FCR)
 Used to clear FIFOs, set trigger level,
o Line Control Register (LCR)
 Control framing, allow access of DLL/DLH/THR/RBR register
o Line Status Register (LSR)
 Indicates error in reception, status of transmitter/receiver
Dr. N. Mathivanan
o Modem Control Register (MCR)
 Controls loopback mode, controls RTS/CTS, DSR/DTR, RI, DCD
o Modem Status Register (MSR)
 Indicates status changes on DCD, RI, DSR, CTS inputs
o Interrupt Enable, Interrupt Identification Register (IER, IIR)
 Control interrupt generation on THR empty, RBR full
o Scratch pad register (SCR)
 Not used in communication, but used to hold temp. data
Dr. N. Mathivanan
• 16C550D Block Diagram UART
Dr. N. Mathivanan
• UART Programming (Algorithm)
o Initializing
 Program DLL and DLH registers
 Define serial communication format (Program LCR register)
 Reset FIFOs (Program FCR register)
 Reset FIFO to enable transmission
o Transmitting characters
 Wait till Transmitter becomes ready
 Write a byte of character into THR register
 If more bytes are to be transmitted, write into THR till transmitter
FIFO becomes full.
o Receiving characters
 Checks if data has been received (by polling LSR)
 If received, checks if any error in communication (LSR)
 If no error, get data from RBR.
Dr. N. Mathivanan
Application - Example
• Remote I/O modules
o Communicate with host system through serial interfaces
o Microcontroller based embedded systems
o Small, intelligent, remotely powered,
o Provides varieties of analog/digital, input/output interfaces
Dr. N. Mathivanan
Dr. N. Mathivanan
Remote data acquisition
Reference
• PC Based Instrumentation: Concepts and Practice
N. Mathivanan, PHI Learning, V Printing, 2014
Dr. N. Mathivanan

More Related Content

What's hot (20)

PPT
Programming 8051 Timers
ViVek Patel
 
PPT
Dsss final
AJAL A J
 
PPTX
8255 PPI
deval patel
 
PPT
8051 interrupts
Shreyans Pathak
 
PPT
Convolutional Codes And Their Decoding
Kakali Saharia
 
PPT
8051 serial communication-UART
Pantech ProLabs India Pvt Ltd
 
PPT
Decimation in time and frequency
SARITHA REDDY
 
PPTX
M ary psk modulation
Ahmed Diaa
 
PPT
Rs232 485 fundamental
rounak077
 
PPTX
Handoff in Mobile Communication
Noushad Hasan
 
PPT
Power control in 3 g
Manish Srivastava
 
PPT
Interfacing adc
PRADEEP
 
PPT
Digital Communication 4
admercano101
 
PDF
8051 interfacing
KanchanPatil34
 
PPT
UART
Naveen Kumar
 
PPTX
Rs 232 interface
PREMAL GAJJAR
 
PPT
Memory organization of 8051
Muthu Manickam
 
PPTX
Serial Communication
UshaRani289
 
PDF
interfacing of temperature sensor LM 35 with 8051.pdf
Srikrishna Thota
 
PDF
Telecommunication switching system
Madhumita Tamhane
 
Programming 8051 Timers
ViVek Patel
 
Dsss final
AJAL A J
 
8255 PPI
deval patel
 
8051 interrupts
Shreyans Pathak
 
Convolutional Codes And Their Decoding
Kakali Saharia
 
8051 serial communication-UART
Pantech ProLabs India Pvt Ltd
 
Decimation in time and frequency
SARITHA REDDY
 
M ary psk modulation
Ahmed Diaa
 
Rs232 485 fundamental
rounak077
 
Handoff in Mobile Communication
Noushad Hasan
 
Power control in 3 g
Manish Srivastava
 
Interfacing adc
PRADEEP
 
Digital Communication 4
admercano101
 
8051 interfacing
KanchanPatil34
 
Rs 232 interface
PREMAL GAJJAR
 
Memory organization of 8051
Muthu Manickam
 
Serial Communication
UshaRani289
 
interfacing of temperature sensor LM 35 with 8051.pdf
Srikrishna Thota
 
Telecommunication switching system
Madhumita Tamhane
 

Viewers also liked (8)

PPTX
COA asynchronous data transfer
mitalimaniyar
 
PPTX
Serial data transfer
Dinesh Subhuraaj
 
PDF
Digital communication systems
Nisreen Bashar
 
PDF
8051 serial communication
asteriskbimal
 
PPT
Synchronous and asynchronous (1)
Akero pranpriya Sekcet
 
PPT
Serial Communication
Rashmi
 
PPS
Synchronous and-asynchronous-data-transfer
Anuj Modi
 
PPTX
Asynchronous and synchronous
Akhil .B
 
COA asynchronous data transfer
mitalimaniyar
 
Serial data transfer
Dinesh Subhuraaj
 
Digital communication systems
Nisreen Bashar
 
8051 serial communication
asteriskbimal
 
Synchronous and asynchronous (1)
Akero pranpriya Sekcet
 
Serial Communication
Rashmi
 
Synchronous and-asynchronous-data-transfer
Anuj Modi
 
Asynchronous and synchronous
Akhil .B
 
Ad

Similar to Asynchronous Serial Communication and standards (20)

PDF
Industrial Automation notes_unit2_part3_.pdf
DishendraJadhav1
 
PPT
Batch 25(a)
Elchuri Rajeswari
 
PPTX
serial_communication_part2_Jan2025_session1.pptx
manomykv
 
PPT
rs 232 compariosion with rs422 and rs485 standerds
stayfit167
 
PPT
RF MODULE Part-15
Techvilla
 
PPT
Network Components
zaisahil
 
PDF
MPS W8-L2L3 Programming AVR Serial Port Ia (in C).pdf
saadbutt43215
 
PPT
menjelaskan tentang hubungan kabel Rs232-485
GagakRimangIII
 
PPTX
MANDIDZA PPT lesson in data communication .pptx
AnesuZirereza
 
PPTX
Chapter 2.1.pptx
Tekle12
 
PPTX
Chapter 2.1.pptx
Tekle12
 
PPTX
Micro c lab8(serial communication)
Mashood
 
PPT
RS232-485_fundamental.ppt
RenuJain58
 
PPTX
interfaces.pptx
julie ailene asuncion
 
PPTX
BIPHASE Encoding data communication and networking . pptx
AnesuZirereza
 
PDF
Chapter 5 - Signal Encoding Techniques 9e
adpeer
 
PDF
Standards for Dividing Serial Interfaces
E-Lins Technology Co. Ltd.
 
PDF
Application of Computer and Information technology
abdulhaseeb19978
 
PDF
Lecture set 2
Gopi Saiteja
 
PPTX
Unit-2-04-digitatoDogitalconversion.pptx
Shilpachaudhari10
 
Industrial Automation notes_unit2_part3_.pdf
DishendraJadhav1
 
Batch 25(a)
Elchuri Rajeswari
 
serial_communication_part2_Jan2025_session1.pptx
manomykv
 
rs 232 compariosion with rs422 and rs485 standerds
stayfit167
 
RF MODULE Part-15
Techvilla
 
Network Components
zaisahil
 
MPS W8-L2L3 Programming AVR Serial Port Ia (in C).pdf
saadbutt43215
 
menjelaskan tentang hubungan kabel Rs232-485
GagakRimangIII
 
MANDIDZA PPT lesson in data communication .pptx
AnesuZirereza
 
Chapter 2.1.pptx
Tekle12
 
Chapter 2.1.pptx
Tekle12
 
Micro c lab8(serial communication)
Mashood
 
RS232-485_fundamental.ppt
RenuJain58
 
interfaces.pptx
julie ailene asuncion
 
BIPHASE Encoding data communication and networking . pptx
AnesuZirereza
 
Chapter 5 - Signal Encoding Techniques 9e
adpeer
 
Standards for Dividing Serial Interfaces
E-Lins Technology Co. Ltd.
 
Application of Computer and Information technology
abdulhaseeb19978
 
Lecture set 2
Gopi Saiteja
 
Unit-2-04-digitatoDogitalconversion.pptx
Shilpachaudhari10
 
Ad

Recently uploaded (20)

PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
July Patch Tuesday
Ivanti
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
July Patch Tuesday
Ivanti
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Biography of Daniel Podor.pdf
Daniel Podor
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 

Asynchronous Serial Communication and standards

  • 1. Asynchronous Serial Communication and Standards Dr. N. Mathivanan Visiting Professor Department of Instrumentation and Control Engineering National Institute of Technology, TRICHY, TAMILNADU INDIA
  • 2. Parallel Communication Serial Communication Cable Use large number of wires Use less number of wires Cable length Can’t use lengthy cables. EMI limits data rate Use long shield cables, protected from EMI Communication modes Only single shared path is available. Hence, can be only half-duplex Can have separate paths for transmission and reception. Hence, can be full-duplex Communication error Bits get corrupted due to capacitance effects between cable wires Only one bit is communicated at a time Data rate It is faster. Latest techniques offer faster / comparable rates. E.g.: PCI-Ex, SATA Serial Communication - Features Dr. N. Mathivanan
  • 3. Serial Communication Terminologies • Mark and Space: o Logic ‘H’ is Mark, Logic ‘L’ is Space • BAUD rate: o Baud rate & bit rate (bps) are different. o No. of time the serial communication signal changes (voltage level, frequency or phase angle) in one sec. If for each bit voltage level changes once, then bit rate = baud rate. • Channel: o Pathway between communicating devices o Physical wire, media (propagating radiated energy) • Protocol: o Set of rules defining procedures – no. of bits, framing, formatting, error detection methods, and control of comm. hardware Dr. N. Mathivanan
  • 4. • Network o Connecting multiple devices to same media for resource sharing • Point-to-point, Multi-drop, Multipoint o Point-to-point: Interface between devices having peer relationship o Multi-drop: One transmitter communicating with multiple receivers o Multipoint: Several devices communicating with several receivers Interfacing using serial interfaces involves conversion of parallel data bytes to stream of serial bits at transmitter end and detection, collection & conversion of bits to bytes at receiver end. Transmitter & receiver need to be synchronized for communication. • Serial Communication Formats o Synchronous communication o Asynchronous communication Dr. N. Mathivanan
  • 5. • Synchronous communication • Transmitter & receiver use common clock • Used for short distance, high volume, in blocks (instead of individual characters) and fast transfer • Standards merge clock & data, eliminate separate wire for clock (e.g. NRZ and bi-phase Manchester encoding) • Synchronous serial communication interfaces: I2C, SPI, Microwire, USB, IEEE1394 (FireWire) Dr. N. Mathivanan
  • 6. • Asynchronous communication o Framing  Start bit, data bits, parity bit, stop bits – Popular format 8N1 o Character oriented  Standard communication speeds:  110, 150, 300, 600, 1200, 2400, 4800, 9600, ………., 115.2 kbaud • Serial communication – Error checking methods o Checksum method o Cyclic redundancy check o Error flags Dr. N. Mathivanan
  • 7. • Signal encoding o RZ, NRZL, NRZL, Manchester, Manchester Differential • Compression o E.g.: Run-Length encoding, Huffman encoding Dr. N. Mathivanan
  • 8. • Serial communication modes o Simplex, Half duplex, Full duplex • Communication medium o Generally, metallic cables for distance up to 50 m, o Beyond 50 m and up to 4 km, signal is converted to differential and sent thro’ twisted pair cable, o Above 4 km, telephone line / fibre optic cable (has several advantages) used. • Serial communication – Classification of devices o DTE (Data terminal equipment)  Devices used as source / destination for the data, E.g.: PC o DCE (Data communication or Data carrier equipment)  Devices used in between DTEs, E.g.: Modem Dr. N. Mathivanan
  • 9. Asynchronous Serial Interface Standards • RS-232, EIA/TIA-232-F o The standard defines physical & electrical connection, voltage levels, noise margin, speed, and distance. o It is asynchronous interface, o It provides point-to-point interface and peer relationship between devices. • Pins & Signals o DCE devices have 25-pin socket, DTE devices have 25-pin plug o IBM modifies the RS-232 25-pin definition to 9-pin serial port o Applications use 2, 4 or all signals for communication o Signals classified into: Data, Control, Common & Timing signals Dr. N. Mathivanan
  • 10. o Data Signals TxD – pin no. 3 in DTE, pin no. 2 in DCE RxD – pin no. 2 in DTE, pin no. 3 in DCE o Control Signals RTS, CTS – used by DTE for hardware handshaking, DTE activates RTS when it has data to send, waits till CTS is activated by DCE DTE starts transmitting, keeps RTS activated till the end of communication DTR, DSR – used by DTE for hardware handshaking DTE activates DTR to inform that it is on-line, ready to establish comm. DCE activates DSR to inform that it is on-line, ready to establish comm. DCD – used by modem (DCE) Indicates DTE when it connects with another modem or detects carrier tone. RI – used by modem Indicates the presence of ringing signal on communication channel o Common Signals: SG Dr. N. Mathivanan
  • 11. • Signal voltage levels: o RS-232 voltage levels different from TTL, CMOS voltage levels o Uses bipolar voltages, o Driver output and receiver input voltage profiles - noise margin +/- 2 V o RS-232 uses single-ended signal transmission o Interfacing RS-232 devices to TTL devices require RS-232 driver/receivers (E.g.: MAX232, MC1488 and MC1489A) o Advantages of MAX232 Dr. N. Mathivanan
  • 12. • Linking embedded systems / PCs by phone line using modem o Local PC monitors RI input, Remote PC activates RI o Local PC activates DTR, Local modem responds by activating DSR, Local PC monitors DCD, Modem asserts DCD if it receives carrier signal o Data transfer begins using RTS, CTS handshaking o Data transfer takes place via TxD, RxD o When transfer is completed, disables DTR, modem inhibits DSR, DCD signals. Dr. N. Mathivanan
  • 13. • Communication between two DTEs • Null Modem wiring without handshaking, with handshaking, with loop-back handshaking Dr. N. Mathivanan
  • 14. • Daisy chaining • RS-232 Characteristics o Uses single-ended signaling (unbalanced transmission) o Peer-to-peer communication o Networking – daisy-chaining o Speed Max. – 19.6 kbps, o Distance Max. – 20 m o Drawbacks: noise immunity low, short distance, low speed o Still popular and widely used for communication within 20 m. Dr. N. Mathivanan
  • 15. • RS-422 Standard o Characteristics  Uses differential signaling (balanced signaling)  Can be networked, master-slave, multi-drop, 1 driver & up to 7 receiver  Communicates up to 1.2 km at 100 kbps and up to 10 m at 10 Mbps  Backward compatible to RS-232  Apple Macintosh computers include RS-422 ports (LocalTalk)  Does not define connector, pin configuration o Differential signaling (balanced transmission) Dr. N. Mathivanan
  • 16. • RS-422 driver-output and receiver–input voltage profiles • Pins designated as ‘A’ (or ‘+’) and ‘B’ (or ‘-’) • Signals are defined based on voltage at ‘A’ w.r.t. ‘B’ • Common mode voltage within +/- 10 V. • RS-232, TTL, RS-422 voltage levels - Illustration Dr. N. Mathivanan
  • 17. • RS-422 half-duplex (2-wire), full-duplex (4-wire) networks o Master transmitter can drive up to 7 slave receivers o Echo cancellation logic needs to be implemented Dr. N. Mathivanan
  • 18. • RS-485 Standard • Uses differential signaling (balanced transmission) • Drivers & receivers have enable inputs, voltage profiles similar to RS-422 • Common mode voltage range: +12 V to -7V • Speed: 100 kbps if distance is 10 km, 10 Mbps if distance is less than 20 m • Multi-point communication Dr. N. Mathivanan
  • 19. RS-485 networks o Multi master network, o Allows up to 32 master/ slave combination o 2-wire network is used in LAN, o 4-wire network uses 1 master, multiple slaves o Requires termination (120 Ω resistor) Dr. N. Mathivanan
  • 20. Comparison of RS-232, RS-422 and RS-485 Characteristic parameter RS-232 RS-422 RS-485 1. Wiring for communication Single-ended Differential Differential 2. Signal type Unbalanced Balanced Balanced 3. Output voltage Logic 0 + 5 to + 15 V w.r.t GND + 2 to + 6 V on terminal A w.r.t B + 2 to + 6 V on terminal A wr.t B Logic 1 - 5 to - 15 V w.r.t GND - 2 to - 6 V on terminal A w.r.t B - 2 to - 6 V on terminal A wr.t B 4. Data rate 20 kbps (max) 10 Mbps at 15 m 100 kpbs at 1200m 10 Mbps at 15 m 100 kpbs at 1200 m 5. Maximum cable length 15 m 1.2 km 10 km 6. Maximum drivers 1 1 32 7. Maximum receivers 1 7 32 8. Source impedance 300 Ω 100 Ω 100 Ω 9. Load impedance 3 to 7 kΩ 4 kΩ 10 Direction Uni-direction Uni-direction Bi-direction 11 Communication type Full-duplex Half-duplex – 2-wire Full-duplex – 4-wire Half-duplex 12 Point-to-point / master-slave Point-to-point Master-slave Master-slave Dr. N. Mathivanan
  • 21. Universal Asynchronous Receiver Transmitter (UART) • Basic functions of UART o Converts llel data to stream of bits, adds framing bits, transmits at set rate o Receives stream of bits, removes framing bits, converts to llel data • 16C550 type UART (most common type in microcontrollers, PC) o Inputs & Outputs are TTL compatible o Speed: 0 – 1.5x106 baud o Programmable baud rate generator, o Independent transmitter and receiver blocks o Separate 16 byte FIFOs for transmitter and receiver o 8-bit registers – 12 nos. (data, control and status registers) o Programmed in two stages:  Initialization,  Operation control: Transmitting characters, Receiving characters Dr. N. Mathivanan
  • 22. • Registers o Divisor Latch Low (DLL) byte, High (DLH) byte registers  For programming baud rate generator for transmitter o Transmitter Holding Register (THR)  Data byte to be transmitted is placed in this register o Receiver Buffer Register (RBR)  Data byte received by UART is read from this register o FIFO Control Register (FCR)  Used to clear FIFOs, set trigger level, o Line Control Register (LCR)  Control framing, allow access of DLL/DLH/THR/RBR register o Line Status Register (LSR)  Indicates error in reception, status of transmitter/receiver Dr. N. Mathivanan
  • 23. o Modem Control Register (MCR)  Controls loopback mode, controls RTS/CTS, DSR/DTR, RI, DCD o Modem Status Register (MSR)  Indicates status changes on DCD, RI, DSR, CTS inputs o Interrupt Enable, Interrupt Identification Register (IER, IIR)  Control interrupt generation on THR empty, RBR full o Scratch pad register (SCR)  Not used in communication, but used to hold temp. data Dr. N. Mathivanan
  • 24. • 16C550D Block Diagram UART Dr. N. Mathivanan
  • 25. • UART Programming (Algorithm) o Initializing  Program DLL and DLH registers  Define serial communication format (Program LCR register)  Reset FIFOs (Program FCR register)  Reset FIFO to enable transmission o Transmitting characters  Wait till Transmitter becomes ready  Write a byte of character into THR register  If more bytes are to be transmitted, write into THR till transmitter FIFO becomes full. o Receiving characters  Checks if data has been received (by polling LSR)  If received, checks if any error in communication (LSR)  If no error, get data from RBR. Dr. N. Mathivanan
  • 26. Application - Example • Remote I/O modules o Communicate with host system through serial interfaces o Microcontroller based embedded systems o Small, intelligent, remotely powered, o Provides varieties of analog/digital, input/output interfaces Dr. N. Mathivanan
  • 27. Dr. N. Mathivanan Remote data acquisition
  • 28. Reference • PC Based Instrumentation: Concepts and Practice N. Mathivanan, PHI Learning, V Printing, 2014 Dr. N. Mathivanan