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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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 ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 