HXD019 Driver in C

Published 2017-01-17Views 1984views

   The intelligent infrared remote control chip hxd019 has won a national patent. It supports the transmission of all universal infrared code libraries, supports the transmission of infrared data structures of the Android system, and supports infrared signal learning. It is an intelligent infrared chip that integrates learning and universal functions.

Article

 

                        HXD019 general communication protocol: three GPIO port communication or I2C communication-C language

0. Set three GPIOs and perform initialization:

     Disablethe internal pull-down of all IOs connecting the MCU and the remote control IC_HXD019,Set_SDA_IO() GetBUSYStatusto ()hxd019connectedpinpin configuration functionis configured, which correspond to the hardware pins respectively.SDA,SCL,BUSyAll pins are at high level during power-on or standby, then add to compilation;

 

1,Transmit code library data:

1.1.Data obtainedfrom the code library(Sizevariable length, maximum 120 bytes, learning data is232 bytes)

1.2.Then call the write function: void writeI2C(char* data, UINT8 count); 

2. Learn and transmit learning dataFile:

2.1  Enter learning mode:If the data obtained by the main controlfromthe upper layerObtained datahas the first two bytes as0x30,0x20,, thencall the provided function once Learn_start2();

(External operation required at this time: point the remote control to be learned at the IR diode and send codes. If no learning operation is performed for about20seconds,the HXD019 will time out);2.2   Wait for learning to complete:

When the IO port (busy port)changes from lowto high, call the function immediatelyCall the function Call functionreadI2C2(), written independently by the main control, example:

   Learn_start2(); //At this timebusy goes low

   

   readI2C2(char* readtempbuf)

 

 

Clarify the requirement before choosing a chip

Tell us the device type, interaction needs and volume plan; we will match a solution and arrange samples.

You are visitor No.7597   粤ICP备13027018号 Shenzhen Market Supervision Administration