Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ctboard:peripherals:lcd_bg [2017/08/29 09:26] – [LCD Background Light] ruanctboard:peripherals:lcd_bg [2026/06/25 15:11] (current) – [Programming Example] scbj
Line 2: Line 2:
  
 Each RGB colour of the background light is controlled by an individual 16 bit PWM generator. \\ Each RGB colour of the background light is controlled by an individual 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 an adaption to a logarithmic scale has to be done manually. \\ \\+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. \\ \\
  
 > {{ctboard:ctboard_mode_1.svg?48px }} {{ctboard:ctboard_mode_2.svg?48px }} {{ctboard:ctboard_mode_3.svg?48px }} {{ctboard:ctboard_mode_4.svg?48px }} Please make sure the CT Board is in the correct mode. > {{ctboard:ctboard_mode_1.svg?48px }} {{ctboard:ctboard_mode_2.svg?48px }} {{ctboard:ctboard_mode_3.svg?48px }} {{ctboard:ctboard_mode_4.svg?48px }} Please make sure the CT Board is in the correct mode.
 > Supported [[ctboard:mode_switch|modes]]: **1**, **2**, **3**, **4**  > Supported [[ctboard:mode_switch|modes]]: **1**, **2**, **3**, **4** 
 \\ \\
 +
 +===== Registers =====
 +
 +The Registers are read / write.
 +
 +\\ {{ctboard_lcd_pwm_reg.svg}} \\ \\
  
 ===== Programming Example ===== ===== Programming Example =====
  
-The code snippet bellow shows how to set the background light on the LCD.+The code snippets below show how to set the background light on the LCD.
  
 <code c> <code c>
Line 21: Line 27:
 \\ \\
  
-<code asm+<code text
-ADDR_LCD_BG     EQU      0x60000340 +.equ ADDR_LCD_BG,    0x60000340 
-                 +  
-                LDR      r0, =ADDR_LCD_BG +        ldr     r0,  =ADDR_LCD_BG 
-                LDR      r1, =0xffff +        ldr     r1,  =0xffff 
-                STRH     r1, [r0, #0]             ; Set PWM value for red background light. +        strh    r1,  [r0, #0]          // PWM value for red background light. 
-                STRH     r1, [r0, #2]             ; Set PWM value for green background light. +        strh    r1,  [r0, #2]          // PWM value for green background light. 
-                STRH     r1, [r0, #4]             ; Set PWM value for blue background light.+        strh    r1,  [r0, #4]          // PWM value for blue background light.
 </code> </code>
 \\ \\
- 
-===== Registers ===== 
- 
-The Registers are read / write. 
- 
-\\ {{ctboard_lcd_pwm_reg.svg}} \\ \\ 
  • ctboard/peripherals/lcd_bg.1503998811.txt.gz
  • Last modified: 2017/08/29 09:26
  • by ruan