Problem with allignment of LCD

Hope you can help me out!

You will have to help us out a bit first.

We have to know what type of LCD you are dealing with.

We have to know what program code you are using.

We have to know how your LCD is interfaced with your Arduino.

Don

It is defective: the 2nd line should have shown its top row, as the 1st line did.

dhenry:
It is defective: the 2nd line should have shown its top row, as the 1st line did.

There are 2 lines missing then, on the bottom row. Could this be a bad connection on the pins? I soldered them myself so it could be.

See reply number one (post number two!). If anyone can sort it out for you Don can.

floresta:

Hope you can help me out!

You will have to help us out a bit first.

We have to know what type of LCD you are dealing with.

We have to know what program code you are using.

We have to know how your LCD is interfaced with your Arduino.

Don

It's a 1602a LCD, it doesn't say more on the lcd.

Here is my code:

/*
lcdSetup - Guy
Basic setup for a LiquidCrystal display


Connections:

RS = 12
RW = 11
E  = 10
D4 = 6
D5 = 7
D6 = 8
D7 = 9

A = 5V   (+)
K = GND  (-)

VDD = 5V  (+)
VSS = GND (-)
V0 = PotMeter Middle Pin

PotMeter:
Right Pin = 5V  (+) 
Left Pin  = GND (-)

*/
#include <LiquidCrystal.h> //Include the LiquidCrystal library

LiquidCrystal lcd(12, 11, 10, 6, 7, 8, 9); //Setting a LiquidCrystal as 'lcd' 
void setup() 
{
  lcd.clear(); //Clear the display
  lcd.begin(16,2); //Define the Length and Rows
}

void loop() 
{
  lcd.setCursor(0,0);
  lcd.print("Hello forums!");
  lcd.setCursor(0,1);
  lcd.print("Pixels MESS up");
  delay(100000);
}

Here is a pic of the setup:

Note: This is a slightly different pin allignment then I now use. But it did the same thing.

I also tried using all data pins, didn't change anything.

There are 2 lines missing then, on the bottom row.

The bottom row is for the underline / cursor. The font itself is 5x7. Check the datasheet.

I also tried using all data pins, didn't change anything.

It has nothing to do with external connections.

The lcd is toast.

dhenry:

I also tried using all data pins, didn't change anything.

It has nothing to do with external connections.

The lcd is toast.

Damn that, ordering a new one then. Any good places to get one?

It's a 1602a LCD, it doesn't say more on the lcd.

That's enough to get started.

Damn that, ordering a new one then. Any good places to get one?

I wouldn't give up yet.

A character mode LCD like the one you have does not have to be refreshed. Therefore the code that you have in loop() should be in setup() and loop() should be blank.

But lets go back a step. What happens when you connect just the backlight, the power, and the contrast (pins 15, 16, 1, 2, and 3)?

Back one more step - are you using a resistor in series with either backlight lead?

Don

Your LCD is good, dont scrap.
Just measured the output voltages of the Arduino input to the LCD. and tell what voltage at what pin you are getting wrt gnd. I think one of your arduino pin out has low voltage (any led, resistor you added)

But lets go back a step. What happens when you connect just the backlight, the power, and the contrast (pins 15, 16, 1, 2, and 3)?

Did this, when I put the contrast all the way up only the top row changes contrast. The bottom one doesn't.

Back one more step - are you using a resistor in series with either backlight lead?

I am not using a resister in series with either of the backlight lead, is this needed?

Any good places to get one?

Tough to know in your backyard but I got mine (48 of them, in one box) years ago from digikey.

guyspronck:

But lets go back a step. What happens when you connect just the backlight, the power, and the contrast (pins 15, 16, 1, 2, and 3)?

Did this, when I put the contrast all the way up only the top row changes contrast. The bottom one doesn't.

That is exactly what is supposed to happen. Most likely your LCD is not defective but personally I wouldn't absolutely declare it good or bad based on what I know so far.

Back one more step - are you using a resistor in series with either backlight lead?

I am not using a resister in series with either of the backlight lead, is this needed?

These backlight LEDs always require some sort of current limiting. Sometimes there is a resistor on the pc board, but most of the time you need an external one. I would start with 150 ohms and see what happens.

