Pages: [1]   Go Down
Author Topic: HD44780 compatible display only showing small section  (Read 1044 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

The display is this one: http://uk.rs-online.com/web/p/lcd-displays-alphanumeric/5326824/
Datasheet: http://uk.rs-online.com/web/p/lcd-displays-alphanumeric/5326824/

Any suggestions?
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 4324
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

We ran into this exact same problem a few weeks ago.  Check this out (specifically Reply #4): http://arduino.cc/forum/index.php/topic,89611.0.html

Don
« Last Edit: March 09, 2012, 10:27:02 am by floresta » Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks. I had a feeling this may be the case :/
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

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.

1. 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

2. 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 http://arduino.cc/en/Reference/LiquidCrystalConstructor

Regards
Srinath
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 4324
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

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.

1. 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

2. 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 http://arduino.cc/en/Reference/LiquidCrystalConstructor

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?


Don
« Last Edit: March 09, 2012, 01:57:04 pm by floresta » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmmmm... Ok got it... Obviously a casual perusal of the datasheet is probably not good enough  :-)
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For what it's worth, I did indeed try the display with the 8bit interface as well.

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? :/
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 4324
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.


Don
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 626
Posts: 34153
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 73
Posts: 7197
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Post your code. I guess you used the right code but it's worth posting and getting checked for mistakes.
Logged


Western New York, USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 4324
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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):
Code:
#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.


Don
« Last Edit: March 12, 2012, 04:44:09 pm by floresta » Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ordered a new one, unplugged old one, plugged in new one and the same code works perfectly.

The display was indeed faulty.
Logged

Pages: [1]   Go Up
Jump to: