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 [2016/02/25 13:32] feurctboard:peripherals:lcd [2017/08/29 09:25] (current) – [LCD] ruan
Line 1: Line 1:
 ====== LCD ====== ====== LCD ======
  
-The LCD character display can be used in three different ways:+The LCD character display can be used in two different ways:
   * Output [[lcd_ascii|ASCII characters]] over a simple LCD controller.   * Output [[lcd_ascii|ASCII characters]] over a simple LCD controller.
   * Output [[lcd_bin|binary values]] in HEX representation (max. 128 bit).   * Output [[lcd_bin|binary values]] in HEX representation (max. 128 bit).
-  * Access the display directly over the [[lcd_i2c|I²C interface]]. +Each RGB colour of the [[lcd_bg|background light]] is controlled by a 16 bit PWM controller. \\ \\
-Each colour of the [[#background|background light]] is controlled by a 16 bit PWM controller. \\ \\ +
- +
-===== I²C Interface ===== +
- +
-FIXME +
- +
-===== 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. \\ \\ +
- +
-==== Programming Example ==== +
- +
-The code snippet bellow shows how to set the background light on the LCD. +
- +
-<code c> +
-#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. */ +
-</code> +
-\\ +
- +
-<code asm> +
-ADDR_LCD_BG     EQU      0x60000304 +
-                 +
-                LDR      r0, =ADDR_LCD_BG +
-                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. +
-</code> +
-\\ +
- +
-==== Registers ==== +
- +
-The Registers are read / write. +
- +
-\\ {{ctboard_lcd_pwm_reg.svg}} \\ \\+
  
 ===== Diagram ===== ===== Diagram =====
  
 \\ {{ctboard_lcd.svg?700em}} \\ \\ \\ {{ctboard_lcd.svg?700em}} \\ \\
  • ctboard/peripherals/lcd.1456407122.txt.gz
  • Last modified: 2016/02/25 13:32
  • by feur