Serial communication is a way for data transmission over long distances. Commonly associated with RS232 and TTL serial, it enables Arduino and other microcontrollers to communicate with your computer or other serial devices.
Though technology has advanced and we currently have faster means of data transfer such as USB, serial communication is still widely seen and applicable in our lives.
In today’s blog, we’ll talk about serial communication, namely the following:
Serial Communication is a way for data transfer, transmitting over one wire, one bit, at a time. Involving two parties; Transmitter and Receiver, data transferred is in the form of binary pulses through different methods of serial digital binary.
Sounds complex? Not to worry, I’ll break it down into different parts!
To first understand what’s Serial Communication, you’ll need to understand its characteristics! These characteristics are crucial for communication with serial ports.
Baud Rate
Stop Bits
Parity Bit
Serial Communication process simplified:
For a detailed explanation of how does the Serial Communication work, you can check out this article!
From above, we’ve understood that serial communication involves two parties; Transceiver and Receiver. However, do you know they each could play a different role depending on the transmission modes?
When transmitting data in Serial Communication, there are different transmission modes that result in a difference!
You may be wondering what are they? Well, there are 3 modes; Simplex, Half Duplex, Full Duplex.
Simplex Method
Half-Duplex Mode
Full-Duplex Mode (Most commonly used)
We’ve now understood more about Serial, but do you know there’s another communication method? Serial communication is one way, but the other would be through parallel communication.
Here’s a quick comparison to help you get a better understanding of both worlds:
Serial Communication | Parallel Communication | |
---|---|---|
Data Transfer | Bits are sent bit by bit at one clock pulse | Sends data in multiple bits at a time |
Speed | Slower transmission speed | Faster transmission speed |
Connection | Uses fewer connections and cables Suitable for long distance communication |
Uses more wires, may result in signal distortion Not suitable for long distance transmission |
Cost and Space | Less cost and space needed as it uses fewer wires | Higher cost and space needed to accomodate more wires |
Sending and Receiving Data | Full duplex or Half Duplex | Semi duplex or Half Duplex |
Examples | PC to PC, PC to MCU | PC to multi function printer |
The main difference between serial communication and parallel communication would be:
Serial Communication is better, here’s why!
Though parallel communication may seem like the better choice with its higher data transfer rate, Serial communication supports full-duplex, allowing for simultaneous transmission and reception of data. With this, it’s still possible for serial to be faster!
Also, with microcontrollers like Arduino using serial communication, it’s way more applicable to modern-day usages!
We’ve now understood about serial communication and what it does. Moving on, we’ll be taking a look at two of the more popular hardware implementations of serial: TTL and RS-232. First up, RS-232!
When working with Serial Communication, you’ll bound to come across the term RS-232. What’s RS232 you may ask?
RS232 is the first serial communication protocol that’s widely used as a communication method for computers and devices by serial ports. Similar to your microcontroller serial signals, it transmits data a bit at one time.
RS232 works by connecting Data Transmission Equipment (DTE) and Data Communication Equipment (DCE), which has pins like TXD, RXD, and RTS&CTS.
Parameters | RS232 |
---|---|
Transmission Mode | Simplex |
Max connected devices | 2 devices: 1 driver, 1 receiver |
Max. transmission rate | 20Kbps |
Max. cable length | 15m |
Operation mode | Single-ended (unbalanced type) |
Features | Short distance Full-duplex 1:1 connection |
Advantages
Disadvantages
Note: RS232 standard is a protocol of the physical level and does not define the transmission speed of all related devices. Transport protocols vary based on devices used.
Now that you’ve gotten a basic understanding on the RS232, let’s take a look at a few RS232 devices and its usages:
The Grove – RS232 allows Arduino serial communication to take place, connecting through a plug and play instead of having to solder, use jumper wires, etc.
Can’t believe how easy it is? Thanks to our Grove system, it’s indeed that easy!
TTL stands for Transistor-Transistor Logic, a serial communication commonly found in UART (universally asynchronous receiver/transmitter) transmission method, a method seen in most microcontrollers these days.
Advantages:
Disadvantages:
Susceptibility to external conditions
RS232 more extreme voltages help make it less susceptible to noise, interference, and degradation.
Minimum and Maximum voltages
The minimum and maximum voltages of RS-232 signals are +/-13V, while TTL signals are 0 to 3.3V/5V.
Ease of pairing with a microcontroller
TTL serial would be an easier option for microcontroller pairing since it operates nicely between a microcontroller voltage supply range.
Logic levels
Logic levels between the RS232 and TTL are inverted, with the “1”s and “0”s inverted from each other.
Overall, TTL is much easier to implement into embedded circuits. However, lower voltage levels limit long transmission usages. This makes the RS232 a more versatile all-around option.
As the RS232 is complex in nature, do consider the recommended RS232 products for easy connection with your Arduino or other microcontrollers!