Design and Implementation of Infrared Communication In the field of electronic consumption, infrared products are widely used. They are mostly used for simple short-distance control, such as home appliances, toys, and various meter reading systems. This article uses Freescale\'s 8-bit high-performance, low-power microcontroller MC9S08GT60 as a carrier to introduce in detail the hardware and software design process of infrared communication and the use of communication protocols. The HCS08 series MCU is the latest 8-bit microcontroller launched by Freescale Semiconductor. It has multiple low-power modes, higher operating frequencies, and an integrated on-chip debugger. It is also rich in resources. Therefore, the MC9S08GT60 of this series is used as a carrier to discuss in detail a simple and practical infrared communication development system. The infrared communication process mainly consists of two processes: infrared transmission and infrared reception. First, the digital signal is sent to the infrared transmission circuit, which is modulated by the circuit and converted into an infrared light signal for transmission in the air. Then the infrared receiving circuit receives the infrared light signal, and after demodulation by the circuit, the infrared light signal is restored to a signal that can be processed by the microcontroller, and the original data encoding is obtained by the internal processing of the microcontroller. 2 The purpose of the infrared communication protocol is to give the sender and receiver an agreement so that they can synchronize and send and receive data correctly. This design uses a quasi-synchronous protocol. When the infrared receiver does not receive a signal, no timing operation is generated. Otherwise, the start bit \'0\' is first received and an interrupt is triggered. The timer is started to receive data, and then it is determined whether it is a start bit. If it is, it continues to receive data. Otherwise, the timer is reset and the start bit is re-detected. When receiving the second stop bit, an interrupt is triggered to detect whether the stop bit received for the first time is correct. If it is not correct, the timer is reset and received again. Otherwise, the data segment has been received correctly.
You Might Like
Recommended ContentMore
Open source project More
Popular Components
Searched by Users
Just Take a LookMore
Trending Downloads
Trending ArticlesMore