Lesson - 2: Ports or Devices Communication and Communication - Protocols
Lesson - 2: Ports or Devices Communication and Communication - Protocols
Lesson - 2: Ports or Devices Communication and Communication - Protocols
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
Two Modes of communication between the devices and computer system Full Duplex Both devices or device and computer system simultaneously communicate each other Half Duplex Only one device can communicate with another at an instance
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
Three ways of communication between the ports or devices Synchronous Iso-synchronous Asynchronous
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
Synchronous Communication When a byte (character) or a frame (a collection of bytes) in of the data is received or transmitted at the constant time intervals with uniform phase differences, the communication is called as synchronous. Bits of a full frame are sent in a prefixed maximum time interval.
2008 Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education 5
Iso-synchronous Synchronous communication special case when bits of a full frame are sent in the maximum time interval, which can be variable.
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
Synchronous Communication
Clock information is transmitted explicitly or implicitly in synchronous communication. The receiver clock continuously maintains constant phase difference with the transmitter clock. Bits of a data frame maintain uniform phase difference and are sent within a fixed maximum time interval
2008 Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education 7
Example of synchronous serial communication Frames sent over a LAN. Frames of data communicate with the constant time intervals between each frame remaining constant. Another example is the inter-processor communication in a multiprocessor system
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
2008
Always present Synchronous device port data bits Reciprocal of T is the bit per second (bps). Data bits m frame bits or 8 bits transmit such that each bit is at the line for time T or, each frame is at the line for time (m. T) m may be 8 or a large number. It depends on the protocol
2008 Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education 10
Synchronous device clock bits Clock bits Either on a separate clock line or on data line such that the clock information is also embedded with the data bits by an appropriate encoding or modulation Generally not optional
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
11
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
12
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
14
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
15
Asynchronous Communication Clocks of the receiver and transmitter independent, unsynchronized, but of same frequency and variable phase differences between bytes or bits of two data frames, which may not be sent within any prefixed time interval.
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
16
Each successive byte can have variable time-gap but have a minimum in-between interval and no maximum limit for full frame of many bytes
2008 Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education 17
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
18
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
19
Clock Features
The transmitter does not transmit (neither separately nor by encoding using modulation) along with the serial stream of bits any clock rate information in the asynchronous communication and receiver clock thus is not able to maintain identical frequency and constant phase difference with transmitter clock
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
20
Example: IBM personal computer has two COM ports (communication ports) COM1 and COM2 at IO addresses 0x2F8-0xFF and 0xx38-0x3FF Handshaking signals RI, DCD, DSR, DTR, RTS, CTS, DTR Data Bits RxD and TxD
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
21
When a modem connects, modem sends data carrier detect DCD signal at an instance t0. Communicates data set ready (DSR) signal at an instance t1 when it receives the bytes on the line. Receiving computer (terminal) responds at an instance t2 by data terminal ready (DTR) signal.
2008 Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education 22
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
24
3. Communication Protocols
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
25
1. Protocol A protocol is a standard adopted, which tells the way in which the bits of a frame must be sent from a device (or controller or port or processor) to another device or system [Even in personal communication we follow a protocol we say Hello! then talk and then say good bye!]
2008 Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education 26
1) sent synchronously or Isosynchronously or asynchronously and at what rate(s)? 2) preceded by the header bits?
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
27
3) How the receiving device address communicated so that only destined device activates and receives the bits? [Needed when several devices addressed though a common line (bus)]
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
28
4) How can the transmitting device address defined so that receiving device comes to know the source when receiving data from several sources? 5) How the frame-length defined so that receiving device know the frame-size in advance?
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
29
2008
30
length permitted per frame 9) Line supply and impedances and line-Connectors specifications
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
31
Specified protocol at an embedded system port or communication device IO port bits sent after first formatted according to a specified protocol, which is to be followed when communicating with another device through an IO port or channel
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
32
Protocols
HDLC, Frame Relay, for synchronous communication For asynchronous transmission from a device port RS232C, UART, X.25, ATM, DSL and ADSL For networking the physical devices in telecommunication and computer networks Ethernet and token ring protocols used in LAN networks
2008 Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education 33
Protocols in embedded network devices For Bridges and routers Internet appliances application protocols and Web protocols HTTP (hyper text transfer protocol), HTTPS (hyper text transfer protocol Secure Socket Layer), SMTP (Simple Mail Transfer Protocol), POP3 (Post office Protocol version 3), ESMTP (Extended SMTP),
2008 Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education 34
TELNET (Tele network), FTP (file transfer protocol), DNS (domain network server), IMAP 4 (Internet Message Exchange Application Protocol) and Bootp (Bootstrap protocol).
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
35
Embedded wireless appliances uses wireless protocols WLAN 802.11, 802.16, Bluetooth, ZigBee, WiFi, WiMax,
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
36
Summary
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
37
We learnt Three communication types- synchronous, iso-synchronous and asynchronous Synchronous communication provides for sync code bits, data bits and clock bits at constant time intervals, Receiver (slave) synchronizes clock frequency and phase with the transmitter (master) Synchronous communication fast
2008 Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education 38
We learnt Isosynchronous communication a special case of synchronous communication Asynchronous communication provides for handshaking bits and variable time intervals for bytes/frame communication Examples of IBM PC COM port and modem handshaking bits
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
39
2008
Chapter-3 L02: "Embedded Systems - " , Raj Kamal, Publs.: McGraw-Hill Education
41