HD44780 LCD Display Timeout Error #4935
Replies: 1 comment
-
Posted at 2020-10-03 by Robin Sat 2020.10.03 For those following along; HD44780 LCD Display Hi @user118421 and thank you for the images. From: It appears the pull-ups are on B7 and A8, and not B6 and B7 Could a quick cross check verification be done. Hey, who moved that pin row since the last time I remembered where that pin was actually located? Posted at 2020-10-03 by @MaBecker Hmm, is this a new version of the HD44780 that operate with 3v3? AFAIK it is a 5v device. Posted at 2020-10-03 by Robin Good spot @MaBecker! My orthagonal viewing glasses didn't pick up on that in addition to B7-A8. ;-) As the USB connector is supplying the 5V, it appears 3V3 is available after the regulator as the VDD output pin3.
Posted at 2020-10-04 by user118421 Thank you very much for helping! The pin mistake is embarrassing, unfortunately correcting it did not help, still same error. Does the 5v requirement mean I cannot use this display with the Pico? The datasheet seems to me to suggest that either 3.3v or 5v can be used but that’s probably just me not understanding how to read it. I tried connecting the HD44780 to an ESP32 as well as it has a 5v pin but no luck and also tried a Nokia 5110 to the Pico according to instructions but nothing happens. Probably just me doing something wrong but then maybe I could at least stop trying to connect a HD44780 to the Pico? Posted at 2020-10-04 by @MaBecker Vbat is in your case 5v from the usb connector. Remove the additional pull ups, because there are 4k7 added to the backpack. Posted at 2020-10-04 by user118421 Thank you, that is good to know - sorry for being so ignorant, total beginner :) Should I then simply wire as in this picture? I still get the same error though.. Attachments: Posted at 2020-10-04 by @MaBecker Hmm, just double checking pins and HD44780 documentation Yellow - SCL1 - B6 Please try this snippet - hope it works for you.
Posted at 2020-10-04 by user118421 Unfortunately it gives almost the same error, except these two lines;
Posted at 2020-10-04 by Robin Sun 2020.10.04 @user118421, I agree with you that; that #5 post specific document does present some confusion over the allowed voltage. It is also very specific that the LCD requires 5V. Without that board schematic, it would be guessing as to whether a boost converter is onboard to create the 5V when using 3V3. While I'll have to defer to the board designer for a definitive explanation, the Pico schematic implies a small drop over the FET when attempting to pull power, when not supplying at pin 18 BAT_IN. I just measured my Pico using USB power, but with no load, and pin 2 is at 4V6 which is very close to the low end specified to even drive that LCD. Under the assumption that speification sheet is in error, any luck driving from the regulated 3V3 pin 3 as was done in the initial post? (not expecting success however) As all the Arduino snippets and the Espruino documentation example are suggesting 5V, I'd first check to see if that is what is at pin 2 as is now wired in a loaded condition. Regarding #7 image and #9 code snippet, SCL and SDA now appear to be wired as needed. Does the same error exist when removing the Posted at 2020-10-04 by user118421 Many thanks for all help! When I measure the I2C receives 4V4 from VBAT so maybe that's not sufficient. I really don't care about this specific display but as it failed just like the Nokia 5110, is there any specific LCD display you can recommend that you know will work with the Espruino boards? Posted at 2020-10-04 by Robin Thank you for the voltage readings @user118421
As the errors bubble up, and therefore appear in reverse order, I would have expected a slightly different output, as the specific error related to calling the print() function is now not present. Did you mean the same as in only the same for the first two line code block from #9 post perhaps? (I was attempting to determine if I2C was initializing [it's overhead] error free before attempting comm over the I2C bus) Under the assumption 5V has to be the minimum input voltage, any other way to supply that, or only just the USB cable available at the moment? > 'this specific display but as it failed just like the Nokia 5110' Do we have a separate issue here with the 5110? There is a tutorial, but that is based on SPI rather than I2C. I'm not a fan of using cutting edge builds for the existing tutorials, but as a consideration, would flashing to a previous version have a different outcome? I have not tried or tested, but it might mean an additional step is required. I'll defer to others for this: *(see code block under the schematic, beneath heading 'Power, and the FET/B0 Jumper')* ' Once the FET/B0 Jumper is shorted, the following commands will work: digitalWrite(B0,0); // Turn on the 'Bat' output fully ' Posted at 2020-10-05 by @gfwilliams
Don't do this! It's for something totally unrelated (allowing you to use the FET not to gate USB power, but to control other stuff). But because you're using USB you need it non-shorted. My memory of the HD44780 boards is that generally the I2C actually worked ok at 3.3v, and the backlight lit up, but nothing was displayed on the screen - hence the need for 5v. But the 4.4v you have should be fine. I've used those exact displays on the Pico before without issues. I guess it might be that you need the pullup resistors to 3.3v, now it's running from 5v? Even before you add pullup resistors, please could you try:
also try changing the Software I2C can use the chip's internal pullup resistors, and so may be more able to communicate properly. Posted at 2020-10-05 by parasquid I just tried it out on my pico (pardon the contrast, but the Hello World is there) However, I could only get it to work with I2C2 If I use I2C1 b6/b7 I get this error:
Here's the code I used to test with I2C2:
Attachments: Posted at 2020-10-05 by parasquid Tried it again on I2C1 b6/b7 , got a slightly different error message this time:
Posted at 2020-10-05 by parasquid Doing it on I2C1 with B9/B8 works Attachments: Posted at 2020-10-05 by parasquid Using software I2C seems to work with b6/b7
Attachments: Posted at 2020-10-05 by @gfwilliams Great! I wonder whether this is actually some strange interaction with Serial1, which uses B6/B7 as a Serial port by default. Posted at 2020-10-05 by parasquid I tried Posted at 2020-10-05 by @gfwilliams Setting the console to USB won't actually disable the Serial port - so you wouldn't expect that one to work. Posted at 2020-10-05 by parasquid Just tried this:
And it's still the timeout error
Also, just a small observation: I feel I've been spoiled by the nRF52 chips because I keep expecting I can just assign any peripheral to any pin, whereas with STM32 there are only specific pins you can use for certain peripherals :P Posted at 2020-10-05 by @gfwilliams
Yes, I know the feeling! However STM32 outputs do sink twice as much power, and many can handle 5v signals, so there are some benefits :) Posted at 2020-10-05 by user118421 Thank you so much for all replies! I tried these three suggestions you made but still no "Hello World!". The display is lit and now I don't get any error message. The console.log message is printed but no text on the LCD. Could it be some additional silly beginners mistake I'm doing? The good thing is that I got the Nokia 5110 display I mentioned before to work - it was just a connectivity issue and now it works perfect :)
Attachments: Posted at 2020-10-05 by parasquid In my case, at first I thought I was doing things wrong when I tested the LCD with an MDBT42Q which I've been working with for some time. Then I realized it was because I set the contrast too low. That way I ruled out that the LCD was the issue. If you have another microcontroller (maybe an Arduino?) you can try out some sketches and see if you can rule out your LCD as being problematic? Posted at 2020-10-06 by @gfwilliams Thanks for the pics! Looks like you may have the display plugged into 3.3v? If you plug it into the 'Vin' pin instead I bet it'll work great! Posted at 2020-10-06 by user118421 Thank you - I can't find any 'Vin' pin? I moved the I2C board 'VCC' orange wire from the Pico 3.3 to VBAT as in picture but that did not change the result - still display is lit but no text. Attachments: Posted at 2020-10-06 by @MaBecker Can you turn down the backlight via the blue poti? Posted at 2020-10-06 by user118421 That was it! Turning the blue poti on the I2C board made the text appear :) So happy to have this working - many thanks to all for all your kind help!! Attachments: Posted at 2020-10-06 by @gfwilliams Great! Good call @MaBecker :) I'll add a 'troubleshooting' section to that page with this stuff in Posted at 2020-10-06 by parasquid
I had the same issue with mine when I was first testing it some time ago :D I woild agree that this is a common "gotcha" and should be in the troubleshooting section :P |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-10-03 by user118421
Hello,
I'm trying to connect a HD44780 LCD Display to a Pico but get the below error. I use two 4.7K resistors but maybe have connected them incorrectly (3.3-SDA,3.3-SCL)?
I'm using the native Web IDE on Windows 10.
Many thanks
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions