UART serial communication based on 51 single chip microcomputer
51 MCU is a general term for all MCUs compatible with Intel 8031 ​​instruction system. The first ancestor of this series of MCUs is Intel's 8004 MCU. Later, with the development of Flash rom technology, the 8004 MCU has made great progress and become one of the most widely used 8-bit MCUs. Its representative model is ATMEL's AT89 series. Widely used in industrial measurement and control systems. Many companies have launched 51 series compatible models, which will occupy a large number of markets for a long time to come. 51 single-chip microcomputer is a single-chip computer that is the basic introduction, or the most widely used one. It should be noted that the 51 series of single-chip microcomputers generally do not have self-programming capabilities.
The UART is a general purpose serial data bus for asynchronous communication. The bus bidirectional communication enables full duplex transmission and reception. In embedded design, the UART is used for communication between the host and the auxiliary device, such as communication between the car audio and the external AP, and communication with the PC includes communication with the monitor debugger and other devices such as EEPROM.
Parallel data is used inside the computer. It is not possible to send data directly to the modem. It must be UART-organized for asynchronous transmission. The process is: the CPU first puts the data to be written to the serial device into the UART register (temporary memory block). It is then transmitted to the serial device via FIFO (First Input First Output). If there is no FIFO, the information will become messy and cannot be transferred to the modem. It is a chip for controlling computers and serial devices. One thing to note is that it provides an RS-232C data terminal device interface so that the computer can communicate with a modem or other serial device that uses the RS-232C interface.
As part of the interface, the UART also provides the ability to convert parallel data transferred from within the computer into an output serial data stream. Serial data from outside the computer is converted to bytes for use by devices with parallel data within the computer. A parity bit is added to the output serial data stream, and a parity is received for the data stream received from the outside. A start and stop flag is added to the output data stream, and the start and stop flag is deleted from the received data stream. Handles interrupt signals from the keyboard or mouse (the keyboard and mouse are also serial devices).
It can handle the synchronization management of computers and external serial devices. Some of the more advanced UARTs also provide buffers for input and output data. The newer UART is the 16550, which stores 16 bytes of data in its buffer before the computer needs to process the data. The usual UART is 8250. If you buy a built-in modem, there will usually be a 16550 UART inside the modem. Next, let's take a look at the UART serial communication based on 51 MCU.
51 serial port structureThe UART serial communication of 51 MCU is based on the programmable hardware structure of its serial port. As long as the correct program code is used to initialize the serial hardware structure by initializing the corresponding register of the serial port, then the serial port communication is written. The program code can realize serial communication, and its hardware structure determines the programming mechanism (of course, it depends on the mechanism such as 51 on-chip CPU).
This structure has all the functions of a UART (Universal Asynchronous Receiver Transmitter), which can simultaneously transmit and receive data, and can also be used as a synchronous shift register. This structure is integrated inside the microcontroller.
Product categories of Maskking, we are specialized electronic cigarette manufacturers from China, Vapes For Smoking, Vape Pen Kits, E-Cigarette suppliers/factory, wholesale high-quality products of Modern E-Cigarette R & D and manufacturing, we have the perfect after-sales service and technical support. Look forward to your cooperation!
maskking e cigarette, maskking vape pen, maskking disposable vape, Maskking HIGH GT Vape, maskking vape
Ningbo Autrends International Trade Co.,Ltd. , https://www.vapee-cigarettes.com