

#Dfrobot lcd keypad layout code#
The plan all along was to have a basic Text Display class from which you could derive implementations, meaning minimal code to implement and getting lots of functionality "for free". Given this thread, I thought it was about time to start doing the TextLCD library properly. Please have a go at running this test program on your LCDs! We got them in bulk from the same people who manufacture our mbeds - Chris may know the original source. So in this case, the RAM offsets are 0 and 40 ascii code for '0'(48) from the character at the start of each line To determine what address each line starts at, you subtract the - Identify what characters are at the start of each row - Run, and it should fill the screen with characters - Change TextLCD pinout as appropriate so it works in an HD44780 display, to identify which location maps A quick hack to write to all the display RAM locations I'll take silence as it being a bad idea/low interest, and a load of posts as a good idea/lots of interest in doing this!!Īs promised, here is a simple program hack to get the data ram -> display mappings for text lcds based on an HD44780:Īll it does is print an incrementing character at each RAM location. We can then knock up some test programs to identify their configurations, and hopefully get a library running on all of them! I'd therefore propose hijacking this thread, and ask any of you who have a small text lcd (doesn't have to be 16x2) to post this information (don't worry if yours already works, or duplicates it would still be very useful to post) take some photos, fill in what the facts you *know*, add any hunches etc.
#Dfrobot lcd keypad layout plus#
I suspect this lineup should take the form of a photo of the front and back, then notes capturing any model number plus any markings, and then any links to where it came from, what is known about it (driver chip, internal configuration etc), plus any "hunches" or discoveries. We can then aim to make sure all of them have a working library, so you can pick up any text LCD you have lying about and make it work without fuss. I therefore propose we create a TextLCD "lineup" - a big list of LCDs people have, so people can then identify theirs from the lineup. I suspect yours just doesn't quite match the ones this was written for first (so less of a bug, more it doesn't yet support this display). This means the display RAM doesn't always map to the same characters. I'd certainly discourage coding around it - much better to identify the problem and squish it at source.Īll these small text LCDs tend to be based on only a few different controllers, but they can also be wired up differently inside depending on the number of characters and just their own design choice. I guess I could just code around this, but I wasn't sure if it was a bug or something I was doing incorrectly. The locate(15,0) prints a 1 at coulum16 row1 then continues down to row2 with the rest of the line (23456789-1234567)īut I can not get anything to correctly locate in the second row, short of using spaces in the print statement.Įverything seems to work fine in the first row. The first print line prints a number in every column of both rows. Here is some other code I have been playing with:

I can't seem to attach a pic I keep getting a http error. LCD model# HD44780 (used TextLCD from cookbook to order)
