I have a brand new Jameco (newhaven) serial LCD 16x2 display:
http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_2118651_-1
Data sheet:
http://www.jameco.com/Jameco/Products/ProdDS/2118651.pdf
My simple test program worked great. But after trying something a little more complicated, I can't get anything on the display anymore. The LCD's pin 1 goes to digital 1, pin 2 to arduino data ground, pin 3 to arduino 5v.
// This worked originally to repeat the text on screen
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.print("Hello! ");
delay(500);
}
After adding some ShiftBrite LEDs to my circuit and the control code from here:
http://www.macetech.com/blog/node/54
the LCD no longer works, even after reverting to my basic circuit and sketch example. All I get is an illuminated, but blank panel.
I tried something a little more sophisticated, including some delays, but I still can't get text on the screen. (The ShiftBrite ran on different digital pins, so I think the failure is pure coincidence.) Could I have simply fried something on the LCD circuit, or maybe tripped it up with some bad data? I am open to any clues on how to get text to display again.
(FWIW, the Serial Monitor seems to echo the correct ASCII data.)
// This example and the original now print nothing.
void setup()
{
Serial.begin(9600);
delay(50);
// Clear screen
Serial.print(0xFE, BYTE);
Serial.print(0x51, BYTE);
delay(50);
// Home cursor
Serial.print(0xFE, BYTE);
Serial.print(0x46, BYTE);
delay(50);
// Set contrast
Serial.print(0xFE, BYTE);
Serial.print(0x52, BYTE);
Serial.print(40);
// Display baud rate
Serial.print(0xFE, BYTE);
Serial.print(0x71, BYTE);
// My message
Serial.print("Hello! ");
}
void loop()
{
// TO DO: update text
delay(500);
}