How to use : I2C LCD display " EA T123W-I2C " with ARDUINO MICRO

Hello,

I'm trying to do my LCD display working with an Arduino MICRO but something goes wrong..

This lcd display is working by I2C and I was trying to make it work by using the "LiquidCrystal_I2C.h" library. (https://arduino-info.wikispaces.com/LCD-Blue-I2C)

So , after connecting the LCD with the right pin's, I runned an I2C scan to find the correct adress. It found "0x3A".

I decided to use this code but nothing appears:

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

LiquidCrystal_I2C lcd(0x3A); // Set the LCD I2C address

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

lcd.begin(12,3); // initialize the lcd for 12 chars 3 lines

}/--(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
delay(100);
// clear the screen
lcd.clear();
// read all the available characters
while (Serial.available() > 0) {
// display each character to the LCD
lcd.write(Serial.read());
}
}
}

}

If needed , here is the datasheet of my LCD : http://www.distrelec.ch/Web/Downloads/3w/_e/egELECTRONIC_ASSEMBLY_Display-EA-T123W_E.pdf?mime=application%2Fpdf

The datasheet tells you where your problem lies:
PCF 2116-C on board (compatible to OPTREX ...)

The lcd libraries which are normally used with Arduino are based on another controller chip:
Philips HD44780

If you can find an Arduino library which is based on a PCF 2116-C you will be fine.
If not, you have to study the PCF 2116-C controller chip, how it has to be wired and what protocol/telegram it expects from your Arduino - in other words: you might have to write your own library.

