From: Keith Packard Date: Thu, 21 Jun 2012 16:39:10 +0000 (-0700) Subject: altos: Configure STM LCD driver for giant LCD digits X-Git-Tag: 1.0.9.6~53 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=419a801131c1034f1fa149a67850290431cbda72 altos: Configure STM LCD driver for giant LCD digits These devices require static mode. Signed-off-by: Keith Packard --- diff --git a/src/stm-demo/ao_demo.c b/src/stm-demo/ao_demo.c index 232c2313..73ace558 100644 --- a/src/stm-demo/ao_demo.c +++ b/src/stm-demo/ao_demo.c @@ -166,7 +166,7 @@ main(void) ao_timer_init(); ao_dma_init(); ao_cmd_init(); -// ao_lcd_stm_init(); + ao_lcd_stm_init(); // ao_lcd_font_init(); ao_spi_init(); ao_i2c_init(); diff --git a/src/stm/ao_lcd_stm.c b/src/stm/ao_lcd_stm.c index f68cf165..b1909444 100644 --- a/src/stm/ao_lcd_stm.c +++ b/src/stm/ao_lcd_stm.c @@ -328,10 +328,14 @@ ao_lcd_stm_init(void) } } + /* Disable the LCD */ + stm_lcd.cr = 0; + /* duty cycle 1/3, radio 352, frame rate about 33Hz */ - stm_lcd.fcr = ((STM_LCD_FCR_PS_1 << STM_LCD_FCR_PS) | - (STM_LCD_FCR_DIV_31 << STM_LCD_FCR_DIV) | + stm_lcd.fcr = ((STM_LCD_FCR_PS_16 << STM_LCD_FCR_PS) | + (STM_LCD_FCR_DIV_20 << STM_LCD_FCR_DIV) | (4 << STM_LCD_FCR_CC) | + (0 << STM_LCD_FCR_DEAD) | (4 << STM_LCD_FCR_PON) | (0 << STM_LCD_FCR_UDDIE) | (0 << STM_LCD_FCR_SOFIE) | @@ -343,8 +347,8 @@ ao_lcd_stm_init(void) /* Program desired BIAS in LCD_CR */ /* Enable mux seg */ /* Internal voltage source */ - stm_lcd.cr = ((STM_LCD_CR_DUTY_1_4 << STM_LCD_CR_DUTY) | - (STM_LCD_CR_BIAS_1_3 << STM_LCD_CR_BIAS) | + stm_lcd.cr = ((STM_LCD_CR_DUTY_STATIC << STM_LCD_CR_DUTY) | + (STM_LCD_CR_BIAS_1_2 << STM_LCD_CR_BIAS) | (0 << STM_LCD_CR_VSEL) | (1 << STM_LCD_CR_MUX_SEG));