Electronic – arduino – Reasons using RS232 instead of USB

arduinouart

I was trying to figure out the real reasons why USB signals are converted to RS232 serial. I came to understand that(if I am not wrong) USB is faster and synchronous, whereas the chips are using UART which needs RS232 protocol.

Are all the chips designed for TTL(RS232) serial data communication? Is that the reason USB is never directly used for data communication with integrated circuits?

And one more thing related. When we are uploading sketch(code) to the Arduino micro-controller, we configure the baudrate first i.e. 9600. I think this is the data transfer speed from USB to Arduino. If USB is converted to RS 232 before reaching to the UART of the ATMEGA what is changing? Voltage level? Baudrate? Is the baudrate still 9600 at the UART?

Best Answer

TTL and RS232 are mutually exclusive (although you can easily convert from one to the other). I think you are switching around UART and RS232. UART is timings, bit order, numbers of bits, etc., but not voltages. RS232 adds voltages, connectors and pinouts, etc on top of UART. It is one of many physical manifestations of UART communication. TTL is another physical manifestation of the UART protocol, and is often used chip to chip. (There is technically nothing RS232 on the Arduino - I don't think I've ever heard of a micro that actually works with RS232 levels) There are several reasons for using a USB-UART or USB-RS232 chipsets/circuits:

  1. Legacy hardware and entrenched design preferences: Industrial automation and other types of ruggedized electronics like to use RS232 and other tried-and-tested communications methods, especially when speed is often not a serious limitation. RS232/UART are also much easier to electrically isolate than USB for safety when working with line voltage devices.

  2. Direct USB is more involved to implement as a device, and much more involved to implement as a host. If I design an RS232 device, anyone else can design something that works with it quite easily. This is true of both PC hosts and micro-based hosts. RS232 is much simpler in both cases.

  3. You can communicate to some VERY small micros using UART, but the smaller 50% (give or take) of micros don't have USB support. Also, you can hit pause on your debugger while using UART without Windows killing communication on your device :)

As for the Arduino baud rate, it is confusing. This has no effect on the communication between the computer and the USB-UART chip (FTDI, etc). This is not UART communication, but a USB-CDC class to emulate an RS232 (or other UART) serial port over USB. The baud rate takes effect between this chip and the micro, which is actual 5V (TTL/CMOS) UART communication.

Related Topic