HD44780 not initialized

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
shilow
Posts: 10
Joined: Mon Dec 16, 2013 9:04 am

HD44780 not initialized

Post 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 653 times


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


thank you in advance for your help.
shilow
Posts: 10
Joined: Mon Dec 16, 2013 9:04 am

Re: HD44780 not initialized

Post by shilow »

Hi All!

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

Thanks.
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: HD44780 not initialized

Post 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
shilow
Posts: 10
Joined: Mon Dec 16, 2013 9:04 am

Re: HD44780 not initialized

Post 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 756 times
User avatar
tronicgr
Posts: 12
Joined: Thu Aug 08, 2013 8:50 pm

Re: HD44780 not initialized

Post 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
shilow
Posts: 10
Joined: Mon Dec 16, 2013 9:04 am

Re: HD44780 not initialized

Post 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.
User avatar
russian
Posts: 368
Joined: Mon Oct 29, 2012 3:17 am
Has thanked: 16 times
Been thanked: 14 times

Re: HD44780 not initialized

Post 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
shilow
Posts: 10
Joined: Mon Dec 16, 2013 9:04 am

Re: HD44780 not initialized

Post by shilow »

The author of used library:
"ZiB" <[email protected]>
http://ziblog.ru/

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