LCD Background Light

Each RGB colour of the background light is controlled by an individual 16 bit PWM generator.
The brightness of each RGB colour can be regulated from 0x0000 (0% / off) to 0xffff (100%). To adapt the brightness curve to the human eye an adaption to a logarithmic scale has to be done manually.

Please make sure the CT Board is in the correct mode.
Supported modes: 1, 2, 3, 4


The Registers are read / write.




The code snippets below show how to set the background light on the LCD.

#include "reg_ctboard.h"
 
CT_LCD->BG.RED = (uint16_t) data_halfword;        /* Set PWM value for red background light. */
CT_LCD->BG.GREEN = (uint16_t) data_halfword;      /* Set PWM value for green background light. */
CT_LCD->BG.BLUE = (uint16_t) data_halfword;       /* Set PWM value for blue background light. */


.equ ADDR_LCD_BG,    0x60000340
 
        ldr     r0,  =ADDR_LCD_BG
        ldr     r1,  =0xffff
        strh    r1,  [r0, #0]          // PWM value for red background light.
        strh    r1,  [r0, #2]          // PWM value for green background light.
        strh    r1,  [r0, #4]          // PWM value for blue background light.


  • ctboard/peripherals/lcd_bg.txt
  • Last modified: 2026/06/25 15:11
  • by scbj