February 8, 2014

3 wires lcd display PART 2 (HELP ME TO GET IT STABLE)

Tonight i'm back on my last week 3 wires HD44780 lcd display project!

Basically it's not stable at all, the code on GitHub was broken until tonight, i just released a fix few minutes ago. I have to thank [Marcin] for his advice about the broken code.

At the moment the functionality of the LCD is unstable, when i disconnect and reconnect the Arduino from my pc the LCD does not start working. Just a blank screen and if i press the reset button it starts working correctly. But if i press rapidly reset button twice a lot of garbage appears on display. If i press again the reset button magically everything starts up normally with no problem.

the display, after i disconnect/reconnect usb (power) cable  from the Arduino

the display works great, after the reset button was pressed

In the past 4 hours i studied the 74HC595 datasheet praying to get some useful info about timing/reset functions or something like that with no lucky.

Please help me to get it stable and usable, beers coming for you :)


Frank Weichert said...

I got the same Idea, but had not itme to test it. (Just figured out 7 Segment Display to work).
Looks like the Arduino is running the programm before 5V are stable. I just got the idea to put the 5V on analog in, and wait for the highest signal. But reading this i think its a stupid idea ;-)
Good luck,

Mario Vernari said...

My circuit is also a three-wire solution and leverages the SPI, which is way faster than any bitbanging code.
Works like a charm!

klightspeed said...

The default Arduino fuse settings have the Brownout Detector set at 2.7V, so provided the LCD is 3.3V compatible, it should work.

You may want decoupling on power rail near the LCD and near the shift register.

You may also want a pulldown on RCK; it may float high when the Arduino is reset, and if the reset occurs during the serial to parallel write, it may send whatever was shifted into the shift register to the LCD. This would be exacerbated by the fact that you're doing a write() between every bit in write4bits, when the first write() in pulseEnable() will send the value anyway.

Another possible problem could be that the reset could be occurring between two successive nybbles, and thus the first command in the software reset could be getting "eaten" by the last command before the reset.

fropp said...

HaD mods decided to censor my comment, so here's it again:
It's not a floating pin/grounding/supply issue.
The HD44870 doesn't get set to 4-bit mode properly.
Look at the "reset sequence" in LiquidCrystal::begin ... where does it pulse E?