C language HXD019 driver
发布时间:2017-03-09 浏览次数:1630次

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

 

0, set up three GPIO and initialize:

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, respectively is the hardware on the SDA, SCL, BUSy power or standby are high, then add the compiler;

1, the code library data:

1.1. data obtained from the library (Size variable length, up to 120 bytes, learning data is 232 bytes)

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

2, learning and learning data files:

2.1 into the study: master if the data obtained from the upper layer: the first two bytes of 0x30,0x20, then adjust the given function Learn_start2 ();

At this time the external operation: with the remote control to the infrared diode code, not more than 20 seconds to learn, HXD019 timeout;

2.2, such as learning: when the IO port: busy port from low to high, immediately call the function call function readI2C2 (), the main control of their own writing, examples:

(Learn_start2); / / at low busy

readi2c2(char * readtempbuf)

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
您是第16906位访客   粤ICP备13027018号