Here is a link to an earlier discussion about the same issue; maybe you find it helpful (it's in your/my native language):
http://forum.arduino.cc/index.php?topic=422311.0

If you succeed, it would be nice if you could give us a feedback, how you got it to work. As I don't have such a display, I am not in the position to test the approaches.

One addition to my previous post:
If it is true that the PCF 2116-C is command-compatible to the HD44780, try another I2C address: 0x74.

Reason: I found sources where it was stated that 0x74 is the correct address - although the I2C scanner identified another address -> not logical, but give it a try, doesn't cost anything :slight_smile:

First, thanks for your answer :slight_smile:

Then I tried again with the 0x74 adress but it still doesn't work.

Keeping searching and reading the old post you spoke about I found that a library called "TextLCD" is existing.

Is this library available on Arduino IE ?

But with the adress 0x3A , we can saw that the bus is work. Here is the first

frame

we can saw : 1 0111 0100 1 0

7 4

Is this library available on Arduino IE ?

I don't know, but I think there isn't one as far as I know.

Ok, then go ahead with 0x3A, which seems to be the right I2C address. My tipp was just based on Conrad Electronics, who are selling these devices and I read, that their address was 0x74.

Guys, LCDs the way you control an LCD that uses a PCF8574 vs PCF2116 is completely different.

My hd44780 library includes io classes for both.
The hd44780 library is available in the Arduino library manager for immediate installation.
You can read more about my hd44780 library here:

You will want to use the hd44780_I2Clcd class.
See the examples down under ioClass/hd4480_I2Clcd

Due to the way the LCD works, you will not have backlight control and the backlight will be on all the time.
Also, the hd44780_I2Clcd i/o class does not currently have automatic i2c address detection so you will have to enter the correct address for your lcd in to the library constructor. However, the supplied examples all use a default address of 0x3A which appears to match your display so the examples should "just work" with your display.

--- bill

Thanks guys for your answers !!

I've tried your library and it appears to work no (At least we can communicate with the I2C, I can join some oscillogramme of the frame)

I understand why 74 was the adresse , in fact the adress is on 7 bits so if you read it on 8bits it's 0x74 :slight_smile:

Now my probleme is apparently with the vlcd-vo pin and configuration , maybe can you help me a bit cause I still can't read anything on my LCD display ...

Is there , in the library, somthing working like a PWM(a clearscreen or something) making the brightness down ?

And is there any posibilities to change the value of the voltage generator of the lcd "function set" in the i2c frame?

oro1505:
I've tried your library and it appears to work no (At least we can communicate with the I2C, I can join some oscillogramme of the frame)

What does that mean? I do not understand.

I understand why 74 was the adresse , in fact the adress is on 7 bits so if you read it on 8bits it's 0x74 :slight_smile:

Yes. I2C really uses 8 bits for the address, but the lower bit is used for read/write control and so most devices quote the address as a 7 bit address with the real 8 bit address shifted to the right.

I made a mistake in what I told you before. The default address in the hd44780_I2Clcd examples is 0x3e so in order for you to use them you will have to modify the i2c address to be 0x3a.

Now my probleme is apparently with the vlcd-vo pin and configuration , maybe can you help me a bit cause I still can't read anything on my LCD display ...

That display needs more than just the four i2c pins (voltage, gnd, SDA, SCL) to work.
You must hook up some external circuitry for the contrast circuit.
The display module I have is different but still requires an external pot to adjust the contrast.

For your display see pages 11 and 12 of the datasheet you provided.
If you look at pages 11 and 12, you see the signals VLCD and VO.
Typically VO is used as an input signal to control the contrast.
The pinout on page 12 calls pin VLCD as "Contrast Adjust" and pin VO as "Power for Contrast".
Those descriptions may be incorrect. But I'm not familiar with that LCD.

If you look at page 11, there are two diagrams.
In the left diagram the positive voltage being given to Vo is varying when the pot is turned.
In the right diagram the voltage given to VO is fixed while the negative voltage going to VLCD is varying.

I'm not familiar with this LCD but the PCF2116 datasheet shows an example contrast circuit like the left diagram. i.e. using a single power supply, which is easier to hook up and does not require a separate power supply.
I would recommend trying that as it is easy to hook up and only requires a pot and couple of caps.
You LCD module might already have the cap between VDD and ground.

oro1505:
Is there , in the library, somthing working like a PWM(a clearscreen or something) making the brightness down ?

And is there any posibilities to change the value of the voltage generator of the lcd "function set" in the i2c frame?

There is no way to control the backlight brightness from the I2C master.
I2C is used to transport hd44780 signals/messages which do not include any sort of backlight or contrast control.

So in terms of backlight brightness control, it can be done using current limiting resistors to set a fixed backlight brightness.
If your module only uses 6 pins as shown on page 12 of the datasheet, then it will require modifying the actual lcd module PCB to alter the current limiting resistor.
You would have to locate the current limiting resistor and replace it with a larger one.
This will likely be a surface mount part.

If that module has separate pins for the backlight anode and cathode then you can insert an additional current limiting resistor.
(my lcd module has 8 pins on the header and provides the two pins for the backlight anode and cathode)

If you have anode and cathode pins, the lcd module may or may not already have a current limiting resistor.
This is something that is critical to resolve since if it doesn't have one, and you hooked the the backlight directly to VCC, the backlight LEDs will be quickly burned out.
If it does have a built in current limiting resistor, the value may be a value to allow the maximum brightness which my be very bright but you can insert an additional led to reduce the current to reduce the brightness.

They don't give you all the needed information to calculate the minimum resistor but if you go by the last line in the table on page 13, of 90ma at 4.1v then you would get close to 60 ohms at 5v for a safe minimum value. (you could figure out the additional information to properly calculate it but it requires using the board and a volt meter)
But often times the maximum brightness is very bright. So you probably will want half or even a quarter of that so 150 to 200ohm would probably be good.
I'd be tempted to get some 100 ohm and 50 ohm resistors and try 100, 150, 200, 250, etc.. until you get a brightness you like.

I have some other 4x20 LCDS that use about 40ma for the backlight which is 1/10 of what this datasheet shows for the maximum brightness.
So you may need quite a bit of additional resistance to lower the brightness down to where you like.

--- bill

Hi again , dear Bill!

I wanna thank you once more to dedicate so much time to give me some great answers !

"I've tried your library and it appears to work no (At least we can communicate with the I2C, I can join some oscillogramme of the frame)"

What does that mean? I do not understand.

I've tried to said that the I2C is working now and that I could join some printscreen provided by an oscillosscope ; There it is:

This frame is the one send by the Arduino with this following code :

I've wire the VO-VLCD Pin's like the scheme in the datasheet ( with single power supply and a 100k pot) but nothing appear on the screen as you can see :

The weirdest thing is that when I disconnect the Vlcd pin (form the condensator), a little something appear like that :

That proves me the wire is working but that something else (mby in the code ) made nothing apear on the screen...

I hope you can understand my poor english speaking and I'm waiting for some good news :wink:

Sincerly ,Robin!

The pictures didn't show up. Can you try to attach them or post some links to a photo/picture web site?

Yhea indeed, it was my mistake. Now it appear to be ok , thanks for your patience :wink:

In your library, is there a way to change the voltage generator bit? (Wich is set in the fonction byte )

I assuming you mean the G bit?
In looking closer at the "function set" command on that display, it is slightly different from the standard hd44780 function set.

The datasheet only mentions the N, M, G bits on pages 3, 5 and 11.
Their use is not clear. Do you have some additional information on what these bits really do?

Currently, begin() call lets you pass in a 3rd parameter called "dotsize".
The current hd44780 code was modeled after the existing LiquidCrystal API call and so the dotsize parameter is only used on 1 line displays and sets the hd44780 F bit (bit 2) which is the M bit on this display but only if the number of lines is 1.

So as of right now there is no way to set G, and M can only be set if the number of lines/rows is 1.
This will be changed in the next release of the library to allow setting these bits at begin() time regardless of the number of lines (there are other displays can use the capability as well).

It can still be done, but you will have to send a raw hd44780 command to do.
You can use the command() function and send any 8 bit command byte pattern you want.
Just be careful that when you compose the function set command to make sure to set the DL bit (bit 4) so that the chip stays in 8 bit mode.

--- bill