UM-B-086
DA14585 Voice RCU Software Manual
8.6
IR Module
8.6.1
Description
The IR Module is used for transmitting key codes using an IR LED connected to a GPIO pin of the
DA14585.
IR configuration
File app_ir_config.h
IR
File app_ir.c
The IR Module uses Timer 0 of the DA14585 to generate the waveform that drives the IR transmitter.
The module can be configured to generate waveforms compatible with various protocols such as
Philips RC-5, Sony SIRC and NEC.
The following waveform parameters can be defined in the configuration file to implement the
waveform generation for a specific protocol:
●
Carrier frequency
●
Carrier duty-cycle
●
Number of carrier cycles for logic 1 mark
●
Number of carrier cycles for logic 1 space
●
Number of carrier cycles for logic 0 mark
●
Number of carrier cycles for logic 0 space
●
A function must be implemented for the specific protocol to send the proper sequence of 1 and 0
symbols to form the IR message.
Detailed IR functionality description and implementation is provided in Ref. [6].
The IR Module is enabled by defining symbol HAS_IR in the file user_config.h.
Files app_ir.c, port_ir.c, ir_driver.c and app_ir_config.h must be included in the project.
8.6.2
Configuration
The IR Module parameters are defined in the file app_ir_config.h.
The main configuration is defined in structure ir_params. The following parameters can be set:
●
use_ble_sync: The IR transmission is synchronized with the BLE end event. The IR transmitter is
activated after the completion of the BLE event.
●
max_repeat: The maximum number of times a key code is transmitted when the transmission is
not stopped by the application (e.g. while the corresponding key is kept pressed).
●
protocol_params: A pointer to a structure of type ir_protocol_params_t, which holds the
parameters used for the waveform generation according to the protocol used. The structure
ir_protocol_params_t has the following members:
○
timer_freq: The frequency (in MHz) of Timer 0 used for the IR waveform generation (2 MHz,
4 MHz, 8 MHz or 16 MHz).
User Manual
CFR0012
IR waveform generation
File port_ir.c, ir_driver.c
Figure 11: IR Module Block Diagram
Revision 1.0
46 of 99
Timer0 LLD
DA14585 SDK
© 2017 Dialog Semiconductor
25-Jul-2017
Need help?
Do you have a question about the DA14585 and is the answer not in the manual?
Questions and answers