Help with an 8 x 2 LCD

I bought two of these (8x2 LCD display 0802A blue backlight 1pcs | eBay) LCDs, and need help getting them to run. I have followed the arduino liquidcrystal example, but nothing shows up on the LCD. I asked the ebay seller what controller they used, but got no reply. I am looking for suggestions to get this thing running, because I am stumped. I did try wiring it right to an I2C adapter, but that didn't work, so I am guessing it is not the HD44780 controller.

If I can't get this running can someone point me to one that will work? I need one with the blue backlight and white text. I also would like an I2C one but I haven't been able to find any so parallel is fine.

I'm going to touch up my wiring then post a picture in a while.

I have followed the arduino liquidcrystal example, but nothing shows up on the LCD.

Are you sure that you interpreted the pin numbers correctly. Pin '1' is the one with the square outline, pin '2' is (typically) directly above pin '1'. In other words the odd numbered pins are the ones closest to the display and the even numbered ones are closest to the edge of the board.

I did try wiring it right to an I2C adapter, but that didn't work, ...

If you interpreted the pin numbers incorrectly when connecting it directly to the Arduino then they would also be incorrect when connecting to the I2C adapter.

... so I am guessing it is not the HD44780 controller.

I would really be surprised if it was not HD44780 compatible.

I'm going to touch up my wiring then post a picture in a while.

That's a really good idea. Make sure that we can see both ends of every wire.

Don

floresta:

I have followed the arduino liquidcrystal example, but nothing shows up on the LCD.

Are you sure that you interpreted the pin numbers correctly. Pin '1' is the one with the square outline, pin '2' is (typically) directly above pin '1'. In other words the odd numbered pins are the ones closest to the display and the even numbered ones are closest to the edge of the board.

I did try wiring it right to an I2C adapter, but that didn't work, ...

If you interpreted the pin numbers incorrectly when connecting it directly to the Arduino then they would also be incorrect when connecting to the I2C adapter.

... so I am guessing it is not the HD44780 controller.

I would really be surprised if it was not HD44780 compatible.

I'm going to touch up my wiring then post a picture in a while.

That's a really good idea. Make sure that we can see both ends of every wire.

Don

I'm pretty sure I have the pins right, they are set up like this

16 ********
******** 1

I'm going to undo all the connections and re-do them to be absolutely sure.

As for the I2C adapter I wired it up the way it would normally be but I had to use some wire since this has two rows of 8 pins, but I had the pins correct, and nothing happened when I hooked it up for some reason.

Y'know what, you were right, I just tracked a couple traces, and boom, I had it completely wrong!

First I'm going to try the parallel method though before I spend another 15 minutes wiring up an I2C controller to it, hopefully this ill work.

WHOOOO THANKYOUTHANKYOUTHANKYOUTHANKYOU!

She lives! :smiley: So happy right now, now I can finish a project I've been waiting a month and a half to do! I can't believe I overlooked such a simple thing!

Now to wire up that I2C controller and get going!

Hmm, ok now something else is being finnicky. I can't get any text to appear on the screen. I've adjusted contrast up and down with no avail, and tried two different scrips. The backlight does turn on, but no text.

I really want this to be I2C, because all those extra wires are going to take up extra room in the case and make it more difficult to add stuff in later.

Here's the I2C adapter: New IIC I2C TWI SP​​I Serial Interface Board Module For Arduino LCD 1602 Display | eBay
I know for sure that it works with 16x2 lcds

and here's the code that I use for them:

#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>  // F Malpartida's NewLiquidCrystal library


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

#define  LED_OFF  0
#define  LED_ON  1
LiquidCrystal_I2C  lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

void setup() 
{
  lcd.begin (16,2);  // initialize the lcd
// Switch on the backlight
  lcd.setBacklightPin(BACKLIGHT_PIN,NEGATIVE);
  lcd.setBacklight(LED_ON);
  lcd.clear();
}

void loop()  
{

 
// Print on the LCD
  lcd.backlight();  
  lcd.setCursor(0,0); 
  lcd.print("  LCD Line One");
  lcd.setCursor(0,2);
  lcd.print("  LCD Line Two");
}

Are you sure that you have the correct I2C address. It could be anywhere between 0x20 and 0x27 if the board uses an 8574 and anywhere between 0x38 and 0x3F if it uses an 8574A. Your best bet would be to run an I2C scanner sketch.

I assume you are aware that you need pullup resistors on the two I2C lines.

Don

Edit: I just scrolled down on your link in reply #5 and found: "I2c address: 0x27"

floresta:
Are you sure that you have the correct I2C address. It could be anywhere between 0x20 and 0x27 if the board uses an 8574 and anywhere between 0x38 and 0x3F if it uses an 8574A. Your best bet would be to run an I2C scanner sketch.

I assume you are aware that you need pullup resistors on the two I2C lines.

Don

Edit: I just scrolled down on your link in reply #5 and found: "I2c address: 0x27"

Ebay has it listed wrong. I have two different boards and they both say 0x27 but are actually 0x20. I have confirmed this with the I2C scanner

Is it possible the data pins are different for this setup? pins D$ to D7 are frin 0 to 3, but maybe that doesn't work with an 8x2 lcd? Just a shot in the dark.

Ah screw it I'll just find some ribbon cable with 6 wires and use the parallel mode

Is it possible the data pins are different for this setup?

The I2C adapter board is designed to connect directly to the LCD modules that have the more standard setup of a single row of 14 or 16 pins.

Since your board does not have that configuration I assume that you are using wires to connect your LCD module to your I2C adapter board.

It is now your responsibility to make sure that the actual wiring and the description of that wiring match up. That would be done here:

#define En_pin  4
#define Rw_pin  5
#define Rs_pin  6
#define D4_pin  0
#define D5_pin  1
#define D6_pin  2
#define D7_pin  3

You would change your wiring to match the numbers here, or change the numbers here to match your wiring.

Don

Yeah it's wired up fine, it's just being a paint.

Anyways I'm done re-wiring it for parallel use, and actually aside from the wires which are annoying it does free up some space in the case, so it evens out.