How to use LCD Driver of STM32L476VGT on STM32L476 Discovery

Posted

in

by

To use the internal LCD driver of stm32l476; the best way is to use the LCD driver provided in the BSP. It is located inside the STM32Cube_FW_L4_V1.16.0 repository.

  • Go to the
    ..\STM32Cube\Repository\STM32Cube_FW_L4_V1.16.0\Drivers\BSP\STM32L476G-Discovery
  • Copy the stm32l476g_discovery.c, stm32l476g_discovery.h, stm32l476g_discovery_glass_lcd.c and stm32l476g_discovery_glass_lcd.h
  • Paste the files in your project.
  • Include the header file in your project.
    #include “stm32l476g_discovery_glass_lcd.h”

After this you need to

  1. Initialize the LCD segment
    BSP_LCD_GLASS_Init();
  2. Clear the LCD RAM
    BSP_LCD_GLASS_Clear();
  3. Write Data in LCD RAM
    BSP_LCD_GLASS_DisplayChar((uint8_t *)”A”, POINT_ON, DOUBLEPOINT_OFF, 1);

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *