Page 1 of 1

HD44780 not initialized

Posted: Mon Dec 16, 2013 9:32 am
by shilow
Hi!

I am a beginner in ChibiOS/RT.
first I tried to use by the LCD screen stm32vldistsovery.

I took a working sample project and moved him out of his driver in a test project for stm32vldistsovery.

and here I was unlucky - this code does not work, LСD is not initialized.
maybe I made a mistake somewhere?

This working project:
stm32vld_lcd_2x16_test.7z
working project
(9.75 KiB) Downloaded 677 times


And this is my attempt to cross HD44780 and Chibios:
stm32vld-ChibiOS.7z
nonworking project
(10.38 KiB) Downloaded 676 times


thank you in advance for your help.

Re: HD44780 not initialized

Posted: Wed Dec 18, 2013 10:54 am
by shilow
Hi All!

Maybe someone can share a working example without using µGFX?

Thanks.

Re: HD44780 not initialized

Posted: Wed Dec 18, 2013 1:23 pm
by Tectu
shilow wrote:Maybe someone can share a working example without using µGFX?

Note that the TDISP module and therefore the HD44780 driver have been removed/deprecated from the µGFX project. It was announced in the forum including a hint that the driver is/was not working anymore.

Edit: Moved this thread to the STM32 support forum.


~ Tectu

Re: HD44780 not initialized

Posted: Fri Dec 20, 2013 6:45 am
by shilow
I figured out what the problem was.
In my case did not work function palClearPort() and palSetPort().
I replaced them on palSetPad()/palClearPad() for single bit, and pal_lld_setport()/pal_lld_clearport() for groups of bits.

working example in the attachment.
stm32vld-ChibiOS.7z
working hd44780 example
(10.41 KiB) Downloaded 790 times

Re: HD44780 not initialized

Posted: Fri Dec 20, 2013 6:06 pm
by tronicgr
Thank you for your working example!

Can I use 3.3v character LCD like this one for this example?

http://www.ebay.com/itm/16x2-1602-Character-LCD-Module-Black-Background-Yellow-Characters-3-3V-/170972304955?pt=LH_DefaultDomain_0&hash=item27cebe563b

I got some of them (3.3v) by accident and I was wondering if they can be used with my STM32 discovery boards...

Thanks
Thanos

Re: HD44780 not initialized

Posted: Fri Dec 20, 2013 8:34 pm
by shilow
tronicgr wrote:Thank you for your working example!
Can I use 3.3v character LCD like this one for this example?


yes, of course.

if there is the datasheet for your display - verify the initialization procedure, it may be slightly different.

Re: HD44780 not initialized

Posted: Fri Feb 07, 2014 4:51 am
by russian
FYI - I have to change the delay logic to get this code working with my display:

Code: Select all

   palSetPad(LCD_PORT, LCD_PIN_E); // En high
   chThdSleepMicroseconds(10); // enable pulse must be >450ns
   palClearPad(LCD_PORT, LCD_PIN_E); // En low
   chThdSleepMicroseconds(40); // commands need > 37us to settle

Re: HD44780 not initialized

Posted: Fri Feb 07, 2014 6:07 pm
by shilow
The author of used library:
"ZiB" <[email protected]>
http://ziblog.ru/

updated sources
stm32vld-ChibiOS.7z
working examples
(10.49 KiB) Downloaded 752 times