16 x 2 display only shows left 8 characters ?

I have just added an I2C interface to my 16 x 2 lcd, and am only seeing the leftmost 8 characters on both lines. The right half of the screen is blank. If I scroll the message the left 8 characters work as if it is an 8 character display. The display was bought a few weeks ago as one of two, and I don't think I tried this one (the other worked with direct arduino connection) before soldering on the i2c board, so no guarantees I'm afraid.

The interface is based on a PCF8574T (read off the IC on the interface board), and sourced from ebay here:
http://www.ebay.co.uk/itm/390527388644?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

It reports an address of 0x20 as expected with no address jumpers when using i2cscanner.

I'm using an Uno clone, but intending to move to a Nano (not yet tested) in the final implementation.

The liquidcrystal_I2C library I've used is from YWROBOT I think.

//YWROBOT
//last updated on 21/12/2011
//Tim Starling Fix the reset bug (Thanks Tim)
//wiki doc I2C_TWI_LCD1602_Module__SKU__DFR0063_-DFRobot

I've tried the library from here
https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home

and it simply 'turned off' the backlight and didn't show anything. Maybe I need to work on this a bit more, but I couldn't see anything obvious.

Code below, just in case I'm doing something stupid !

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x20,16,2);  // set the LCD address to 0x20 for a 16 chars and 2 line display

void setup()
{
  lcd.init();                      // initialize the lcd 
 
  // Print a message to the LCD.
  lcd.init(); 
  lcd.setCursor(0, 0);
  lcd.backlight();
  lcd.print("Hello, world!");
  lcd.setCursor(1,1);
  lcd.print("Hello, world!");
}

void loop()
{
  for (int positionCounter = 0; positionCounter < 13; positionCounter++) {
    // scroll one position left:
    lcd.scrollDisplayLeft(); 
    // wait a bit:
    delay(250);
  }

  // scroll 29 positions (string length + display length) to the right
  // to move it offscreen right:
  for (int positionCounter = 0; positionCounter < 29; positionCounter++) {
    // scroll one position right:
    lcd.scrollDisplayRight(); 
    // wait a bit:
    delay(250);
  }
  
    // scroll 16 positions (display length + string length) to the left
    // to move it back to center:
  for (int positionCounter = 0; positionCounter < 16; positionCounter++) {
    // scroll one position left:
    lcd.scrollDisplayLeft(); 
    // wait a bit:
    delay(250);
  }
  
  // delay at the end of the full loop:
  delay(1000);
}

OK, I've now gone through F Malpartida's library stuff and checked connections etc. Exactly the same results, left hand side works, right hand side doesn't.

Looks like a hardware issue with the screen ?

Any advice ?

Tim

Looks like a hardware issue with the screen ?

It's a hardware issue but probably not with the display screen itself.

The HD44780 (or equivalent) LCD controller contains all of the memory and does all of the processing required by your entire display but it only handles the display of 16 characters, those on the left half of your display. The display of the other 16 characters is handled by an HD44100 (or equivalent) auxiliary controller.

Since you are able to display characters on the left half of the screen but not on the right this indicates a problem with the auxiliary controller and/or the connections between that device and the screen.

Don

Thanks Don, it's unfortunate, but pretty much what i expected - its a hardware fault. The controllers on the lcd are hidden under some blobs of black goop, so there's no way of investigating further.

It's not going to be easy to remove the interface off the back of the lcd, so they are pretty much both toast now. Can't spend any more time on this, the other bits of the project are calling ! Looks like I'll have to buy a replacement screen, and this time I'll probably go for one with an i2c interface already attached.

Tim

...and/or the connections between that device and the screen.

You could investigate this aspect.

Don

I know I should stop messing with this and get on with something more productive, but I just can't let it go !

Some other interesting symptoms -

  1. When I disconnect the vcc and reconnect, the screen happily shows a row of 16 completely filled rectangles - so something is working !
  2. I have caught it out just now, and when I removed and reconnected the interface connector (power and i2c) and then quickly reset the arduino it showed the whole screen for about a second before the right hand side disappeared. This does not happen with just an arduino reset, or with just power off/on to the lcd.

I'm no further forward really !

when I removed and reconnected the interface connector ...

Did you happen to apply any pressure and/or torque to the display as you did this?

Don

I've tried wriggling, twisting, poking the display, pcb and interface etc, and made no difference. The only time it will display on the right hand side is immediately after interface connector connection/arduino reset, and that's repeatable - it shows for about a second and then the right goes blank.

Try again with

https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home

use the version: LiquidCrystal_V1.2.1.zip

and then load this code:

