Hi guys, I'm having problems with my LCD and the Liquid Crystal library.
I'm only testing with the Hello World example at the moment, however I only seem to get a small section of the display; Untitled by mikehiow, on Flickr
I just scanned at your LCD's data sheet & noticed a couple of things you may want to check since I think it's very unlikely your new lcd's controller is faulty.
There is an initialization step on page 6 where the number or rows & cols are set. So have you done this properly in your in lcd.begin() - refer to http://arduino.cc/en/Reference/LiquidCrystalBegin
The set CG ram address & set DD ram address commands on page 5 of your controller's data sheet seem to need 6 data bits. This possibly means that you may need to use the 8 data lines mode to be able to access your whole display. Try connecting with 8 data lines from arduino to the LCD as explained in the reference LiquidCrystal - Arduino Reference
I just scanned at your LCD's data sheet & noticed a couple of things you may want to check since I think it's very unlikely your new lcd's controller is faulty.
There is an initialization step on page 6 where the number or rows & cols are set. So have you done this properly in your in lcd.begin() - refer to LiquidCrystal - Arduino Reference
The set CG ram address & set DD ram address commands on page 5 of your controller's data sheet seem to need 6 data bits. This possibly means that you may need to use the 8 data lines mode to be able to access your whole display. Try connecting with 8 data lines from arduino to the LCD as explained in the reference LiquidCrystal - Arduino Reference
Regards
Srinath
Sorry - neither of these guesses are valid.
(1) He would not be getting the '22' on the screen if the display were not set for two rows of memory.
(2) All commands and all display data require 8 bits. The interface mode, 4-bit or 8-bit, is irrelevant.
Did you look at the link I provided in my original reply?
Is it perhaps possible I damaged the controllers by (as embarassing as it is) connecting the +5v and the GND the wrong way around initially?
That's possible but I would think that the main controller would have been damaged as well. Have you checked the board for breaks in the traces and have you tried to apply pressure to the glass?
You could always use some masking tape and call it an 8x2 display.
Just try printing a long string in place of hello world, you will probbly find that letters appear later on in the string. Most of these LCD displays are not contiguous when used with the LCD libary.
That is the 16 th letter in the string may well appere in the 9th position on the display, or some such combination.
This is what I always find when using the libary anyway.
Just try printing a long string in place of hello world, you will probbly find that letters appear later on in the string.
Here's how to do the first part (try printing a long string):
#include <LiquidCrystal.h>
//LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // put your pin numbers here
void setup()
{
lcd.begin(20, 4); // this will work for all displays except some rare 16x1's
for (char i=47; i<127; i++) // send 80 consecutive displayable characters to the LCD
{
lcd.print(i);
delay(100); // this delay allows you to observe the addressing sequence
}
}
void loop()
{
}
I don't agree with the second part (you will probbly find that letters appear later on in the string).
I think you will probably see characters in 16 locations and blocks in the rest of the locations.