Design of infrared remote controller decoder using single chip microcomputer

Publisher:HeavenlyCloudsLatest update time:2012-07-10 Source: 21ic Keywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

TC9012F is a universal CMOS large-scale integrated circuit for infrared remote control signal transmission, suitable for remote control of TV, VTR, laser player and other equipment. In the market, 9012 infrared remote control with TC9012F as the core is widely used and cheap. The designed 9012 infrared remote control decoder based on AT89C51 microcontroller is applied to the production of real-time display system as an infrared remote control for parameter setting and system control, and has received good results in practical applications.

1 Remote control signal of infrared remote control signal transmitter circuit TC9012F

TC9012F is a 4-bit dedicated microcontroller, and the typical value of the oscillation frequency fosc of its internal oscillation circuit is 455 kHz. When the operation key is not pressed, its internal 455 kHz clock oscillator stops working to reduce battery consumption. The internal frequency division circuit divides the oscillation frequency, fosc, by 12 and converts it into a pulse carrier signal with a frequency of fc=37.9 kHz and a duty cycle of 1/3. The infrared remote control signal transmitter circuit consists of the integrated circuit TC9012F, the keyboard matrix circuit, the driver and the infrared light-emitting diode. The remote control signal is a modulated wave modulated by the remote control coded pulse of the 37.9 kHz pulse carrier, as shown in Figure 1.



The remote control coding pulse consists of the pilot code, user code, function code and the inverse code of the function code. The user code is the same group of codes sent twice, as shown in Figure 2. The user code is 8 bits, so the entire pulse code is 32 bits. The pilot code is a preparation pulse for receiving data. It consists of 8TCP (4.5 ms) of high level and 8TCP (4.5 ms) of low level. The user code and function code are encoded using pulse position modulation (PPM) to distinguish the code value "0" or "1" based on the time interval between pulses. Corresponding to the "0" or "1" of the binary digital signal, the pulse time intervals are 2TCP (1.125 ms) and 4TCP (2.25 ms), respectively, while the width of each pulse remains unchanged, all TCP (0.5626 ms). Since the user code is sent twice and the function code and its inverse code are sent together, the system rarely malfunctions.

This remote controller uses different working modes for the coded pulse of the remote control signal sent for the first time (as shown in Figure 3) and the coded pulse of the remote control signal sent for the second and third times continuously (as shown in Figure 4). In this way, when the button is pressed, starting from the second continuous transmission, only the guide code and the opposite code SO of the first SO of the user code are sent, thereby reducing the receiving processing time and the power consumption of the infrared light-emitting diode. The remote control coded pulse is modulated by the pulse carrier and output by the pin 1 of TC9021F, and then driven by the exciter to drive the infrared light-emitting diode to send out pulse infrared light with a wavelength of 940nm. Assuming that the user code is 76H in hexadecimal, the coded pulse of the remote control signal sent for the first time is shown in Figure 3.



As can be seen from Figures 2 and 3, the output time of the remote control code pulse waveform is 192TCP or 224TCP, and α is the output time of the user code (8 bits). When α≥26TCP, the output time of the remote control code pulse waveform is 224TCP. In addition, for the pulse interval time of the opposite code of the first bit of the user code in the continuously transmitted code pulse, when SO="1", then SO="0", the time is 2TCP, and when SO="0", then SO="1", the time is 4TCP.

2 Decoder Hardware Design

The decoder hardware is based on the AT89C51 microcontroller, as shown in Figure 5. The figure only shows the circuit for receiving infrared remote control signals. After the infrared remote control signal is received by the infrared receiving module, the coded pulse of the remote control signal is demodulated and output from the output terminal A. Its waveform is shown in Figure 3 and Figure 4. This signal is output to the external interrupt INT0 input terminal of AT89C51 through the inverter 74LS04. The microcontroller receives and decodes the coded pulse sent by the infrared remote control TC9021 by running the program.

3. MCU Programming

The main problem solved by the single-chip program is how to decode the signal transmitted by the 9021 infrared remote control. The coded pulse signal is composed of the guide code, user code, and function code. We only analyze the process of obtaining its function code. In the single-chip setting, the internal timer/counter T0 of the single-chip AT89C51 is set to timing mode 1, and the timing time is 1 ms; the external interrupt INT0 is set to the falling edge interrupt trigger mode. Since the coded pulse signal is inverted when receiving, whenever the falling edge of the INT0 external pin signal arrives, the external interrupt INT0 is interrupted, and the timer T0 is started. The timer interrupts each time for 1 ms and is accumulated in the timing counter. When the next external interrupt INT0 is interrupted, the time in the timing counter is read, and the remote control function code is decoded by analyzing the timing time between the two pulses. Figures 6, 7, and 8 respectively give the flowcharts of the decoder main program, the timer T0 interrupt program, and the external interrupt INT0 interrupt program.

