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

Serial Communication Method Based on Timer Wave Recording

A serial communication and timer technology, applied in the field of data communication, can solve the problems of poor anti-interference ability depending on baud rate stability, and achieve the effect of ensuring stability, reliability and good fault tolerance

Active Publication Date: 2016-05-18
YANTAI DONGFANG WISDOM ELECTRIC
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In order to overcome the disadvantages of relying on baud rate stability and poor anti-interference ability in existing methods

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
  • Serial Communication Method Based on Timer Wave Recording
  • Serial Communication Method Based on Timer Wave Recording
  • Serial Communication Method Based on Timer Wave Recording

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0039] The present invention will be further described below in conjunction with specific embodiments and accompanying drawings.

[0040] refer to figure 1 , the implementation steps of the receiving process of the present invention are as follows:

[0041] Step 1 Initialize the serial port receive pin.

[0042] (1a) Configure the serial port receiving pin as an IO falling edge trigger interrupt, and determine the start bit according to the interrupt.

[0043] Step 2 uses the capture mode of the timer to record the waveform.

[0044] (2a), when the falling edge interrupt is triggered, that is figure 1 At the moment ①, turn off the IO falling edge interrupt, reconfigure the serial port receiving pin as the input pin of the timer capture channel, and record the timer as "capture timer". Configure the timing period of the capture timer according to the baud rate and verification method of the serial port communication:

[0045] ,

[0046] Among them, it means the timing ...

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 timer waveform recording based serial communication method, and mainly solves the problems of dependence of Baud rate stability and poor anti-jamming capability during analog serial communication in the prior art. The implementation procedures include a receiving procedure and a sending procedure. The receiving procedure includes: capturing occurrence time for a rising edge and a falling edge for receiving data by using a capture function of an MCU (microprogrammed control unit) timer to achieve the purpose of recording data waveforms, and then calculating occurrence time of captured waveforms to obtain received data. The sending procedure includes setting timer cycles according to the analog serial Baud rate, starting the timer, setting a state of an analog serial sending data pin according to data bits of data needing to be sent in each cycle, and stopping the timer after data of one byte are sent. The method has good fault tolerance under the circumstance that the Baud rate has deviation, can effectively remove false triggering signals, and can be applied to an MCU with few hardware serial resources to realize serial communication.

Description

technical field [0001] The invention belongs to the field of data communication, and relates to a method for simulating serial port communication by using a timer to record waves, which can be used to realize serial port communication on an MCU with less hardware serial port resources. Background technique [0002] In the industrial field, the use of serial ports is very common, and many products will encounter the situation of insufficient hardware serial port resources. Replacing the MCU or using a serial port expansion chip will generate additional hardware overhead, thereby increasing the production and research and development costs of the product. Therefore, in this case, software simulation is required to realize serial port communication. [0003] At present, the relatively common software simulation serial port method is used, and the external IO interrupt and timing sampling are used to capture data. The data receiving process of this method depends on the stabil...

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/38
Inventor 陈星刘笑菲吴章宪
Owner YANTAI DONGFANG WISDOM ELECTRIC