HD44780

User avatar
Frysk!
Posts: 6
Joined: Mon Apr 08, 2013 8:41 pm

HD44780

Postby Frysk! » Mon Apr 08, 2013 9:05 pm

I have been testing the driver for the HD44780 compatible displays. But I had some problems with it. The first thing was, that the display would not initialize. So I opend the supplied boardfile for the STM32F4-Discovery and noticed that the initialisation was different from what I been using on a ATmega (in ASM). I changed the initializing code used to initialize a generic HD44780-display (like done in http://www.mikrocontroller.net/articles/AVR-Tutorial:_LCD#Initialisierung_f.C3.BCr_4_Bit_Modus by porting it to C).

The second thing a stumbled against was that I couldn't use a user defined board file. So I changed the drivers/tdisp/HD44780/tdisp_lld.c file to something that is done in de gdisp_lld.c-file. Now it can use user defined board files.

I hope I helped you to create a driver for the generic HD44780 displays.

Frysk!
Attachments
HD44780.zip
Modified boardfile for the STM32F4-Discovery and the modified tdisp_ll.c
(3.93 KiB) Downloaded 182 times

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: HD44780

Postby Tectu » Mon Apr 08, 2013 9:33 pm

Hello Frysk,

I thank you very much for your contribution. I'll take a look at it tomorrow and give it a try. There still some unimplemented features like API calls to enable or disable the cursor etc. I'm not sure if you already added this since I'm currently on the road and not able to see your code. Maybe you'd be interested in adding these features as well?


~ Tectu

User avatar
Frysk!
Posts: 6
Joined: Mon Apr 08, 2013 8:41 pm

Re: HD44780

Postby Frysk! » Tue Apr 09, 2013 7:22 am

The goal is to create a driver and example boardfile that is uses all the capabilities of a generic HD44780-display.
Currently I'am checking and implementing the control features like enableing/disabeling the cursor. Turn on/off the blinking of the cursor. And scrolling and turning of/off of the display.
I don't have lots of time available, but slowly I will implement things and upload them to the forum.

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: HD44780

Postby Tectu » Fri Apr 12, 2013 6:18 am

I finally found some time to take a look at your contribution. It looks very good so far, good job! You seem to do a lot of documentation, especially for the macros, that's a good thing, keep that one :D
I've merged your fixes and improvements into the master and I've also added you to the credits & contributors table, you may give me your real name, if you're interested in it being listed there.

I hope to receive some more improvements for the TDISP module from you in the future ;-)


~ Tectu

User avatar
Frysk!
Posts: 6
Joined: Mon Apr 08, 2013 8:41 pm

Re: HD44780

Postby Frysk! » Wed Apr 17, 2013 9:47 am

Hi Tectu,

Thank you. I'm working on the TDISP improvements. I already implemented display scrolling, cursor movement, hide and display cursor, display on/off modes.
So mostly of the features are implemented. What I need to do next is to document things properly. And I have the idea of implementing a PWM-function to dimm the backlight of a LCD-display.
I'm a little busy right now. As soon as I documented the features properly, I send you the stuff.

Frysk

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: HD44780

Postby Tectu » Wed Apr 17, 2013 10:13 am

Hello Frysk,

This sounds very good! However, take the time you need.

Regarding the PWM driver: This is something that belongs to the board files. When you for example take a look at the board files for the SSD2119 GDISP driver, you can see that the PWM driver gets initialised in the init_board() and changes to dimm the backlight happen through a dedicated set_backlight() routine.

About documentation: Documentation is important. When you have problems with doxygen, don't worry, I can fix this. However, I'd like to see a few lines which can be put on the website, if this is possible for you to make. I already did some documentation for the custom characters.


~ Tectu

User avatar
Frysk!
Posts: 6
Joined: Mon Apr 08, 2013 8:41 pm

Re: HD44780

Postby Frysk! » Thu May 23, 2013 8:37 pm

Hi Tectu,

Its been a while. The next few days I have a little spare time and try to do something on de TDISP-Driver.
Thank for pointing me to look at the PWM-driver of the GDISP displays. I Will use that one, so the thing look consistant between display types.
I try to document thing as good as I can. If I run in trouble I contact you.

Frsyk

User avatar
Frysk!
Posts: 6
Joined: Mon Apr 08, 2013 8:41 pm

Re: HD44780

Postby Frysk! » Fri May 31, 2013 4:12 pm

Hi Tectu,

In the attached files you find the update driver files for using the HD44780 compatible displays.
There is also a simple demo added showing the most used capabilities of the display.

Frysk
Attachments
lcd_test01.zip
This is a simple demo program showing the use of an HD44780 compatible display
(15.43 KiB) Downloaded 187 times
gfx.zip
This zip file contains the new TDISP/HD44780 files
(2.93 MiB) Downloaded 180 times

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: HD44780

Postby Tectu » Fri May 31, 2013 10:32 pm

Helly Frysk,

I thank you very much for your patch. In the meantime I FINALLY received my new display. They screwed something up with my order so it got lost...
I took your patches, connected my new display to the F4 discovery as you mentioned it very nicely in your readme and voila! It worked out of the box :)

I'm now going to push your patches to the repository. Keep going the good work!


~ Tectu

User avatar
Frysk!
Posts: 6
Joined: Mon Apr 08, 2013 8:41 pm

Re: HD44780

Postby Frysk! » Mon Jun 03, 2013 11:11 am

Nice to hear that it worked for you also.

During testing I'v set the delay times after writing data to the display (in tdisp_lld) very long. These can be faster. I will correct that as soon as possible and send you the new file.

I did not have enough time to test the 8-bit version. So that is untested. Maybe some one has time to test that for me. If there are some problemes, than will dive into the problem to solve them.

Frysk


Return to “LCD Driver and Graphic Framework”

Who is online

Users browsing this forum: No registered users and 1 guest