STM32 microcontroller and hxd019 chip communication instructions
0,set up three IO and initialize:
The main MPU and remote control IC_HXD019 connected to the three IO set,
1,timing adjustment: according to the main control of different clock adjustment, measuring communication clock CLK line adjustment of the following parameters:
Time delay parameter:
#define IRDA_DELAY_40US / / CLK the clock cycle in the call to IRDA_tx_data (H=30uS): (25-40uS),
#define IRDA_DELAY_20MS //CLK the first falling edge to the second falling edge of time: 20mS (16-30mS),
3 master file:
user\main\main.C
4 other works:
Engineering with IAR
iarzk.eww
With KEIL, then the project with userirda
Copy the past, refer to the MAIN inside the call on the OK
5, learning send instructions:
Send learning command: IRDA_learn_start (),
Detection busy:while ((IRDA_BUSY_S))
External learning, artificial learning
Learned data processing: IRDA_learn_data_in_out (irda_data)
Send the data to learn: IRDA_tx_data ()
Send code library data: IRDA_tx_data () modify the corresponding buffer and Size