cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429 - LCD 1602 - LL

Pilous Droip
Senior
Posted on October 18, 2017 at 16:05

Hi friends.

I created program communicate with LCD HD44780. With HAL all it works fine.

Here is program with HAL in HAL_LCD.c

And I tried rewrite program to LL. And this program don�t work.

Here is program with LL in LL_LCD.c

This programs are only library. When you can use it, you must write:

  • lcd_init();
  • lcd_gotoxy(0,0);
  • lcd_puts('Pilnik');

Any idea, what is wrong? Thank you 

#hd44780 #lcd #stm32f4-hd44780 #stm32f429
5 REPLIES 5
Posted on October 18, 2017 at 17:10

Hello!

Which  device you use?

Did you use the CubeMx to produce initialization code?

Pilous Droip
Senior
Posted on October 18, 2017 at 17:29

STM32F429.

With CubeMX I generated init function (Clock, timer).

I tried blink LED with LL code, and it works fine. But the LCD doesn´t work.

Posted on October 18, 2017 at 22:45

hi !

the LCD doesn´t work.

Need some more investigation why don't works.

Normaly CubeMx not produce LL initialization code for F4.

Does code executes normaly? or hangs somewere.? (for example inside LL_mDelay(..))

Is systick ticking every 1ms to produce the correct delays? You can introduce a 500ms delay to check the  period of a blinking LED.

Put also some breaks to check the GPIOx_ODR  for consistency.

Regards

vf

Pilous Droip
Senior
Posted on October 19, 2017 at 09:13

I downloaded LL library from STM32. And I tried LL_mDelay with blink LED and compare with blink LED with TIMER.

And yes, LL_mDelay works with LED. All settings are good. but LCD doesn´t work.

Posted on October 20, 2017 at 01:20

Hello again.

            LL_GPIO_SetPinMode(LCD_PORT, LCD_D4 | LCD_D5 | LCD_D6 | LCD_D7, LL_GPIO_MODE_OUTPUT);

            LL_GPIO_SetPinOutputType(LCD_PORT, LCD_D4 | LCD_D5 | LCD_D6 | LCD_D7, LL_GPIO_OUTPUT_PUSHPULL);

            LL_GPIO_SetPinSpeed(LCD_PORT, LCD_D4 | LCD_D5 | LCD_D6 | LCD_D7, LL_GPIO_SPEED_FREQ_MEDIUM);

            LL_GPIO_ResetOutputPin(LCD_PORT, LCD_D4 | LCD_D5 | LCD_D6 | LCD_D7);    //Set pins to 0

For theese functions must use one pin per call. Note all pins ORed.

but you can use also for groups of pins,  the LL_GPIO_Init function  ..

Regards

vf