Arduino Forum

Using Arduino => Displays => Topic started by: -Micky on Apr 23, 2013, 11:52 am

Title: Two I2C lcd displays did not work together
Post by: -Micky on Apr 23, 2013, 11:52 am
Two I2C lcd displays together did not work correct.

I try:

LiquidCrystal_I2C lcd2(0x20,16,2); 
LiquidCrystal_I2C lcd3(0x21,16,2);

In void setup:

lcd2.init();
lcd2.backlight();
lcd3.init();
lcd3.backlight();   

It works, but not long. The second display shows after some times wrong characters and some times later there are no more characters.


Micky
Title: Re: Two I2C lcd displays did not work together
Post by: Riva on Apr 23, 2013, 12:14 pm
Have/can you set the displays to have different I2C addresses? A link to the display would help.
Title: Re: Two I2C lcd displays did not work together
Post by: -Micky on Apr 23, 2013, 01:04 pm
Yes, they have different addresses. I test this with a I2C scanner.


Micky
Title: Re: Two I2C lcd displays did not work together
Post by: floresta on Apr 23, 2013, 03:26 pm
Quote
It works, but not long. The second display shows after some times wrong characters and some times later there are no more characters.

Swap the two displays (by physically changing the jumpers or switches that set the addresses) and then see if the problem stays with the display or the address, or if something else happens.

Don
Title: Re: Two I2C lcd displays did not work together
Post by: bperrybap on Apr 23, 2013, 06:46 pm
What value terminator resistors are you using?

If you use each one separately do they each work ok?

--- bill
Title: Re: Two I2C lcd displays did not work together
Post by: -Micky on Apr 23, 2013, 07:03 pm
Ok, I swap the physically addresses. Now I have on both displays the same.


Micky
Title: Re: Two I2C lcd displays did not work together
Post by: Grumpy_Mike on Apr 23, 2013, 07:09 pm

Ok, I swap the physically addresses. Now I have on both displays the same.

So that suggests you did not change the address on one display.
You still haven't answered the question about pull up resistors.
Title: Re: Two I2C lcd displays did not work together
Post by: -Micky on Apr 23, 2013, 07:10 pm

What value terminator resistors are you using?

If you use each one separately do they each work ok?

--- bill
I use two resistors each has 10 K. I tried 4,7 K but without success. I2C scanner did not find any addresses. 32,4 K works but, there are only errors on the displays.

Yes, I tried every display separatly.


Micky
Title: Re: Two I2C lcd displays did not work together
Post by: -Micky on Apr 23, 2013, 07:42 pm
After changing the numbers in the sketch I have the same as before but now on the other display.


Micky
Title: Re: Two I2C lcd displays did not work together
Post by: Grumpy_Mike on Apr 23, 2013, 10:12 pm

After changing the numbers in the sketch I have the same as before but now on the other display.

So that suggests it is you code that is wrong, you need to post it all using the correct code tags. If you don't know how to do this the the how to use this forum sticky post.
Title: Re: Two I2C lcd displays did not work together
Post by: -Micky on Apr 23, 2013, 11:01 pm


After changing the numbers in the sketch I have the same as before but now on the other display.

So that suggests it is you code that is wrong, you need to post it all using the correct code tags. If you don't know how to do this the the how to use this forum sticky post.
Ok, I think the code must be ok, because with a single Lcd it runs.


Micky

Title: Re: Two I2C lcd displays did not work together
Post by: floresta on Apr 23, 2013, 11:45 pm
We don't know for sure which specific display you are using since you haven't provided that information so a lot of what we are providing is speculation.

It is time for you to start over again with a simple circuit and sketch that just uses one LCD.  If that works OK with each LCD then change the sketch to use both LCDs
simultaneously.

I would add the other I2C device(s) on next and then the 1-wire device(s).  When things stop working you should have a pretty good idea of what caused the problem.

Don

Title: Re: Two I2C lcd displays did not work together
Post by: -Micky on Apr 24, 2013, 02:50 am

We don't know for sure which specific display you are using since you haven't provided that information so a lot of what we are providing is speculation.

It is time for you to start over again with a simple circuit and sketch that just uses one LCD.  If that works OK with each LCD then change the sketch to use both LCDs
simultaneously.

I would add the other I2C device(s) on next and then the 1-wire device(s).  When things stop working you should have a pretty good idea of what caused the problem.

Don


I use 16x2 LCD Displays of different brands. One is called: TC1602A. The other1602 QAPASS. And serial I2C IIC adapter called LCM1602 IIC.


Micky
Title: Re: Two I2C lcd displays did not work together
Post by: -Micky on Apr 24, 2013, 03:03 pm
I think the reason is the I2C interface. It seems that only one address is possible. 0x20. I will make some changes to the interface and see what happens.


Micky
Title: Re: Two I2C lcd displays did not work together
Post by: floresta on Apr 24, 2013, 03:22 pm
Quote
I think the reason is the I2C interface. It seems that only one address is possible. 0x20. I will make some changes to the interface and see what happens.


What about your response in reply #2 "Yes, they have different addresses. I test this with a I2C scanner." ?

Have you dealt with any of the jumpers (solder blobs) on either of your Serial interface boards?

Have you considered the recommendations in reply #11?

Don
Title: Re: Two I2C lcd displays did not work together
Post by: -Micky on Apr 24, 2013, 04:34 pm

Quote
I think the reason is the I2C interface. It seems that only one address is possible. 0x20. I will make some changes to the interface and see what happens.


What about your response in reply #2 "Yes, they have different addresses. I test this with a I2C scanner." ?

Have you dealt with any of the jumpers (solder blobs) on either of your Serial interface boards?

Have you considered the recommendations in reply #11?

Don
1. Solder blobs all closes is 0x20. Open, one, two or three is 0x21. Which blob is open doesn't matter. BUT: This happend only when I use both I2C interfaces.
2. If I use only one interface then all blobs gives 0x20. Setting or not setting the blobs does not matter too.
3. I think I try some modification with the interfaces because it has no stable address.


Micky  
Title: Re: Two I2C lcd displays did not work together
Post by: floresta on Apr 24, 2013, 05:03 pm
Quote
1. Solder blobs all closes is 0x20. Open, one, two or three is 0x21. Which blob is open doesn't matter. BUT: This happend only when I use both I2C interfaces.
2. If I use only one interface then all blobs gives 0x20. Setting or not setting the blobs does not matter too.
3. I think I try some modification with the interfaces because it has no stable address.

It appears that you are not getting all of the solder removed so you are not effectively changing the address.

You really should go back to reply #11 and make sure that you can get each device functioning alone but with a different address for each.  Until you get that working you are probably wasting everyone's time.

Don
Title: Re: Two I2C lcd displays did not work together
Post by: -Micky on Apr 25, 2013, 11:48 pm
Ok, now I can use addresses from 0x20 to 0x27. I made some modifications on the pcb. First pic shows the original I2C interface and the second one my modifications. Without my modification there is only one address possible: 0x20.


Micky