HXD019 Driver for STM32 MCUs
Communication program, example, code and call instruction between SMT32 and hxd019 chip.
Article
Set the three IOs connected between the main MPU and the remote control IC
_HXD019 properly,
Timing adjustment: Adjust according to different main control clocks. Test the communication clockCLK line and adjust the following parameters:
1. Adjust delay parameters:File:
In URAD.H
// Make the CLK clock cycle when calling(): H=
#define IRDA_DELAY_40US between 0uS)IRDA_tx_data// Time from the first falling edge of CLK to the second falling edge: 20mS (between 16-30mS30uS(25-42. Hardware related:
#define IRDA_DELAY_20MS Connect the hardware properly),
, during debugging, it is recommended to connect a resistor of about 100R in series for each of the three communication IO ports (not required for mass production) to prevent breakpoints, pauses or abnormal IO conflicts from damaging the IO ports.When debugging the program and calling continuously, check whether busy goes highIRDA_tx_data,IRDA_learn_start(), the intermediate delay before checking must be at least100mS. Afterthe busy port goes high, callwithout interval3. Related main files:IRDA_learn_data_in_out(irda_data)4. Other projects:
Use
user\main\main.c
IAR project
If usingKeil, build the project and copy \user\irda
\IAR\zk.eww
over, refer tothe calls in MAIN and it will be OK
, Learning and sending instructions:Send learning command:
5Detect
external mutual learning, manual operation learningIRDA_learn_start(),
Learned data processing:busy:while(!IRDA_BUSY_S())
Send the learned data
Send code library data:IRDA_learn_data_in_out(irda_data)
IRDA_tx_data () Modify the corresponding buffer and Size: IRDA_tx_data()
Driver Instructions for MTK Feature Phone and HXD019The following three files are not included in the transplant package
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.
