Power issue?

Hi,
I have 3 leds and an LCD connected using the liquid crystal library and one switch running off a 9 volt battery . Program was running fine, but now it doesn't work until I press reset.

The lcd backlight lights up when I turn it on, but the program doesn't run until I hit reset. Any ideas as to what is causing this? I've tried switching batteries but no luck. What could cause this? Is it a power issue?

Thanks!

The Liquid Crystal Library was designed to work with LCDs that have Hitachi HD44780 controllers, and was originally written when the Arduino was an 8 Mhz item.

I have found many displays that advertise they are HD44780 'compatible'... but the timing is a bit different.

The main problem seems to be the amount of time required for the 'compatible' chip to start up... newer Arduinos are up and sending commands to the display before the display is ready.

The latest version of the Liquid crystal library has partially fixed that... the trick is to delay a while before calling LiquidCrystak.Begin()... i.e. to give the display enough time to initialize after powering up.

As an experiment, try putting in a 1000 mSec delay() before calling LiquidCrystaal.Begin() in your setup. See if that doesn't help. If that helps, just lower the delay to a point where the problem re-occurs, then ad 10 mSeconds..

Thanks Mike. That did the trick!