Without this resistor you could damage the LEDs but it is more likely that your power supply is not capable of supplying enough current to do so. In this case it's output voltage could be dropping and this could possibly be causing the LCD to malfunction.

Don

Without this resistor you could damage the LEDs but it is more likely that your power supply is not capable of supplying enough current to do so. In this case it's output voltage could be dropping and this could possibly be causing the LCD to malfunction.[/color]

I put a 1k resister on the backlight and this fixed only the first character. Don't know what it could be really.

Try pushing down the metal housing against the circuit board and see if the missing row gets any better. Your symptom resembles some of the defective displays that have poor contact between the glass that has liquid crystal on it and the circuit board that has control circuit on. There are 6-8 metal tabs that hold these two pieces together. If these tabs are loose, your display will not show some pixels. If they are held together but the conductive rubber strips between them is out of place, you may also experience this symptom. You are putting a huge delay in your loop already so I don't think it is refreshing-related problem (refreshing too fast).

I put a 1k resister on the backlight and this fixed only the first character. Don't know what it could be really.

That's pretty large, is your backlight still illuminated?

Did you make this change that I mentioned in reply #9?
"A character mode LCD like the one you have does not have to be refreshed. Therefore the code that you have in loop() should be in setup() and loop() should be blank."

Also, you don't need the lcd.clear() but if you do use it it should be placed after lcd.begin().

Don

Again... if you post Arduino output pin voltages ..may be i can help you solve?.. okay, just tell if you have any resisters/led at output pins of arduino between lcd and arduino?
try to add delay between the refresh rate of lcd.

Again... if you post Arduino output pin voltages ..may be i can help you solve?..

I don't think most of these readings will be much help. For example the signal driving LCD Enable pin is typically low most of the time. There is a very short pulse whenever information is transferred to or from the LCD module. This will read '0' on most voltmeters.

The voltages on pins 2, and 3 with respect to 1 and 15 with respect to 16 are the only DC voltages present. These will be correctly interpreted by a voltmeter and might be of help.

try to add delay between the refresh rate of lcd.

The LCD does not have to be, and should not be, refreshed.

Don

floresta:

try to add delay between the refresh rate of lcd.

The LCD does not have to be, and should not be, refreshed.

Don

Don,
He needs delay, in case, If he clear the lcd too fast...

liudr:
Try pushing down the metal housing against the circuit board and see if the missing row gets any better. Your symptom resembles some of the defective displays that have poor contact between the glass that has liquid crystal on it and the circuit board that has control circuit on. There are 6-8 metal tabs that hold these two pieces together. If these tabs are loose, your display will not show some pixels. If they are held together but the conductive rubber strips between them is out of place, you may also experience this symptom. You are putting a huge delay in your loop already so I don't think it is refreshing-related problem (refreshing too fast).

When pusing down the LCD the row got better. I pushed it around a bit until it stayed in place properly and it shows the pixels correctly. Only the top row of pixels of the bottom row is not displaying, the letters are too high to fit on. Is this a common problem?

Also changed the code: (not refreshing it and put it in setup instead of loop)

/*
lcdSetup - Guy
Basic setup for a LiquidCrystal display


Connections:

RS = 12
RW = 11
E  = 10
D0 = 2
D1 = 3
D2 = 4
D3 = 5
D4 = 6
D5 = 7
D6 = 8
D7 = 9

A = 5V   (+)
K = GND  (-)

VDD = 5V  (+)
VSS = GND (-)
V0 = PotMeter Middle Pin

PotMeter:
Right Pin = 5V  (+) 
Left Pin  = GND (-)

*/
#include <LiquidCrystal.h> //Include the LiquidCrystal library

LiquidCrystal lcd(12,11, 10, 4, 5, 6, 7); //Setting a LiquidCrystal as 'lcd' 
void setup() 
{
  //lcd.clear(); //Clear the display
  lcd.begin(16,2); //Define the Length and Rows
  lcd.setCursor(0,0);
  lcd.print("ABCDEFGHIJKLMNOP");
  lcd.setCursor(0,1);
  lcd.print("ABCDEFGHIJKLMNOP");
}

void loop() 
{
}

And a pic of how it looks now: