SPRUJ28E November 2021 – September 2024 AM68 , AM68A , TDA4AL-Q1 , TDA4VE-Q1 , TDA4VL-Q1
Depending on the encoding method (variable pulse distance/biphase), the Host CPU must develop a data structure that combines 1 and 0 with a t period to encode the complete frame to transmit. This can then be transmitted to the infrared output with a modulation method, as shown in Figure 12-60.
Based on the requested modulation frequency, the UART_CFPS register must be set with the correct dividing value to provide an accurate pulse frequency:
Dividing value = (FCLK / 12) / MODfreq
Where:
FCLK = System clock frequency (48 MHz)
12 = Real value of baud multiple
MODfreq = Effective frequency of the modulation (MHz)
Example: For a targeted modulation frequency of 36 kHz, the value of CFPS must be set to 0x7 (decimal), which provides a modulation frequency of 36.04 kHz.
The UART_CFPS register starts with a reset value of 105 (decimal), which translates to a frequency of 38.1 kHz.
The duty cycle of these pulses is user-defined by the pulse duty register bits in the UART_MDR2 register. Table 12-92 shows the duty cycle.
UART_MDR2[5-4] CIR_PULSE_MODE | Duty Cycle (High-Level) |
---|---|
00 | 1/4 |
01 | 1/3 |
10 | 5/12 |
11 | 1/2 |