HXD019 driver Daquan
发布时间:2017-03-08 浏览次数:1597次

 

HXD019 intelligent infrared universal remote control chip in the application of the platform system driver Daquan

The HXD019 is an infrared signal receiving and processing chip, which supports all infrared devices. The interface function of the main control chip is needed to enter the transmitting data or the data state of the study:

 

Three GPIO communications or a pair of I2C+ a GPIO communication

 

(a) three GPIO communications:

 

0, set up three GPIO and initialization, hxd019D_V1.9.c file:

 

All IO MCU internal pull-down and remote IC_HXD019 connected to Set_SDA_IO (GetBUSYStatus) to close, (all) the main control chip and hxd019 connected to the pin pin set function set, namely SDA, SCL, BUSy have several configuration function, power or standby are high, then add the compiler the following example;

 

1, send learning data or library data:

 

1.1. data (Size variable length, 10 to 120 bytes, the data is up to a maximum of 232 bytes) sample:

 

Unsigned char data[] = {0x30,0x00,0x01,0x1c, 0xE3,0x00,0xFF}, 0x20,0x88,0xD7

 

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

 

2, learning and learning data: hxd019D_V1.9.c file:     2.1 into the study: tune a given function: Learn_start2 (); (at this time the external operation);

 

2.2, such as learning: when the IO port: busy port by the low profile with a function readI2C2 (), example:

 

(Learn_start2); / / at low busy

 

Delay (50ms); / / 50mS / / hardware delay stability)

 

While (busy / ==1) (wait for learning, this master can do other work, busy high back read data)

 

{

 

Delay (10us) / (busy high school)

            readI2C2(char* readtempbuf)

            };

        2.3, learning data processing: will read the first byte of 00 removed, plus 0x30,0x03 plus checksum, the beginning of the 30

 

All data and low 8 bits are placed in a byte of + (0x30,0x03 +) + checksum (front 231)

 

Byte and low 8 bits, to be sent back to the 019 chip, the function name writeI2C () (ibid.);

 

3, hardware related:

 

Connect the hardware (see schematic)

 

4, timing adjustments in the hxd019D_V1.9.c file,

 

Refer to the timing reference map.JPG> document: according to the different clock adjustment MCU, measuring the communication clock SCL line parameters:

 

       #define  DELAY_TIME  550    

       #define  DELAY_ST  19 // 

 (two) a pair of I2C+ a GPIO communication:

 

I2C communication, each time to write a FF write data, read after write delay 20mS official data, use another GPIO or busy communication port and three GPIO communication in the same way, the I2C command see the above code data, the end can have data from A to Z, including I2C address, I2C data.

 

Professional remote control chip: mobile phone universal remote control, infrared remote control IC, HXD019, infrared code library, infrared remote control data, universal code library, cloud code library, wifi turn infrared
您是第16900位访客   粤ICP备13027018号