Anyone managed to get a HD44780 running on a imp directly ?
I am aware it will take up the majority of pins avaliable on the imp002 and every pin the imp001 has, but it would make a cheap wifi LCD for basic information, the imp002 would still have a few pins spare for buttons and a sensor or two (or I2C for that matter).
4 data lines
1 enable line
1 register select line
(1 r/w line that can be omitted for a short sleep instead)
Yep, I did that back in 2011, but that was pre-squirrel. So, yes it’s possible (make sure you have a 3.3v display, though) but I can’t show you code…
Starting to get back to this, I made some not very pretty code and hooked up the wires … and nothing happens, so its work in progress
I hooked up A-D4,B-D5,C-D6,D-D7,en-p1,rs-P2 (on a imp002).
Not sure if the 3v3 signals to a 5v display is too low to register as high though.
Current attempt at init the display in 4bit mode.
en <- hardware.pin1
Drs <- hardware.pin2
D4 <- hardware.pinA
D5 <- hardware.pinB
D6 <- hardware.pinC
D7 <- hardware.pinD
if (data & 0x80)
if (data & 0x40)
if (data & 0x20)
if (data & 0x10)
if (data & 0x08)
if (data & 0x04)
if (data & 0x02)
if (data & 0x01)
The pins you are using don’t appear to be configured. You need to use pin.configure() for each of them.
hmm, good catch, I added en/drs/D4…D7.configure(DIGITAL_OUT), but same result.
I will debug it some more over the weekend.
Did you manage to get the LCD work?
I am trying to configure the LCD with the 4-bit interface, but my Init function doesn’t seem to work. My LCD is only displaying the first line with all pixels ON.
I would appreciate if I could benefit from your previous work…
Oh, well, this is working now. I was tinkering with a S6A0069 controller instead of a HD44780. The instruction set seems to be the same but when used in 4-bit mode, the S6A0069 is bullshit…
By the way, I think the “Drs.write(1);” in your code above is not for a command, but for a data transfer…