英文翻译—单片机解码的红外遥控器

更新时间:2023-05-01 16:39:01 阅读量: 实用文档 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

Infrared remote control decoder microcontroller

Abstract

Remote easy to use, features and more. Has been widely used in TV sets, VCD, DVD, air conditioning and other household appliances, and the price is cheap, very easy to buy on the market. If you can set a lot of buttons on the remote control decoded. SCM system for the input.It is to solve the conventional matrix keypad circuit board is too large, complex wiring, occupy I / O port too many ills. And through the use of remote control operation can be the separation of man and equipment, which is more convenient to use. In addition ,the system has 16 key, which can be used to extend the control other appliances. This design scheme based on the demand of the market, combined with infrared remote control design, simple, cheap, easy characteristics.

Keywords: infrared remote control 、infrared 、codes

1

1 Infrared Technology

1.1 Infrared

IR (Infrared rays) is a light, because of its wavelength than red light (750nm) is longer, than the human eye can identify the (visible light) range, so we can not see it, also known as infrared radiation , usually 0.75 ~ 1000μm wavelength of light are called infrared. Generally use infrared communication within the infrared band near infrared,wavelengths between 0.75μm to 25μm. Infrared is a wireless communication means for wireless data transmission

1.2 Application of infrared

Extremely wide range of infrared applications, can be widely used in medicine, biology, electronics, telecommunications and other industries. In modern electrical engineering applications, the IR is often used as a close line of sight communications carrier, the most typical application is the TV remote control. Done using the infrared signal carrier has many advantages: low cost, scope and direction of propagation and distance can be controlled (not through the wall, on the impact of television next door), does not produce electromagnetic radiation, but also disturbed and so on. With infrared technology become more sophisticated, increasing the standard specification, the application of infrared in the newsletter also increasing.

1.3 Infrared remote control form

Mainly the remote control transmitter, integrated receiver, microcontroller, interface circuit. Remote control remote control code used to generate pulses to drive infrared emission control infrared remote control signal output, remote control receiver to complete the remote signal amplification, detection, shaping, demodulation of the remote control code pulses. Coded pulse is a set of remote serial binary code, infrared remote control system for the general, this serial code input to the micro-controller, remote control by the internal CPU to complete the instruction decode, and execute the corresponding remote control. Using the

2

remote control as the control system input, need to address the following key issues: how to receive infrared remote control signal; how to identify the infrared remote control signals, and decoding software design, control program design.

2 encoding format

2.1 0 and 1 encoding

Remote control signal emitted by the binary string of O's and 1's code. Different chip encoding of 0 and 1 are different. Manchester encoding and usually pulse width encoding. TC9012's O and 1 encoded using PWM method, the pulse width modulation, the O code and 1 yard as shown in Figure 1 (the remote control receiver output waveform as an example.) O is supplied by O. 56ms combination of low and high 0.56ms. Pulse width of 1.12ms. 1 yard from the 0.56ms and 1.69ms high low combination. Pulse width of 2.25ms. Decoding procedure in the preparation. By determining the pulse width can be 0 or 1.

2.2 The encoding key

When we press the remote control button, the remote control will send a string of binary code in Figure 2, we call it a frame of data. According to the function of each part. They can be divided into five parts, namely, boot code, address code, address code, data code, data counter code. Remote control transmitter code. Are low in the former. High in the post. Figure 2 can be obtained from the analysis. High boot code for the 4.5ms, low as 4.5ms.

When receiving this code. That the start of a frame of data. SCM can be ready to receive the following data. 8-bit binary address code formed by a total of 256. The figure re-issued an address code. Are to enhance the reliability of the remote control. If the two address code is not the same. Is illustrated in the frame wrong. Should be discarded. Different devices can have a different address codes. So.

3

The same encoding settings as long as the address of the remote control code is different and will not interfere with each other. The address map for the hexadecimal code 0EH (note least significant bit first.) In the same remote control. All keys issued by the address code is the same. 8-bit data code, and encoded 256 state, on behalf of the actual key pressed. Anti-code data is the data you find anti-code, code and data by comparing the data against code. Can determine the received data is correct. If the data code and data between anti-code does not meet the opposite relationship. The remote control receiver is wrong. Data should be discarded. In the same remote control. The data of all key codes are not the same. In Figure 2, the data as hexadecimal code 0CH, anti-code data in hexadecimal 0F3H (note least significant bit first.) Of both and should be 0FFH.

3 single chip remote control receiver circuit

Infrared remote control receiver infrared receiver diode can be added earlier infrared processing circuit dedicated approach. If CXA20106, circuit complexity of this method, it is generally not used. Better integration of the receiver is to use infrared receiver, infrared receiver diodes will, amplification, demodulation, plastic and other circuits do together, only three pins. Are the +5 V power supply, the signal output. Common form of integration and the pin receiver shown in Figure 3 and Figure 4.

4

Infrared receiver of the signal output connected microcontroller INTO or INTl feet. A typical circuit is shown in Figure 5. The figure increased by a PNP-type transistor to amplify the output signal

4 remote control signal decoding algorithms and programming

When no key is pressed the remote control, infrared emitting diodes do not send a signal, the output signal a remote receiver. A key is pressed. O and 1-encoded reverse-phase high by remote control after the first output signal O. As connected with the microcontroller interrupt pin will cause an interrupt microcontroller (MCU pre-set for the falling edge). Microcontroller used in the interrupt timer 0 or timer 1 starts. To the next pulse arrives, the interrupt again, the first time the value out. Clear time value and then start the timer. By judging each interrupt with the previous time interval between interruption. They will know that the boot code is received, or O and 1. If the time is 9ms. Boot code is received, if the time value is equal to 1.12ms, received a code O. If the timer value is equal to 2 25ms. Received a code 1. In determining the time, consideration should be given a certain error. Because of the different parameters of the remote control causes the crystal, transmitting and receiving time there will be a small error.

