Unlock instant, AI-driven research and patent intelligence for your innovation.

A kind of MCU-based serial communication method and system

A serial port communication and signal technology, applied in the field of data communication, can solve problems such as unfavorable function subroutine operation, affecting the operation of other function subroutines, reducing the operating efficiency of the main function, etc.

Active Publication Date: 2021-03-30
SHENZHEN CLOU ELECTRONICS
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In addition, since the general MCU program execution mechanism only has a single-threaded execution mechanism, once a certain function subroutine runs for too long, it will affect the operation of other function subroutines.
If there are too many data interactions between the MCU and the external device in a main function, it will not be conducive to the operation of other functional subroutines in the main function and reduce the operating efficiency of the entire main function.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A kind of MCU-based serial communication method and system
  • A kind of MCU-based serial communication method and system
  • A kind of MCU-based serial communication method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0053] It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0054] As mentioned above, in the prior art, after the MCU sends the command for requesting data, it will wait for a fixed time delay and then obtain the response data returned by the external device from the receiving buffer. But in the actual situation, the time it takes for the external device to process different data varies. Therefore, the response data returned arrives at the MCU earlier or later. If the MCU acquires data after waiting for a fixed time delay every time, it will cause unnecessary time consumption in program operation. In particular, when the data interaction between the MCU and the external device is performed more than once, the accumulated time consumption is greater, which greatly reduces the communication efficiency.

[0055] In view of this, an MCU-based serial communication met...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a serial port communication method on the basis of an MCU (microprogrammed control unit). The serial port communication method includes a receiving and transmitting control step and a concurrent response interrupting step. The receiving and transmitting control step includes acquiring data state flag values; executing operation according to judgment on whether the data state flag values indicate acknowledge completion or not, to be more specific, acquiring data if the data state flag values indicate the acknowledge completion, and returning the acquired data state flagvalues at preset time intervals if the data state flag values do not indicate the acknowledge completion. The response interrupting step includes updating the data state flag values as the acknowledgecompletion according to detected received interruption signals of the MCU. The invention further discloses a serial port communication system on the basis of the MCU. The serial port communication method and the serial port communication system on the basis of the MCU have the advantage that the efficiency of data interaction between the MCU and external equipment can be improved by the aid of the serial port communication method and the serial port communication system.

Description

technical field [0001] The invention relates to data communication, in particular to an MCU-based serial port communication method and system. Background technique [0002] Usually, in the communication process between the MCU and the external device, the MCU acts as the master mode, and the external device acts as the slave mode. The MCU sends instruction data to the external device. After receiving the instruction data, the external device will return the operation result obtained through a series of processing as response data to the MCU. Therefore, it takes a certain amount of data interaction time from the MCU to request data to obtain the data. . In some cases, other circuit structures will be introduced between the MCU and the external device, and the introduction of these other circuit structures will cause a delay in data transmission, thereby further increasing the data interaction time. [0003] For example, in the application scenario of an electric energy mete...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F13/24G06F13/42
CPCG06F13/24G06F13/4282G06F2213/0002
Inventor 潘晓亮
Owner SHENZHEN CLOU ELECTRONICS