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:
- What is Serial Communication
- Characteristics of Serial Communication
- How does Serial Communication work
- Transmission modes in serial communication
- Serial vs Parallel communication
- Hardware Implementations of Serial Communication
- RS232 explained
- TTL explained
- RS232 vs TTL
What is Serial Communication?
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!
Characteristics of Serial Communication
To first understand what’s Serial Communication, you’ll need to understand its characteristics! These characteristics are crucial for communication with serial ports.
- Used to measure the speed of transmission, it refers to the number of bits passing in one second.
- Higher baud rates indicate a higher number of bigs per second passed
- Stop Bits are used for a single packet to stop the transmission denoted as “T”. Typical values are 1, 1.5 & 2 bits
- Parity Bit is a function used to find errors in the data. There are of 4 kinds, i.e., even, odd, marked and spaced
How does Serial Communication work?
Serial Communication process simplified:
- Serial communicating first involves two serial devices, each having two serial pins;
- The receiver, RX
- The transmitter, TX
- Both devices are then wired by connecting wires from the master device’s TX to the listener’s RX line
- Devices communicate serially through signal methods, popular ones being; TTL serial, RS-232
For a detailed explanation of how does the Serial Communication work, you can check out this article!
Transmission Modes in Serial Communication
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.
- One way communication, only the sender or receiver is active at a time.
- Example: Radio, Television
- Both the sender and receiver are active but not at a time. If the sender transmits, the receiver can accept but cannot send, vice versa.
- Example: Internet
Full-Duplex Mode (Most commonly used)
- Both the sender and receiver can transmit and receive at the same time.
- Example: Smartphone communication
Serial vs Parallel Communication
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: Sending data one bit at a time
- Parallel: Sending data in multiple bits at a time
Is serial communication or parallel communication better?
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!
Hardware Implementations of Serial Communication
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!
What is RS232?
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.
- TXD: Transmitter
- RXD: Receiver
- RTS: Request to Send
- CTS: Clear to Send
- GND: Ground
RS232 Features and Parameters:
|Max connected devices||2 devices:
1 driver, 1 receiver
|Max. transmission rate||20Kbps|
|Max. cable length||15m|
|Operation mode||Single-ended (unbalanced type)|
Advantages and Disadvantages of RS232
- Low cost
- Widely available and applicable due to its long presence in the telecommunications industry
- Simple wiring and connectors with only max support for 1 driver and 1 receiver
- Data transfer speed floats around 20kilobytes per second, slower than what we’re used to now
- No more than 50 feet apart for a point-to-point connection between a computer and device
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.
RS232 Communication devices
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!
- This is an industrial USB to RS232/485/TTL isolated converter with the original FT232RL inside.
- The USB TO RS232/485/TTL is very easy to use, fully automatic transceiving without delay. Due to its fast communication, stability, reliability, and safety, it is an ideal choice for industrial control equipment and/or applications with high communication requirements.
- It features:
- Embedded protection circuits such as power isolation, ADI magnetical isolation, and TVS diode, etc.
- An aluminium alloy enclosure which makes it solid and durable
What is TTL serial?
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 and Disadvantages of TTL Serial
- Low cost
- High availability
- High compatibility with microcontroller
- Ease of usage
- Noisy, due to poor noise margin
- Limited speed and frequency
- Higher power consumption at higher frequencies
RS232 vs TTL: What’s the difference?
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 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!
- RS232 module: Grove – RS232
- Connecting computer with MCU:
RS-232 To TTL Converter (MAX3232IDR)
- Industrial Application purposes:
USB TO RS232 / RS485 / TTL Industrial Isolated Converter