Understanding the UART Interface

Source: Internet
Author: User

Did not study carefully, the use of the next, summed up the point, also searched a bit of information.

--------------------------------------------------------------------------------------------------------------- -------------

Simple to speak: (UART and COM)

Embedded inside said serial port, generally refers to the UART port, but we often do not know it and COM port differences, as well as RS232, TTL and other relationships, in fact, uart,com refers to the physical interface form (hardware), and TTL, RS-232 refers to the level standard (electrical signal).

The UART has 4 pins (VCC, GND, RX, TX) with a TTL level of 0 (0V) and a high level of 1 (3.3V or higher).


COM ports are commonly used on our desktops (below), 9 pin, with the RS232 level, it is a negative logic level, it defines +5~+12v as low, and -12~-5v is a high level

to say in detail:

characteristics of the UART

The general UART controller in the embedded system is done in the CPU together, like the Freescale IMX6 chip is so, there are multiple UART controllers.

pin Introduction (COM port comparison multiple pin, but commonly used also these several):

VCC: power pin, generally 3.3v, there is no electrical protection on our board, this pin is generally not safe to connect

GND: grounding pin, sometimes Rx accepts data problems, it is necessary to pick up this pin, generally can not answer

RX: receive data pin

TX: send data pin, I ran into the serial port can only receive data, can not send data problems, Baidu, the original is set up flow control, cancellation can be, applicable to PUTTY,SECURECRT

In the debugging, most of the time we only draw rx,tx. such as debugging GPS module, IC data directly through the UART report, I directly used two lines connected out of the RX,TX, and connected to the serial port to the USB small board, the computer from the serial port directly to obtain data, so skipped the development Board, testing the GPS data there is no problem.

How to use:

We often use the UART port for debugging, but the UART data to be transmitted to the computer analysis to match the interface of the computer, usually our computer using the interface has a COM port and USB port (eventually on the computer is a virtual COM port), but want to connect the two interfaces need to do hardware interface conversion and level translation.

If you are connecting to a computer COM port, you need a conversion board similar to the one below, which implements TTL level and RS232 levels, which I have used before, but is seldom used now.


If you want to connect the USB interface, you need a small board similar to the following, it realizes TTL and USB level conversion, this use more.


The circuit diagram and connection are as follows, usually with a special conversion chip.

Summary

1, the serial port, the COM port refers to the physical interface form (hardware). and TTL, RS-232, RS-485 refers to the level standard (electrical signal).
2. When the device is connected, the GND RX TX is usually only connected. Do not connect VCC or + 3.3v power cords to avoid power conflicts with the target device.
3, PL2303, CP2102 chip is USB to TTL serial port chip, with USB to expand the serial port (TTL level)
4, MAX232 chip is TTL level and RS232 level of dedicated bidirectional conversion chip, can be TTL to RS-232, can also RS-232 turn TTL.
5, TTL standard is low level is 0, high level is 1 (the level of the + +). The RS-232 standard is a positive level of 0 and a negative level of 1 (±15v level).
6, RS-485 and RS-232 similar, but the use of differential signal negative logic. This is a bit of a skip.

Baidu on this article summed up a good:

Serial port, COM port, TTL, RS-232, RS-485 difference detailed

other

There are two ways to communicate in serial port: Synchronous communication mode and asynchronous communication mode

SPI (Serial peripheral Interface: Serial Peripheral Interface);
I²c (INTER IC bus), one (host) to many, sent in bytes.

UART (Universal Asynchronous Receiver transmitter: Universal Asynchronous Transceiver), one-to-one, sent in bits.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.