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

Infrared decoding method based on analog capture

A decoding method, infrared technology, which is applied in the field of infrared decoding, can solve the problems of single-chip microcomputer without capturing function and affecting real-time performance, and achieve the effect of improving core competitiveness, reducing product cost and cost-effective

Pending Publication Date: 2020-07-17
深圳市锐同技术有限公司
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] But many low-end single-chip microcomputers do not have the capture function, for example, some low-end single-chip microcomputers with 51 cores
If the traditional external interrupt plus delay method is used, it will affect the real-time performance

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
  • Infrared decoding method based on analog capture
  • Infrared decoding method based on analog capture
  • Infrared decoding method based on analog capture

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] The specific embodiments of the present invention will be further described below in conjunction with the accompanying drawings. It should be noted here that the descriptions of these embodiments are used to help understand the present invention, but are not intended to limit the present invention. In addition, the technical features involved in the embodiments of the present invention described below can be combined with each other as long as they do not constitute a conflict with each other.

[0023] as attached image 3 Shown: An infrared decoding method based on analog capture,

[0024] S1. Set the external interrupt priority of the microcontroller to be higher than the timer, and set the external interrupt to be triggered by a rising edge;

[0025] S2, initialize a time t microsecond interrupted timer, and initialize a count variable tick, which is used to count the number of interrupts generated by the timer;

[0026] S3. When an external interrupt is generated...

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 relates to the technical field of infrared decoding, in particular to an infrared decoding method based on analog capture, which comprises the following steps: setting the priority of external interruption of a single chip microcomputer to be higher than that of a timer, and setting the external interruption to be triggered by a rising edge; initializing a timer for generating interruption in microsecond at the time t, and initializing a counting variable tick for counting the interruption times generated by the timer; after external interruption is generated, judging whether thetriggering mode is a falling edge or a rising edge, and further reading a counting variable value tick of the timer or starting the timer; judging whether the counting variable value tick is greaterthan or equal to a value obtained by a first preset formula or not, and judging whether a lead code is received or not; further judging whether the counting variable value tick is greater than or equal to a value obtained by a second preset formula or not after the lead code is received, and obtaining data bit1 or data bit0; and negating the triggering mode of the external interrupt, and quittingthe interrupt. The decoding method can be suitable for the single-chip microcomputer which is relatively low in price, and the product cost is reduced.

Description

technical field [0001] The invention relates to the technical field of infrared decoding, in particular to an infrared decoding method based on analog capture. Background technique [0002] At present, most of the infrared remote controls used in electronic products use NEC codes. Such as figure 1 One frame of the NEC code shown (usually the data sent by pressing a button on the remote control) consists of a boot code, an address code, and a data code. [0003] The NEC protocol defines the boot code, data 1, and data 0 as follows figure 2 As shown, through comparative analysis, it can be found that the difference between data 1 and data 0 lies in the high level pulse width. Therefore, the principle of single-chip infrared decoding is generally to use the capture function of the timer to measure the pulse width of the high level, and then judge whether it is data 1 or data 0. [0004] Timer capture principle: enable the capture function and set it to trigger an interrupt...

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
IPC IPC(8): G06F1/14G06F15/78G08C23/04
CPCG06F1/14G06F15/7807G08C23/04
Inventor 胡晓罗伟梁广柱吴灿阳
Owner 深圳市锐同技术有限公司
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