The basic concept of the UART Learning Path (i.)

Source: Internet
Author: User

First blog, the first record of the one weeks of learning content.

The first of the UART learning path is the introduction of the basic concept of the UART. Follow-up will use stm32f407 serial port and PC communication. Finally, Verilog HDL is used to write the serial transmitting module and receiving module, complete the simulation and complete the communication on the Zedboard board.

First clarify what is uart,com mouth, ttl,rs-232.

The universal Asynchronous transceiver transmitter (Universal asynchronous Receiver/transmitter, UART) has 4 pins for vcc,gnd,tx,rx, and the level standard is TTL level. The low level is 0 and the high level (3.3V) is 1. Picture of the left four interface is the serial port, the right is the USB interface.

Vcc:uart power supply port, the voltage is 3.3V;

The land of Gnd:uart;

Tx/txd:uart data transmitting port;

Rx/rxd:uart data receiving port;

The serial communication port (Cluster communication port, COM) is DB9 or DB25. The level standard is RS-232, the low level is +5~+12v, and the high level is -12~-5v. A detailed definition of the level interface is shown.

Extended:

1.RS-485 is the transmission of data in the form of a negative logical differential signal. +2V~+6V indicates low level,-6v~-2V indicates high level;

2. Some pins on the chip can be set to the RX and TX ports of the UART. The use of the DuPont line to connect Rx and TX to the peripherals enables information transfer, such as control of the smart LCD (USART HMI);

3.UART turn into COM port need to convert TTL level to RS-232 level, can be realized by Chip MAX232.

The 4.UART turns into a USB level that requires the use of a PL2303 chip.

Summarize:

UART and COM are interfaces on the hardware, while TTL and RS-232 specify the level of the standard. The UART typically uses the DuPont line to connect TX and RX to peripherals, while COM ports use DB9 to connect to peripherals. Compared to the two connection modes, the DuPont line is a direct connection to the wire, at the end of the connection is usually a card slot used to clamp the interface,

DB9 self-locking screw, the interface to a solid degree of DB9 better. But the DuPont line is smaller and more flexible, while the DB9 is much larger. Which hardware interface to use depends on the requirements at the time, and what level criteria are used to see what level is supported from the device and the main device. So the emphasis is on the level standard and demand collocation.

Add:

The Universal synchronous/asynchronous serial receive/transmitter (Universal synchronous/asynchronous receiver/transmitter, USART) can be understood as an upgraded version of the UART, which can be set to a synchronous clock or an asynchronous clock on the clock.

The following is a talk about several concepts in serial-port transmission, baud rate, bit rate, parity check

Baud rate: The rate at which the defined symbols (symbol) are transmitted per second under a channel. That is, the number of modulation state changes per second. Unit is baud, symbol/s.

Bit rate: The number of bits transmitted per second, in units of bit/s.

Parity check: According to the transmission of a set of binary code in the number of 1 is odd or even to verify, using odd as the standard is the odd check, and vice-parity.

Example sub-detailed description:

1. Baud rate and bit rate

The definition of the transmitted symbol is one byte (8bit), and if 240 bytes can be transmitted per second, the baud rate is 240Baud. The communication rate of serial port is 9600bit/s, then the baud rate of serial port is 9600/8=1200baud.

2. Parity check

Suppose that the transmitted set of data is 1100. With the odd check as an example, the number of 1 for this group of data is 2, then the parity bit is 0. The data is sent as 1100 0, the data received at the receiving end is 1101 0, the data is 1101, the parity bit should be 1, and the parity bit received is 0, thus indicating the data error.

The basic concept of the UART Learning Path (i.)

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.