Skip to main content
Raahul Jagannathan
Associate III
July 2, 2018
Question

HD44780-LCD driver for STM32F4

  • July 2, 2018
  • 3 replies
  • 4276 views
Posted on July 02, 2018 at 12:12

I am trying to interface an STM32F446RE to an LCD display. Ive tried a number of drivers, but none of them seem to work and I am not getting a display on the screen. The backlight is glowing, which means the power source is fine. Could someone direct me to drivers that I could use, or a tutorial that I could follow?

    This topic has been closed for replies.

    3 replies

    David SIORPAES
    ST Employee
    July 2, 2018
    Posted on July 02, 2018 at 12:19

    Hello,

    here's a very simple but functional driver for a HD44780 compatible display: 

    https://github.com/siorpaes/stm32-freqmeter/blob/st7036_display/st7036.c

    It uses 4-bit parallel interface.

    Raahul Jagannathan
    Associate III
    July 2, 2018
    Posted on July 02, 2018 at 12:44

    What am I to do about all the header files you have included in the st7036.h file, if I am using HAL?

    David SIORPAES
    ST Employee
    July 2, 2018
    Posted on July 02, 2018 at 13:36

    Just remove them and use HAL headers.

    The adaptation is pretty straightforward: gpio_set/clear() becomes HAL_GPIO_WritePin(). Remove gpio_set_mode() and clock initializations if generating the boilerplate code with CubeMX.

    henry.dick
    Associate II
    July 3, 2018
    Posted on July 03, 2018 at 13:51

    '

    Could someone direct me to drivers that I could use'

    they are often fairly simple. the well - written ones are platform independent, as long as you supply a few GPIO routines.

    here is one such example: 

    https://github.com/dannyf00/My-MCU-Libraries---2nd-try/blob/master/lcd_4bit.c

     

    you will need the corresponding .h file. it supports 4bit and 8bit mode, and arbitrary pin connections (so long as the pins are on the same port).

    you do need to supply your own GPIO routines, however.

    Radu Toma
    Visitor II
    July 6, 2018
    Posted on July 06, 2018 at 09:29

    https://community.st.com/0D50X00009bMM9PSAW

     

    This driver will work with your processor, just add the correct HAL.