Well i tried - LCD

Like i said, i would try find out what my LCD is capable of.
Ive spent 2 odd hours reading about I2C, and a lot of posts regarding the I2C LCDs.
Ive spent near an hour playing with all the examples.
Ive updated the LiquidCrystal library to 1.2.1.
Ive loaded the LiquidCrystal_I2C library.
Ive determined its address is 0x27.
And all i can get out of it is backlight sometimes on, others off, sometimes a quik flash.
And a line of solid characters.

So it will have to wait till i aquire further knowledge with I2C.
Then i will let you know if it can do the Extended ASCII set.


We sure would love to help :wink: but your not giving much details on your code, you lcd board or any thing.

Maybe if you would send both side picture and the code your using, this post would fill up instantly. :stuck_out_tongue:

Cheers mate,
but this I2C is a bit beyond me yet, i tried all sorts of code from lots of sites, and the examples, too many for me to have kept track of what i was doing!

Heres a picture anyway, from what i was reading, i think its the sainsmart one.
(I did it just to see if i could manage a simple run to try some Extended chars, but oh well)

So unless you can provide me with an example, or some quick help, to get it running…
I just went looking for the page i found how to connect it, ie. pins A4 and A5, but cant find it, and realise theres hundreds of pages regarding this out there :S. So like i said, its beyond me, and im wasting my time trying.

Thanks anyway :slight_smile:

Yeah I got one of those in the post comming. I just can't wait to try stuff on it. Tel me it was pré assembled?

Be patient whit in a few day's ill get back to scream with you on this :wink:

Mean while some other might help. has soon i get the board Ill be able to help.

But one question, what happen if you remove the jumpper? and what happens if you put a LED instead?

Show me your code you have tryed and got the most success with and tel me how many collumn and row is ther ont your thing.

I tried all sorts of code from all sorts of websites, cant recall exactly. You will see most of them with Google, i searched this error at some point, and went through a few of the google results from it:

error: 'LiquidCrystal_I2C' does not name a type

(But that mustve been after i found out about that library, because i updated the LiquidCrystal library to 1.2.1 before i got as far as the I2C lib)

Pretty sure the jumper is just supplying power to the backlight, I read about controlling backlight from another pin, somewhere, so i assume you would remove jumper and connect pin to that.

Well if your board is any like the one that is comming here is the chip set pdf.


As you can see at page 4, there are only 3 address line, So I must assume that the address of you board is between 1 and 7, 0 being the master.

Wrong, the least significant bit is unused in the address register as we can see at page 7, that would mean that it's between 2 and 15.

lol, like i said, I2C is way ahead of me.
I see that on page 4, but have no idea about what your talking about regarding the address.
All i know is my devices I2C address is 0x27.
And the picture i saw for connections was from here:

that code i tried too.
Lot of the code i also tried was from the examples everywhere in the IDE libraries...

Please, can you tel me the Chip ID, or if you prefer, the letter and numbers on the chip cause that would help lot.

And Also, Have you put a copy of the libraries in the libraries folder of you sketch folder, if not that error message could be caused by this

Just for the fun of it try I2c address 0x0E or 0x0F. Cause the 3 address line seam to be connected togeter to a source.

Yet I could be wrong the picture is dark around that part, but in the green square, and maybe right above this is where the chip get is address.

OK, well with this code:

//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x0F,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display
void setup()
  lcd.init();                      // initialize the lcd
  // Print a message to the LCD.
  lcd.print("Hello, world!");
void loop()

Changing from 0x27 to 0E and 0F made no difference, just 1 line of solid characters, backlight is on.
Chip - PCF8574T

solid characters hein? Have you tried lowering the contrast?

Ok fisrt lower the contrast half way carefully

Second go to this page and copy paste the code you find and upload it


Once you have noted the address it give you, high probably not 27, correct the address in this code upload it and try it

** Example Arduino sketch for SainSmart I2C LCD Screen 16x2
** based on https://bitbucket.org/celem/sainsmart-i2c-lcd/src/3adf8e0d2443/sainlcdtest.ino
** by
** Edward Comer
** LICENSE: GNU General Public License, version 3 (GPL-3.0)

