Serial port:
A serial port is a physical or logical interface in a computer or device used for serial
communication. A serial port is a type of computer port through which data bits are
transmitted as electrical signals as a single stream of binary 0s and 1s. A serial port provides
only a single transmission path, which can be a single wire, a pair of wires, or a single
channel in the case of wireless communications.
Serial ports are the oldest communication interface and are primarily used to connect printers
and modems to computer systems. But in modern computers, serial ports are used to connect
modern devices like flat panel monitors, security cameras, GPS devices, etc. A serial port is
sometimes called a COM port (or communications port). The most common serial ports are
based on the RS-232 standard, which specifies the electrical characteristics and signal format
for serial communications. A serial port uses a serial communication protocol, which includes
a transmit line (TXD, to transmit data), a receive line (RXD, to receive data), and possibly
other control lines.
Serial port connection to DB-9
DB-9 (D-Subminiature 9-pin) is a common connector that is commonly used in serial ports,
especially in the RS-232 standard. The DB-9 connector has 9 pins and provides a physical
interface for serial communication between connected devices.
In RS-232 serial communications, the pins of the DB-9 connector are typically used for the
following purposes:
TXD (Transmit Data): Transmission data line, used to transmit data from the sending
direction to the receiving direction.
RXD (Receive Data): Receive data line, used to receive data from the receiving direction.
ND (Ground): Ground wire, providing a current return path.
RTS (Request to Send): Request to Send, used by the sender to notify the receiver that it is
ready to send data.
CTS (Clear to Send): Clear to Send, used by the receiver to notify the sender that it is ready
to receive data.
DSR (Data Set Ready): The data set is ready, indicating that the device is ready to receive or
send data.
DTR (Data Terminal Ready): Data terminal ready, indicating that the device is ready for data
communication.
DCD (Data Carrier Detect): Data carrier detection, indicating that the communication carrier
with the remote device has been detected.
RI (Ring Indicator): Ring tone indicator, used to indicate whether there is an incoming call on
the phone line
Common serial ports
[Link]-232 serial port
RS-232 can only be used to connect a PC to a single device. Typically, it is used to connect a
mouse, modem, or keyboard to a computer. Some of the limitations of this port include data
transfer speed and a transmission distance limit of 50 feet or 15 meters. RS-232 can only
transmit data at speeds from 20 Kbps to 115.2 Kbps. Additionally, due to its single-ended
data transmission, this port is susceptible to transmission noise and data errors.
[Link]-422 serial port
An RS-422 serial port is very similar to RS-232, but has some advantages. Unlike RS-232,
which has a maximum cable distance of 15 meters, RS-422 supports a maximum cable
distance of 1,200 meters or 4,000 feet. Additionally, it can connect one master device to
multiple slave devices, allowing the port to transfer data to up to 10 different devices. This is
unlike RS-232, which can only transmit data to a single device. Additionally, it is better
immune to transmission noise than RS-232 because it uses separate wire pairs to send/receive
data and operate. In differential data transmission mode
[Link]-485 serial port
RS-485 is based on RS-422 port technology. Like RS-422, it supports data transfer speeds of
up to 10Mbs and distances of up to 1,200 meters or 4,000 feet. However, the RS-485 serial
port supports connecting up to 32 devices (22 more devices than RS-422 devices); however,
only one device can transmit data at a time. Although serial ports are active in industrial
environments, serial COM ports now share the same space as USB ports in most industrial-
grade computers for additional device connections.
Parallel Port
The parallel port is mainly used to connect computer peripherals that require high bandwidth.
The parallel port transmits eight bits simultaneously through eight separate lines and is used
to connect peripherals to the computer system. As the name suggests, parallel ports can
transfer multiple bits of data simultaneously. So, in case of parallel port, the data transfer rate
is relatively high as compared to serial port as parallel port does not transmit data without any
delay. The parallel port is used to connect printers, hard drives, CD drives, etc. All lines
should be at the same speed to avoid errors and crosstalk issues. To avoid such problems, the
length of the wires should be kept short. The parallel port uses a D-25 connector, a 25-pin D-
shaped connector that connects to the transmission line.
Parallel Port Connection to DB-25
DB-25 (D-Subminiature 25-pin) is a connector commonly used for parallel ports, especially
in computer systems of the past. The DB-25 connector has 25 pins and provides multiple
lines suitable for parallel communications where multiple data bits can be transmitted
simultaneously.
In the past, a common parallel port standard was IEEE 1284, which specified the electrical
and protocol specifications for printer ports. DB-25 connectors are commonly used to
implement this parallel communication connection. Common pinouts for this connector may
include:
D0-D7: Data lines, used to transmit 8-bit data.
Strobe (or host request): A signal used to indicate that data is ready for transmission.
Acknowledge (or printer ready): A signal indicating that the printer is ready to receive data.
Busy: A signal indicating that the device is busy.
Paper-Out: A signal indicating that the printer is out of paper.
Error: A signal indicating a printer error.
Common parallel ports
[Link] interface
One of the earliest parallel interface standards, widely used for connecting printers. Typically
a DB-25 connector is used.
Features: Provides 8-bit data lines, as well as some control lines, such as "Strobe" (used to
indicate that data is ready for transmission) and "Busy" (used to indicate whether the printer
is busy).
[Link] 1284 interface
A series of standards that incorporates the previous Centronics standard and extends and
improves upon it. Use DB-25 or Centronics connector.
Features: Provides high-speed transmission and more functions, supporting two-way
communication. Common IEEE 1284 standards include EPP (Enhanced Parallel Port) and
ECP (Extended Capabilities Port)
Difference between serial port and parallel port
DATA COMMUNICATIONS
When we communicate, we are sharing information. This sharing can be local or remote.
Between individuals, local communication usually occurs face to face, while remote
communication takes place over distance. The term telecommunication, which includes
telephony, telegraphy, and television, means communication at a distance (tele is Greek for
"far"). The word data refers to information presented in whatever form is agreed upon by the
parties creating and using the data.
Data communications are the exchange of data between two devices via some form of
transmission medium such as a wire cable. For data communications to occur, the
communicating devices must be part of a communication system made up of a combination
of hardware (physical equipment) and software (programs).
The effectiveness of a data communications system depends on four fundamental
characteristics: delivery, accuracy, timeliness, and jitter.
1. Delivery: The system must deliver data to the correct destination. Data must be
received by the intended device or user and only by that device or user.
2. Accuracy: The system must deliver the data accurately. Data that have been altered
in transmission and left uncorrected are unusable.
3. Timeliness: The system must deliver data in a timely manner. Data delivered late
are useless. In the case of video and audio, timely delivery means delivering data as
they are produced, in the same order that they are produced, and without significant
delay. This kind of delivery is called real-time transmission.
4. Jitter: It refers to the variation in the packet arrival time. It is the uneven delay in
the delivery of audio or video packets. For example, let us assume that video packets
are sent every 3ms. If some of the packets arrive with 3ms delay and others with 4ms
delay, an uneven quality in the video is the result.
Components of data Communication
A data communications system has five components (see Figure 1.1).
I. Message: The message is the information (data) to be communicated. Popular forms of
information include text, numbers, pictures, audio, and video.
2. Sender: The sender is the device that sends the data message. It can be a computer,
workstation, telephone handset, video camera, and so on.
3. Receiver: The receiver is the device that receives the message. It can be a computer,
workstation, telephone handset, television, and so on.
4. Transmission medium. The transmission medium is the physical path by which a message
travels from sender to receiver. Some examples of transmission media include twisted-pair
wire, coaxial cable, fiber-optic cable, and radio waves.
5. Protocol. A protocol is a set of rules that govern data communications. It represents an
agreement between the communicating devices. Without a protocol, two devices may be
connected but not communicating, just as a person speaking French cannot be understood by
a person who speaks only Japanese.
Mode of Communications
Communication between two devices can be simplex, half-duplex, or full-duplex as shown in
Figure 1.2.
Simplex: In simplex mode, the communication is unidirectional, as on a one-way street. Only
one of the two devices on a link can transmit; the other can only receive (see Figure 1.2a).
Keyboards and traditional monitors are examples of simplex devices. The keyboard can only
introduce input; the monitor can only accept output. The simplex mode can use the entire
capacity of the channel to send data in one direction.
Half-Duplex In half-duplex mode, each station can both transmit and receive, but not at the
same time. : When one device is sending, the other can only receive, and vice versa (see
Figure 1.2b). The half-duplex mode is like a one-lane road with traffic allowed in both
directions. When cars are traveling in one direction, cars going the other way must wait. In a
half-duplex transmission, the entire capacity of a channel is taken over by whichever of the
two devices is transmitting at the time. Walkie-talkies and CB (citizens band) radios are both
half-duplex systems. The half-duplex mode is used in cases where there is no need for
communication in both directions at the same time; the entire capacity of the channel can be
utilized for each direction.
Full-Duplex In full-duplex mode of communication (also called duplex), both stations can
transmit and receive simultaneously (see Figure 1.2c).The full-duplex mode is like a two-way
street with traffic flowing in both directions at the same time. In full-duplex mode, signals
going in one direction share the capacity of the link: with signals going in the other direction.
This sharing can occur in two ways: Either the link must contain two physically separate
transmission paths, one for sending and the other for receiving; or the capacity of the channel
is divided between signals traveling in both directions. One common example of full-duplex
communication is the telephone network. When two people are communicating by a
telephone line, both can talk and listen at the same time. The full-duplex mode is used when
communication in both directions is required all the time. The capacity of the channel,
however, must be divided between the two directions.