NEC standard: The frequency of the remote control carrier is 38KHz (duty cycle is 1:3); when a key is pressed, the system first transmits a complete full code. If the key is pressed for more than 108ms and is not released, the next transmitted code (continuous code) will only consist of the start code (9ms) and the end code (2.5ms). A complete full code = guide code + user code + user code + data code + data inverse code. Among them, the guide code is high level 4.5ms and low level 4.5ms; the system code is 8 bits, the data code is 8 bits, a total of 32 bits; the first 16 bits are the user identification code, which can distinguish different infrared remote control devices and prevent different models of remote control codes from interfering with each other. The last 16 bits are 8 bits of operation code and 8 bits of operation inverse code, which are used to check whether the data is received accurately. The receiving end makes a judgment on what action should be performed based on the data code. The continuous code is the code sent when the key is pressed continuously. It tells the receiving end that a certain key is being pressed continuously.
Transmission code representation under NEC standard
When transmitting data, 0 is represented by "0.56ms high level + 0.565ms low level = 1.125ms", and data 1 is represented by "high level 0.56ms + low level 1.69ms = 2.25ms"
That is, the transmission code "0" means transmitting 38khz infrared light for 0.56ms and stopping transmitting for 0.565ms, and the transmission code "1" means transmitting 38khz infrared light for 0.56ms and stopping transmitting for 1.69ms.
It should be noted that when the integrated receiving head receives a 38kHz infrared signal, the output terminal outputs a low level, otherwise it outputs a high level. Therefore, the waveform output by the integrated receiving head is the opposite of the transmitted waveform, as shown in the figure
PHILIPS standard: carrier frequency is 38KHz; no simple code, when the key is pressed, the control code switches between 1 and 0, if the key is pressed continuously, the control code remains unchanged. A full code = start code '11' + control code + user code + user code, as shown in the figure.
Data 0 is represented by "low level 1.778ms + high level 1.778ms"; data 1 is represented by "high level 1.778ms + low level 1.778ms". Continuous code repetition delay is 114ms.
The coding formats of NEC, TOSHIBA and SAMSONG have something in common: the remote control full code is composed of "boot code + system code + system code (or system code inversion) + data code + data code inversion"; the definition of data "0" and "1" is the same; the difference is that the duration of the high and low levels of the boot code is different, the number of system code bits is long or short, the delay between the first simple code and the last bit of the full code is different, and the boot pulse of the simple code is different; so the same part can be made into a general subroutine, including the subroutines "ON
Key value processing can use external interrupts. When a key is pressed, an interrupt request is sent to the CPU. Of course, this also includes the processing part of de-jittering and processing only one key when multiple keys are pressed at the same time.
The different states of the movement are distinguished and judged by the input values of the four bits P3.5, P3.4, P3.1, and P3.0 of the single-chip microcomputer P3 port. For example, "0000" means working in the Toshiba TC90×× series state, and "0001" means working in the NEC PD61×× series state.
After determining which key is pressed and which state the movement is in, the program will strictly transmit the remote control code according to the corresponding remote control coding method, that is, modulate the level pulse of a certain period of time and a certain value on the 38KHz carrier and transmit them one by one.
The flow chart is shown in the figure
Previous article:"Pointers" in MCS-51 MCU assembly
Next article:Cx51 Standard Library Program Attribute Description
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- MSP430 MCU Timer A Structure and Application Examples
- The development history of single-chip microcomputer and 51 series single-chip microcomputer
- A brief discussion on the 9 functions and 27 applications of capacitors in power supplies
- I want a dsp audio tuning software. If there is a project that can be developed, you can take a look.
- Principle and application of sound sensor
- What is the difference between Solder Mask and Paste Mask?
- Xiaomi Mijia Electric Toothbrush Disassembly
- Blood pressure monitor principle
- EEWORLD University ---- Fuse types and tests
- 【New Year's Festival Competition】Photo Summary