/*
Tested on Arduino 1.0.3
UcontrolIt.TV
Bulding Block 1 - Sketch 1 Serial LCD

Test Sketch for the YwRobot Arduino serial LCD adapter - LCM1602 IIC V1

This may be the same as the Sainsmart I2C LCD2004 adapter but we havent tested it.

This example uses F Malpartida's ( http://www.electrofunltd.com/ )  NewLiquidCrystal
library available from:

https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads

You need to copy the new library to your Arduino libraries folder!

Mark Johnson
uControlIt.tv
December 2012

License: GNU General Public License

*/

// Load Libraries
//#include
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

// Define variables

#define I2C_ADDR 0x20  // Define I2C Address where the PCF8574A is
#define BACKLIGHT_PIN     3
#define En_pin  2
#define Rw_pin  1
#define Rs_pin  0
#define D4_pin  4
#define D5_pin  5
#define D6_pin  6
#define D7_pin  7

int n = 1;

//Initialise the LCD
LiquidCrystal_I2C	lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

void setup()
{
// Define LCD as 16 column x 2 rows
  lcd.begin (16,2);

// Switch on the backlight
  lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
  lcd.setBacklight(HIGH);

// Goto first column (0 not 1!), first line (0 not 1!),
  lcd.setCursor ( 0, 0 );

// Print at cursor location
  lcd.print("UControlIt.TV");

// Go to first column (0 not 1!), second line (which is 1 not 2!)
  lcd.setCursor ( 0, 1 );

// Print at cursor location
  lcd.print("Count:");

}

void loop()
{
 lcd.setCursor ( 7, 1 );
 lcd.print(n);
 n=n+1;
 delay (1000);
}

The code is from

http://www.ucontrolit.tv/arduino-bb1/

but I did change the I2C address to 0x20

This must have been a hardware error - the replacement screen worked perfectly.

I have just been given three 16x1 displays, all slightly different, set on boards slightly bigger than the display with toshiba SMD T7934 chips on the back.
I have the same problem with all three, I am using the sketch from the arduino library

/*
  LiquidCrystal Library - display() and noDisplay()
 
 Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
 library works with all LCD displays that are compatible with the 
 Hitachi HD44780 driver. There are many of them out there, and you
 can usually tell them by the 16-pin interface.
 
 This sketch prints "Hello World!" to the LCD and uses the 
 display() and noDisplay() functions to turn on and off
 the display.
 
 The circuit:
 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)
 
 Library originally added 18 Apr 2008
 by David A. Mellis
 library modified 5 Jul 2009
 by Limor Fried (http://www.ladyada.net)
 example added 9 Jul 2009
 by Tom Igoe 
 modified 22 Nov 2010
 by Tom Igoe

 This example code is in the public domain.

 http://arduino.cc/en/Tutorial/LiquidCrystalDisplay

 */

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 1);
  // Print a message to the LCD.
  lcd.setCursor(0,0);
  lcd.print("hello, world!");
}

void loop() {
  // Turn off the display:
  lcd.noDisplay();
  delay(500);
   // Turn on the display:
  lcd.display();
  delay(500);
}

and have noticed that if I unplug them and push them back in (I am using bread board from an arduino uno) the screen is blank until I press the reset. I assume this sends information to set the boards up before sending the information to write to the screen. Is it possible it could need information sending to tell it to use all 16 columns?
Or is this what the line lcd.begin(16,1); does?
Just a thought?

I

have just been given three 16x1 displays, all slightly different, set on boards slightly bigger than the display with toshiba SMD T7934 chips on the back.
I have the same problem with all three, I am using the sketch from the arduino library

Actually you have a completely different problem, one that is easily fixed.

The fact is that most 16x1 displays are internally configured as 8x2 displays. This means that you have to use lcd.begin(8,2); at the beginning and you have to use lcd.setCursor(0,1); to display information on the right half of the display.

Follow the LCD Addressing link at http://web.alfredstate.edu/weimandn for all the background information (it's toward the bottom).

Also: When you are troubleshooting a display you really do not want to use any code that will dynamically change what is displayed. This means that loop() should be empty between the { } brackets.

Don

AAAnd problem solved
thank you floresta, I made the necessary alteration and it now works perfect.

 This example code is in the public domain.

 http://arduino.cc/en/Tutorial/LiquidCrystalDisplay

 */

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(8, 2);
  // Print a message to the LCD.
   lcd.setCursor(0,0);
   lcd.print("hello, w");
   lcd.setCursor(0,1);
   lcd.print("orld");
}
void loop() {
  // Turn off the display:
 
  lcd.noDisplay();
  delay(500);
  lcd.setCursor(0,0);

   
   // Turn on the display:
  lcd.display();
  delay(500);
}

that has saved me from throwing away three good displays. thanks again.