Current location - Education and Training Encyclopedia - Graduation thesis - Talking about serial communication of single chip microcomputer
Talking about serial communication of single chip microcomputer
The serial assistant is only a simulation, not a practical application. You can determine your data transmission interval according to the actual application. Whether the upper computer is a PC or not, it can tell the lower computer whether to send or not through the flag bit. For example, the PC sends serial data after receiving the "can send" flag bit sent by the single chip microcomputer, thus avoiding data hedging.

In other words, after MCU runs the interrupt handler, it will tell PC to send data. If you think this will affect the efficiency, pack the data into structural frames and judge the header data sent by MCU to PC.