To receive the TC9012 remote control codes, for example, decoding method is as follows:

(1) Let the external interrupt 0 (or 1) for the falling edge interrupt, timer 0 (or 1) for the 16-bit timer. The initial values are 0.

(2) After the first break into the remote control to start timing.

(3) into the remote control from the second break, the first stop the clock. And the

5

value of saving time, and then re-timing. If the timer value is equal to the preamble of the time, the establishment of a preamble symbol. Ready to receive the data following a remote control, if the time value is not equal to the preamble of the time, but the previously received preamble, the judge is O or 1 remote data.

(4) continue to receive the following address code, data code, data counter code.

(5) When 32-bit data is received, indicating that a data reception is completed. Time to stop the timer at this time, and determine the validity of this receiver. If the same address code and equal to twice the system address, data, code and data and is equal to anti-yards 0FFH, is receiving valid data code of the frame. Otherwise, discard this received data.

(6) has been received, initialization data received this time, ready for the next remote control receiver.

5 code remote control code conversion with the keyboard

In the application system, with remote control equipment generally with keys. And both feature the same. Will be converted into the standard remote button key value. Bulk transfer form remote control button to switch the keyboard loose form reuse. Conversion method can look-up table. Look-up table. The key value of the remote control unit keyboard, the value of the switching costs. In this way, you can use the key operation, you can also use the remote control, and the corresponding process is very simple.

6 Comparison of infrared and Bluetooth

6.1 Characteristics of infrared technology

Infrared communication technology for low-cost, cross-platform, point to point high-speed data connections, especially in embedded systems. The main application of infrared technology: equipment, connectivity and information gateway. Equipment after completion of different devices connected within the document and information exchange. Information gateway is responsible for connecting information terminals and the Internet. Infrared communication

6

technology has been around the world supported by many hardware and software vendors and the use of, the current mainstream software and hardware platforms offer support for it. Infrared technology has been widely used in mobile computing and mobile communications devices.

6.2 Bluetooth features

Bluetooth technology is used as a "cable replacement" technology proposed by the development of today has evolved into a personal information network technology. Bluetooth chip embedded devices will interconnect together to provide voice and data access services, to achieve the automatic exchange and processing of information. Bluetooth mainly for three categories of applications: voice / data access, peripherals, Internet and personal area network. Voice / data access is one computing device over a secure wireless link to connect to a communication device, complete with wide-area communication network interconnection. Peripheral Component Interconnect refers to a variety of peripherals via a Bluetooth link to connect to the host. The main application is the personal area network personal networks and information sharing and exchange. Bluetooth technology has been the response of the two thousand companies, which have huge development and production capacity. Bluetooth has a very high reputation, consumers are very interested in this technology the cost of the end of the infrared, and Bluetooth transfer speeds much faster than many, and infrared technology to the current technology is mature, so it further popularity will be a lot of space.

7

Conclusion

Through this infrared system design, so I basically mastered the IR knowledge.Infrared system with infrared transmitter, infrared receiver, the interface module, display module, etc. put together. Infrared technology generated by the industrial applications ranging from medical care, testing, aviation to military and other fields have a wide range of applications. I learned to make full use of library resources and network resources for independent study and research on the function of the common integrated circuit device and pin connection have a better understanding and awareness. It made me understand the importance of reading to find documents, usually more than the accumulation of knowledge and to use real time, so questions will be handy.Through this infrared system design, I greatly hadthe harvest. Get topics to find information from the, from the adjustment of the circuit board to fail again after all start again... In this challenging with setbacks, with passion with a blow to the process, I think a lot, it has not only is one of my four years learning knowledge and my application practice ability of inspection, and still to my spirit, in the face of difficult mentality, of doing things the perseverance and patience to the test. I'm in the process of deep feeling to do the meaning of graduation design. This subject is the fundamental technology single-chip microcomputer control technology, and part of the peripheral circuit to achieve some complex function. Can change the software to realize according to requirements of function and the expansion of updates. It makes me understand, read the documents, are usually better than the accumulation of knowledge and the importance of using real time, therefore, the question will be handy.

8

References

[1] J.L. Hall, Science 202 (1978) 13.

[2] T. Rosenband et al., Science 319 (2008) 1808.

[3] W.L. Eberhard, R.M. Schotland, Appl. Opt. 19 (1980) 2967.

[4] L. Mullen, A. Vieira, P.R. Herczfeld, V.M. Contarino, in: IEEE MTT-S International Microwave Symposium, 1995, p. 1495.

[5] L. Morvan, N.D. Lai, D. Dol?, J.-P. Huignard, M. Brunel, F. Bretenaker, A. Le Floch, Appl. Opt. 41 (2002) 5702.

[6] A. Blanchard, Phase-locked Loops: Application to Coherent Receiver Design,

Wiley-Interscience, New York, 1976.

[7] R.C. Steele, Electron. Lett. 19 (1983) 69.

[8] D.J. Malyon, D.W. Smith, R. Wyatt, Electron. Lett. 22 (1986) 421.

[9] M. Kasevich, S. Chu, Phys. Rev. Lett. 67 (1991) 181.

[10] D.M. Giltner, R.W. McGowan, S.A. Lee, Phys. Rev. Lett. 75 (1995) 2638.

[11] E.M. Rasel, M.K. Oberthaler, H. Batelaan, J. Schmiedmayer, A. Zeilinger, Phys. Rev. Lett. 75 (1995) 2633.

[12] T.L. Gustavson, A. Landragin, M.A. Kasevich, Classical Quant. Grav. 17 (2000) 1.

9

本文来源:https://www.bwwdw.com/article/naze.html

Top