Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Baud rate self-adaption method based on input capture function of singlechip

An input capture, baud rate technology, applied in the field of serial communication, can solve the problems of low applicability, high hardware environment requirements, high baud rate waveform requirements, fast handshake time, wide application range, operation flexible effects

Active Publication Date: 2015-04-22
NINGBO SANXING MEDICAL & ELECTRIC CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This method has relatively high requirements on the baud rate waveform, which must be a standard UART waveform. If the waveform of the serial port is irregular, the self-adaptation cannot be completed, and the requirements on the hardware environment are relatively high, and the applicability is not high.

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
  • Baud rate self-adaption method based on input capture function of singlechip
  • Baud rate self-adaption method based on input capture function of singlechip

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] For ease of description of the control method of the present invention, below in conjunction with accompanying drawing, the baud rate self-adaptive method based on single-chip microcomputer level input capture function of the present invention is described in detail:

[0037] A baud rate adaptive method based on the level input capture function of the single-chip microcomputer, by using the falling edge interrupt and timer counting function of the GPIO port of the single-chip microcomputer, capture the two falling edges generated by the received data, and time between the two falling edges Calculate the minimum symbol width by the time between them, and determine the baud rate of the host computer according to the minimum symbol width obtained;

[0038] In this embodiment, the single-chip microcomputer adopts stm8s103F3, and the input capture channel is PD3, which is the input capture channel 2 of time2. This pin can support the falling edge input capture interrupt of th...

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 Baud rate self-adaption method based on an input capture function of a singlechip. A falling edge of a GPIO (general purpose input / output) port of the singlechip is used for triggering an interrupt function and a timer count function to capture two falling edges generated by the received data; the time between the two falling edges is counted to solve the minimal code element width; and the Baud rate of a host is determined according to the solved minimal code element width. Compared with the prior art, the method provided by the invention has the advantages that handshake time is quick, various environments are adapted, the self-adaption can be realized without sending specified data, and only one GPIO port hardware is occupied for realization. The application range is wide, operation is flexible, and the self-adaption can be realized under the condition of irregular waveforms of a serial port, thus the method can be widely applied to various embedded products which adopt a serial asynchronous communication mode.

Description

technical field [0001] The invention relates to the field of serial communication, in particular to a baud rate adaptive method based on the input capture function of a single-chip microcomputer. Background technique [0002] RS485 communication is the same as serial port communication, sending and receiving byte data bit by bit. Although slower than byte-wise parallel communication, a serial port can send data on one wire while receiving data on the other. There is no synchronous clock line between them, which requires the sending and receiving parties to ensure that the communication rate is the same, otherwise there will be an error code. The most important parameters of serial communication are baud rate, data bits, stop bits and parity. These parameters must match for both ports to pass through. The realization of baud rate self-adaptation is to judge the uplink baud rate to adjust its own communication baud rate to realize the matching of communication rate. [000...

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/42
Inventor 郑坚江霍斌斌
Owner NINGBO SANXING MEDICAL & ELECTRIC CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products