This is an old revision of the document!


LCD Background Light

Each colour of the background light is controlled by a 16 bit PWM generator.
The brightness can be regulated from 0x0000 (0% / off) to 0xffff (100%). To adapt the brightness curve to the human eye a adadption 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


The code snippet bellow shows 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. */


ADDR_LCD_BG     EQU      0x60000340
 
                LDR      r0, =ADDR_LCD_BG
                LDR      r1, =0xffff
                STRH     r1, [r0, #0]             ; Set PWM value for red background light.
                STRH     r1, [r0, #2]             ; Set PWM value for green background light.
                STRH     r1, [r0, #4]             ; Set PWM value for blue background light.


The Registers are read / write.




  • ctboard/peripherals/lcd_bg.1465383933.txt.gz
  • Last modified: 2016/06/08 11:05
  • by feur