HD44780 problems

Posted on
  • Hi,

    Is anyone else using a HD44780 on an ESP8266 in parallel? I had it working, but for some reason it isn't any more. I'm just trying the example code but all the screen is displaying is a line of squares (uninitialised). Does anyone have any ideas?


  • The exact code is:

    var lcd = require("HD44780").connect(D4,D5,D12,D13­,D14,D2);
    lcd.print("Hello World");
  • Do you think it was a firmware version change? I'm struggling to think what the issue could be.

    I know the HD44780 sometimes gets upset if it's sent data too quickly, but honestly I doubt that's the issue here.

  • Are you using a breadboard? Recheck your wiring, as a bad connection will stop it working!

  • Doesn't Espruino on ESP8266 output debug info on D2 if you don't turn that off?

  • I managed to solve it! I was assuming the library would set the pinMode, but it doesn't (maybe it should?). Here's the working code:

    pinMode(2, 'output');
    pinMode(4, 'output');
    pinMode(5, 'output');
    pinMode(12, 'output');
    pinMode(13, 'output');
    pinMode(14, 'output');
    var lcd = require("HD44780").connect(4,5,12,13,14,­2);
    lcd.print("Hello World");

    @DrAzzy, setting the debug mode seems to have no effect, but I've added it in just to cover all bases, thanks for that.

    @Wilberforce, my setup was on veroboard and working last time I used it, but thanks for the suggestion.

    @Gordon, thanks for your input as always (I still think it's amazing that you put so much time and effort into this). I'm not sure if the driver should set the pinMode or if the Espruinos have different defaults to the ESP8266.

  • digitalWrite() should set pin mode (unless you've otherwise set it manually), unlike in Arduino et al. I remember hearing something about the ESP8266 port not doing that. I assumed that was fixed though, since they were talking about it late last year I think...

  • Yes, I'd thought this was fixed - what's your firmware version? In this case it's definitely a problem with the ESP8266 port as opposed to the HD44780 module though.

  • There's an open issue re this, here https://github.com/espruino/Espruino/iss­ues/735 AFAIK pinMode is still required. I set it in the sketches I'm running on ESP8266, although I don't have latest build.

  • I just tried with the latest build - I know I only have ESP01, but it seems to work fine for me without the need for pinMode

  • @AlexOwen how well is the module working for you? I gave it quick go on the ESP8266 and it was quite inaccurate. Just wondering if it was just me?

  • @Gordon, I'll give that a go.

    @the1laz what do you mean by inaccurate? Mine seems to be up and running well and it's been updating every minute for 2 days without issue so far.

  • Sorry, misread your post, thought you were talking about a different module. :S

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

HD44780 problems

Posted by Avatar for AlexOwen @AlexOwen