4 Conclusion

The real-time production display system is aimed at the production site and conducts quantitative management of production efficiency. It has been widely used in developed countries and some foreign-funded enterprises in China. It can make the production situation clear at a glance and improve production efficiency by real-time displaying the quota task volume, production target and the actual production quantity completed at the current moment. This display system is generally installed above the production line. The staff needs to operate the display system frequently, set and modify the data. The infrared remote control is used to set the parameters of the real-time production display system without contact, which makes the operation flexible and convenient, and has strong anti-interference.

Keywords:MCU Reference address:Design of infrared remote controller decoder using single chip microcomputer

Previous article:Design and application of interface between graphic dot matrix LCD module and 51 single chip microcomputer
Next article:Comparison of Initialization between C8051F and 80C51 Series Microcontrollers

Recommended ReadingLatest update time:2024-11-16 20:25

Detailed explanation of 51 single chip microcomputer program execution process
    The microcontroller does not have an operating system. The codes written in Keil are all bare-metal codes. In-depth writing of bare-metal codes helps to understand the characteristics of the hardware.     If the hardware characteristics are not fixed, the other processes are all caused by the code. I suddenly thou
[Microcontroller]
Detailed explanation of 51 single chip microcomputer program execution process
Control of lighting system based on PIC12C508 microcontroller
The following program uses PIC12C508 microcontroller, internal 4MHz clock, 50HZ pulse signal input at pin 4, and output at pins 7, 6, and 3 (GP0, GP1, and GP4 ports). The gradual change part makes the light gradually brighter (or off). ;The procedure is as follows: GPI0EQU6 COUNT1EQU11 COUNT2EQU12 COUNT3EQU13 COUNT4
[Microcontroller]
Control of lighting system based on PIC12C508 microcontroller
51 single chip music player program
#include #include "bofangyinyue1.h" void Delay1ms(unsigned int count) {  unsigned int i,j;  for(i=0;i count;i++)  for(j=0;j 120;j++); } //*****************************Music****************************************************** //同一首歌 unsigned char co de Music_Same ={ 0x0F,0x01, 0x15,0x02, 0x16,0x02, 0x17,
[Microcontroller]
Simulating PLC Control Using Atmel89S51 Single Chip Microcomputer
This paper introduces a method of simulating PLC control with Atmel89S51 single-chip microcomputer, designs a controller suitable for rigid clutch punch press, introduces the basic structure and working principle of input and output circuits with photoelectric isolation, focuses on the design idea of ​​the internal
[Microcontroller]
51 single chip microcomputer dot matrix 8X8 snake design (simulation + program)
51 MCU dot matrix 8X8 snake design (simulation + program) The snake 8X8 program and simulation made in my spare time are both in the compressed package below. The components are the most commonly used ones and are very easy to make. MCU program source code: #include reg51.h #define uchar unsigned char #define
[Microcontroller]
51 single chip microcomputer dot matrix 8X8 snake design (simulation + program)
Large capacity Flash type AT91 series ARM core microcontroller
introduction AT91FR40162 is a member of the AT91 series of microcontrollers produced by Atmel Corporation of the United States. It has an ARM7TDMI core, large-capacity Flash memory, on-chip SRAM and peripherals. The characteristics of this microcontroller are high performance-32-bit RISC architecture, hig
[Microcontroller]
Large capacity Flash type AT91 series ARM core microcontroller
51 MCU counter T1 counts external pulses
/********************************************** Method 1: Delay method Hardware: 11.0592MHz crystal, STC89C52, RXD P1.0 TXD P1.1 T1 P3.5 Baud rate: 9600 Description: T0 is used for timing, mode 1, timing time 50ms, interrupt mode; T1 is used for counting. After the 10s timing time is up, the counted pulse is sent out
[Microcontroller]
Single chip microcomputer is everywhere. A practical online UPS circuit is explained in detail.
1 Introduction UPS (Uninterruptible Power System) AC power supply is increasingly widely used in various fields of the national economy. This article will introduce a practical and simple online UPS. 2 Basic structure of UPS power supply The most widely used current conversion scheme in practical applications is to
[Power Management]
Single chip microcomputer is everywhere. A practical online UPS circuit is explained in detail.
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号