** This example uses F Malpartida's NewLiquidCrystal library. Obtain from:
** https://bitbucket.org/fmalpartida/new-liquidcrystal 

** Modified – Ian Brennan ianbren at hotmail.com 23-10-2012 to support Tutorial posted to Arduino.cc

** Written for and tested with Arduino 1.0
** NOTE: Tested on Arduino Uno whose I2C pins are A4==SDA, A5==SCL

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

#define I2C_ADDR    0x3F // <<----- Add your address here.  Find it from I2C Scanner
#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;

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); //  <<----- My LCD was 16x2

// Switch on the backlight
lcd.home (); // go home


void loop()
  // Backlight on/off every 3 seconds
  lcd.setCursor (0,1);        // go to start of 2nd line
  lcd.setBacklight(LOW);      // Backlight off
  lcd.setBacklight(HIGH);     // Backlight on

yes, i just searched LCM1602 and found this thread, it may make sense to you, i will start trying some of that…

i gather mine is the first of the 3, as theres no markings of A0-A2 on it.

Yaaaaay i got it working :slight_smile: :slight_smile: :slight_smile:

i had already verified address 0x27

this code:

/* YourDuino.com Example Software Sketch
 16 character 2 line I2C Display
 Backpack Interface labelled "YwRobot Arduino LCM1602 IIC V1"
 terry@yourduino.com */

/*-----( Import needed libraries )-----*/
#include <Wire.h>  // Comes with Arduino IDE
// Get the LCD I2C Library here: 
// https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads
// Move any other LCD libraries to another folder or delete them
// See Library "Docs" folder for possible commands etc.
#include <LiquidCrystal_I2C.h>

/*-----( Declare Constants )-----*/
/*-----( Declare objects )-----*/
// set the LCD address to 0x27 for a 20 chars 4 line display
// Set the pins on the I2C chip used for LCD connections:
//                    addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address

/*-----( Declare Variables )-----*/

void setup()   /*----( SETUP: RUNS ONCE )----*/
  Serial.begin(9600);  // Used to type in characters

  lcd.begin(16,2);   // initialize the lcd for 16 chars 2 lines, turn on backlight

// ------- Quick 3 blinks of backlight  -------------
  for(int i = 0; i< 3; i++)
  lcd.backlight(); // finish with backlight on  

//-------- Write characters on the display ------------------
// NOTE: Cursor Position: (CHAR, LINE) start at 0  
  lcd.setCursor(0,0); //Start at character 4 on line 0
  lcd.print("Hello, world!");

// Wait and then tell user they can start the Serial Monitor and type in characters to
// Display. (Set Serial Monitor option to "No Line Ending")
  lcd.setCursor(0,0); //Start at character 0 on line 0
  lcd.print("Use Serial Mon");
  lcd.print("Type to display");  

}/*--(end setup )---*/

void loop()   /*----( LOOP: RUNS CONSTANTLY )----*/
    // when characters arrive over the serial port...
    if (Serial.available()) {
      // wait a bit for the entire message to arrive
      // clear the screen
      // read all the available characters
      while (Serial.available() > 0) {
        // display each character to the LCD

}/* --(end main loop )-- */

/* ( THE END ) */


i thnk where i went wrong, was this code references LiquidCrystal_I2C.h
and i never tried that with the updated v1.2.1 LiquidCrystal library, assuming that that library wasnt I2C because name never specified.

So yeah all good, this page here is where i picked up this discrepancy, which i hadnt notioced anywhere else.

Thanks ever so much Frédéric_Plante for pushing me to this :slight_smile:
Im so so happy now :slight_smile:

Hey we never learn any thing by giving up. Winner never give up.

Good, i got a good buntch of new knoledge to so (Y) :slight_smile:

Other thing i learned searching this morning is, i think the IDE (v1.5.3), (and hopefully the screen), will support Extended chars, but the Serial Monitor in the IDE does NOT support them...
In case anybody else is interested.

You know that this I2C module is actualy bidirectional? I think I have better plan for it then my LCD screen.