2017-10-18 07:05 AM
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:
Any idea, what is wrong? Thank you
#hd44780 #lcd #stm32f4-hd44780 #stm32f4292017-10-18 08:10 AM
Hello!
Which device you use?
Did you use the CubeMx to produce initialization code?
2017-10-18 08:29 AM
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.
2017-10-18 03:45 PM
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
2017-10-19 12:13 AM
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.
2017-10-19 06:20 PM
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 0For 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