chipKIT® Development Platform

Inspired by Arduino™

HELP WITH lcd 40x4

Created Sun, 29 Mar 2015 16:49:47 +0000 by eloiq10


eloiq10

Sun, 29 Mar 2015 16:49:47 +0000

Hello! I am doing a small project wiht a big lcd(40x4), but I don't find a libraries for this lcd. Can we help me please? The LCD has 2 enables, 1 rs 1 rw and 7 data. Lcd = JHD404A

Please Help me!!!


majenko

Sun, 29 Mar 2015 20:12:44 +0000

It looks like it uses a pair of HD44780's to display twice the amount of a normal LCD. Not sure if the normal LiquidCrystal library can cope with that way of working, but worth a try (make two objects with all the same settings except use E1 for E in one object and E2 for E in the other).

That might give you two separate displays - half the display each.

You could also try the LiquidCrystal440 library, though I don't know if it'll work on the chipKIT without modification. https://code.google.com/p/liquidcrystal440/


Jacob Christ

Tue, 31 Mar 2015 21:21:42 +0000

I got this library to work with a chipKIT Quick240 out of the box (no mods needed): http://arduino-info.wikispaces.com/LCD-Blue-I2C#v1

Its only a 4x20 display however.

Jacob


majenko

Wed, 01 Apr 2015 09:04:31 +0000

40x2 or 20x4 can fit into one single HD44780 chip. For 40x4 you need two chips (you need twice the memory), so, like KS0108 graphical displays where each chip deals with a 64x64 square of pixels and they are bolted together to form a display, a 40x4 HD44780 based display uses multiple discrete chips to control different parts of the display, usually two lines each. All the signals are shared between the two chips except the E signal, which is why the display has E1 and E2 - the E signal for chip 1, and the E signal for chip 2.

By connecting E2 to +3.3V and treating E1 as E you should be able to just run it with the built-in LiquidCrystal library, but only have access to half the display. If you then connect E1 to +3.3V and treat E2 as E then you should get access to the other half of the display instead. The trick is how to get at both halves together.

Two instances of the LiquidCrystal class may do it, or they may fight between each other since they share pins. If that is the case, then maybe the library I pointed to would work, but without installing it and trying it I can't even say if it'll compile.


eloiq10

Wed, 01 Apr 2015 11:44:09 +0000

Hello everyone! I tested the liquidcrystal440 books and worked perfectly with the 40x4 screen. I used pins D4, d5, d6, d7, RW, rs, e1 and e2. I know if I have used as a single screen: lcd.begin (40.4). Works perfectly! Thanks everyone!