We take a USB drive, plug it in our computer or TV, and voila! We transfer the files or play from the drive. So, how is it that computers or digital devices are able to talk to each other?
Essentially, devices talk to each other by connections between ports. We use ports to connect to various devices and data moves between them just like how planes move people from one airport to another. There are different types of ports (as seen above) for different needs and for different types of communications.
Device Communications
Serial and parallel communications (also known as serial and parallel transmission) are two modes of communication used by all digital devices such as computers, tablets, laptops, mouse, printers, televisions and speakers. The most common serial communication devices are the USB port and RS232 port that we use very often. The most common parallel port is the Centronics port (shown below), usually used with a printer. Today, the parallel port interface is virtually non-existent in new computers because of the rise of Universal Serial Bus (USB) devices, along with network printing using Ethernet and Wi-Fi connected printers.
A serial port connection consists of just two wires – one for sending data and another for receiving. As such, serial devices should have two serial pins: the receiver, RX, and the transmitter, TX. It’s important to note that those RX and TX labels are with respect to the device itself. So the RX from one device should go to the TX of the other, and vice-versa. The transmitter of one device should be talking to the receiver of the other device.
For kids familiar with Arduino Uno, the pins 0 and 1 are the receiver and transmitter. The Serial monitor displays the data transmitted from and received to these pins. Only one set of transmitter and receiver is provided in most of the Arduino Uno boards.
RX and TX LEDs – these are like the ‘send’ and ‘receive’ LEDs on your cable modem. They blink whenever information is sent from or to the Arduino through the USB connection. The TX LED lights up yellow whenever data is sent from the Arduino to the computer USB port. The lighting up of the LEDs indicate the direction of flow of data. When a bit of data goes from the Arduino board to the computer, the TX LED glows. The RX LED glows when a bit of data goes from the computer to the Arduino board.
Just within serial type of communication, there are different ways it can be done. There are different protocols of doing serial communication: CAN, UART, ETHERNET, I2C, SPI, RS232, USB, 1-Wire, and SATA. For example, within Arduino Uno three different types of serial communications are supported.
So, to summarise what we learnt, devices connect with each other using different wired ports. Each of these ports are either serial or parallel in communications. Within the serial and parallel communications, we have different protocols (ways) of communication.
Now, that we got some background about the various ports and the types of communications – serial and parallel – in the next post we’ll see how these serial communications actually work at a bit by bit level. And what was the necessity to have so many different types of ports historically.