[SOLVED] "LCM1602 IIC A0 A1 A2" (+OTHERS) I2C Controller working with 20x4 LCD

Hi
I bought 3 of these "LCM1602 IIC" things with the hope I can use the 3 of them in one arduino.
It was a difficult task to get them work until I got to http://arduino-info.wikispaces.com/LCD-Blue-I2C.

The bad news was they ALL have address 0x20 , so I see the same info in the 3 20x4 LCD Displays ( 2004).
Is there a way to change the address to 2 of these 3 circuits?.

thnx

fedekrum:
The bad news was they ALL have address 0x20 , so I see the same info in the 3 20x4 LCD Displays ( 2004).
Is there a way to change the address to 2 of these 3 circuits?.

If they are the same as Terry's image in the first post then removing the solder bridge(s) on A0, A1 or A2 so all three LCD's have different combinations should change the address. Remove a bridge and then use a I2C scanner to check the address has changed.

Yes, is the one that says "LCM1602 IIC A0 A1 A2" I did remove a0 and a2 and gives me de same address, 0x20.
Any Clue?

fedekrum:
Yes, is the one that says "LCM1602 IIC A0 A1 A2" I did remove a0 and a2 and gives me de same address, 0x20.
Any Clue?

Strange, can you post a picture of A0-A2 pins you have cleared. It should have worked unless there is also a trace to cut under the solder bridge.

Hi,
I'll be testing this soon... I plan to update the ArduinoInfo.Info WIKI with photos of the variants.

Two things vary: I2C address (usually 27 or 20) AND pinout of the I2C chip to the LCD pins.

@bperrybap My apologies for not seeing you post on the proper changes to the examples! I'll do that and post back here...

Hi,
Bill, I have redone and tested all the examples using the FM library only. I'm glad to remove that source of confusion for users.

The update page is here: http://arduino-info.wikispaces.com/LCD-Blue-I2C

I THINK I have the constructor/init right. Please comment!!

Cool!
The constructors look good.
There is a remaining call to

lcd.setBacklight(HIGH);  // HIGH or LOW

in the second example. oops....

One thing that might be useful for folks is to show them how to control
the backlight in the examples.

Maybe extend the comment for the begin() calls?

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

Might be interesting to add this code or something similar
somewhere in setup() for a quick demo of backlight control?

		/*
		 * Quick 3 blinks of backlight
		 */
		for(int i = 0; i< 3; i++)
		{
			lcd.backlight();
			delay(250);
			lcd.noBacklight();
			delay(250);
		}
		lcd.backlight(); // finish with backlight on

As you have seen, some backpacks have a jumper installed on it that can affect backlight control.
Since some jumpers permanently enable the backlight on and some permanently disable the backlight to off,
this small test will allow users to tell if their backlight circuit is working and figure out how they
want to set their backlight jumper (if they have one).

--- bill

Just noticed one other thing. The i2c address in the comment in the last example doesn't match the constructor
Not sure which is correct:

// 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(0x20, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address

--- bill

I have taken a picture. Find it atached. This is still giving me 0x20.

fedekrum,
The photo you supplied appears to show all 3 solder jumpers removed.
Are saying that when you solder across any of the A0, A1, A2 lines the address does not change?

Hi Bill,
Good on the pointers; I'll update those. (Did first 2)

Thanks! for taking the time to review that. There were 2700 hits on that page already in June and we need it to be.. Right!

fedekrum:
I have taken a picture. Find it atached. This is still giving me 0x20.

A quick look at the datasheet for the PCF8574 say...

Slave address pins A2, A1 and A0 are held HIGH or
LOW to choose one of eight slave addresses. To conserve power, no internal pull-up
resistors are incorporated on A2, A1 or A0, so they must be externally held HIGH or LOW.
The address pins (A2, A1, A0) can connect to VDD or VSS directly or through resistors.

So the solder bridges sink the address lines to ground by default (to get address 0x20) maybe what you need to do is find out what side of a bridge goes to GND and then solder a wire from the other side of the bridge to VCC to see if that changes the address.

maybe what you need to do ...

There doesn't seem to be any 'maybe' involved here. According to the material you quoted you must tie each address line either high or low and not leave any of them floating.

Don

fedekrum, Terry,
To help resolve the v3 addressing issue, can you take a close look at your v3 board and its traces
and determine what is hooked up to the address lines on the PCF8574.
i.e. what is hooked up PCF8574 pins 1,2, and 3.

I'm assuming that the 3 components to the right of the LED are resistors
and that they are being used as pull down resistors.
And that the solder jumpers are connections to VCC.

It should be easy to tell by closely looking at the board since these
boards are simple double sided boards assuming the board isn't already
soldered to the LCD.
Alternatively you could use an ohm meter.

FYI, the fist thing that I do when I get one of these low cost i2c boards in, is
create the schematic from looking at the board. This is crucial to know how to
fill in the constructor, how the i2c addressing jumpers and backlight jumpers
work.

--- bill

Hi Bill

As I read your post, its obvious to me that you know electronics a hundred thousend times more than me !! :wink:
Im just a programmer playing with a soldering tool. I will post tomorrow a high detail picture of both sides of the board and if you can and you want, tell me what to sold with what to get a diferent address.
thnx

I'm seeing something interesting with this board on a 4x20. A long line wraps around--not to the next line--but to the one following that (line n wraps around to line n+2). And aside from that, it seems to limit the number of characters displayed (from the string) to 63. Is that the way it's supposed to behave? Thanks.

insane:
Is that the way it's supposed to behave? Thanks.

http://web.alfredstate.edu/weimandn/lcd/lcd_addressing/lcd_addressing_index.html

I'm seeing something interesting with this board on a 4x20. A long line wraps around--not to the next line--but to the one following that (line n wraps around to line n+2).

Yes, as the link Bill points to explains, writing a long sequence of characters to a 4x20 display will have the characters fill the first line and continue on the third, due to the way the LCD internal addressing works. So this is "normal". You can see this effect with the http://ArduinoInfo.Info example sketches here: http://arduino-info.wikispaces.com/LCD-Blue-I2C

In normal use, you will point the cursor where you want before writing characters, like:

  lcd.setCursor(3,0); //Start at character 4 on line 0
  lcd.print("Hello, world!");

so no real problem...

The big takeaway from this is that hd44780 displays do not perform line wrapping
like a terminal. The hd44780 interface does not understand control characters like
carriage return and new line.
Each time a character is sent to it, the memory address location advances
(or decrements if the text direction is right to left) and the memory is not
mapped sequentially across the lines of the display.

While a library can be written to handle control characters and perform line wrapping,
I've only ever seen 1 arduino hd44780 library do it.

--- bill

Hello,

i also have a LCM1602 IIC A0 A1 A2 from e..y and it works perfectly. But i can´t dim the backlight. When i set a Value between 1 - 255 nothing happend.

lcd.setBacklight(50);

The controller is using a PCF8574T. The only different what i used ist the 16x2 Display. Not the 20x4 (but also it works not with 20x4 LCD)

Whats going wrong? Or what to do?