Hi to all.
I would really like to ask for some help on this, because after 3 days, I am at my wits end.
I recently bought some LCDs, 2 line, 16digit 1602A compatible ones like this.
I am able, with my Arduino duemilanove board, to get a perfectly satisfactory "hello world" sketch going.
I have built a functioning "bare bones" atmega328 board with the same code, and I cant get the lcd to work - all I get is 1 line of white blocks. When I put my oscilloscope on the pins, on the bare board, they all produce square waves, and the D13 led flashes fine - so the bare board is functioning.
All my pins are wired up properly, but even so I have swapped them in various combinations to try and change things -nothing.
My questions are:
- how fussy about timing are 1602A LCDs - are there any issues?
- Are there any known voltage issues: arduino is 5v regulated (7805), breadboard is either 6v battery, 6 volt battery with 0.7v drop across silicon diode, or 6v battery with 1.4v drop across 2 diodes?
The code I am using is just variations on the example sketch:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 10,11, 7,6, 5, 4);
//LiquidCrystal lcd(12, 11, 6, 5, 4, 3);
//LiquidCrystal lcd(3, 4, 11, 10, 9, 8);
//LiquidCrystal lcd(12, 11, 10, 4, 3, 2, 1);
// for now, just feed the backlight lcd and contrast
void setup() {
// set up the LCD's number of columns and rows:
pinMode(13,OUTPUT);
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
digitalWrite(13,1);
lcd.print(millis()/1000);
digitalWrite(13,0);
// delay(500);
}


