Page 1 of 1
I2C LCD printing strings
Posted: Fri Feb 01, 2019 2:40 pm
by Thibault666
Hello everyone,
We are trying to print strings on a I2C LCD for a school project, we tried a lot of different ways to do this but it just won't work.
We are using a I2C LCD Display with a PCF8574T module. Could someone post a example code in Flowcode or help us in any other way.
"LCDAansturing2" is the program we used the last time..
Thanks
Re: I2C LCD printing strings
Posted: Sun Feb 03, 2019 11:23 am
by keejay
If you post your program here I can have a look at it as I've used those modules very successfully. Just check that you have the correct I2C address in the properties menu. I used 63 as the LCD address, Baud Select 400kHz.
Re: I2C LCD printing strings
Posted: Sun Feb 03, 2019 5:59 pm
by jgu1
Hi!
I have made a test with an Ariduino Mega. I used the default settings also with IC adress 32. Work perfect for me.
Br Jorgen.
Re: I2C LCD printing strings
Posted: Sun Feb 03, 2019 6:53 pm
by Thibault666
Hi @jgu1,
Nice, I find it so frustrating because it shouldn't be that hard..
@keejay
I will post it here tomorrow because I don't have it on my computer..
The weird thing is that we're able to put the backlight on/off, but we can't do anything else..
I can't update my Flowcode for some reason, that's why I can't use the macros we are using in school.
We are using a PIC16F887 as Master and the LCDs address should be 0x27 but we will try to use 63 tomorrow.
Re: I2C LCD printing strings
Posted: Sun Feb 03, 2019 7:09 pm
by Thibault666
I just found out that the address we are using is 0x4E, and that this is the right address.. So the address is not the problem.
Re: I2C LCD printing strings
Posted: Mon Feb 04, 2019 7:41 am
by keejay
It often gets suggested on this forum to included a 1 second LED flasher in your flowcode to make sure that your basic program, config bits and timing are all correct. Then one can have a look at things like hardware connections and components properties. That's about all I can suggest without seeing your program.
Re: I2C LCD printing strings
Posted: Mon Feb 04, 2019 11:15 am
by Benj
Hello,
I don't believe that expander IC is currently supported. Do you have an example library that shows how the driver is used as that should help us to build a new LCD component for you.
Re: I2C LCD printing strings
Posted: Mon Feb 04, 2019 5:14 pm
by Thibault666
Dear Benj,
In the latest update there is a new LCD Component that supports this expander but it didn’t work for us.. We are now trying to get it working with our first method we tried by just doing it without the LCD component,( slave address(0x4E), register select ‘0’, the instruction and a stop). With the LCD component we are only able to turn the backlight ON/OFF. I will upload that program when I get home!
Re: I2C LCD printing strings
Posted: Mon Feb 04, 2019 8:21 pm
by Thibault666
Here is the program that I'm going to test tomorrow. I will let you guys know what it did or what it didn't..
Re: I2C LCD printing strings
Posted: Mon Feb 04, 2019 9:28 pm
by keejay
I've posted a FC that I quickly tested on actual hardware and works fine. I've always added a small delay before and after initializing a display to allow it to settle down before using it. I only do that once at the beginning of the program. Hope this helps...
Re: I2C LCD printing strings
Posted: Mon Feb 04, 2019 9:39 pm
by jgu1
Hi!
Why doesn´t you use the I2C component, maybe I have misunderstanding something? If I have forget this please.
I have made a modification in your program, You could give it a go, it is the same test I made with my Arduino Mega and it work.
If it is these module you use:
https://www.ebay.co.uk/itm/IIC-I2C-TWI- ... 3059022354
remember to solder the pad A0 A1 A2 and check the connection.
Br Jorgen
Re: I2C LCD printing strings
Posted: Tue Feb 05, 2019 7:39 am
by keejay
Hi Jorgen,
It looks like you've added the I2C master component, but don't use it in the program, so its actually redundant. You can delete it and the program will still work exactly the same. I think the LCD I2C component has the built in I2C functionality without the need to make use of the I2C master component.
This is the module that I use:
WINGONEER 5PCS IIC I2C TWI SPI Serial Interface Board Module Port for Arduino LCD1602 Display
https://www.amazon.com/dp/B06XHGYYWB/re ... wCb1Y8XTTM
Re: I2C LCD printing strings
Posted: Tue Feb 05, 2019 12:45 pm
by Thibault666
Hi guys,
Not one of the programs is working for us.. Maybe we used a wrong schematic, we used a PIC16F887, 10kOhm pull up resistors, PICkit2 and we are using the same module as you guys..
Re: I2C LCD printing strings
Posted: Tue Feb 05, 2019 1:27 pm
by Thibault666
Hi Jorgen,
We didn't solder the pad is this really necessary? Isn't the default address 0x4E if we didn't solder the pad?
And what microcontroller and other components are you guys using because our LCD is still not doing anything.

Re: I2C LCD printing strings
Posted: Tue Feb 05, 2019 4:29 pm
by jgu1
Hi.
For me, when i use these module with the display, it is nessesary to solder them, otherwise it doesn`t work for me.
Br. Jorgen
Re: I2C LCD printing strings
Posted: Wed Feb 06, 2019 8:07 am
by keejay
With NO jumper on A0, A1 , A2 the address is x3F (or 63 decimal) - this works 100% for me.
Re: I2C LCD printing strings
Posted: Wed Feb 06, 2019 12:23 pm
by theopieleke
The basic adresses of this expander are found here. And for the record, it does work with the LCD I2C (LCM1602) component that you can find in Flowcode 8.
If there are no bridges on the expander board, then the adress lines A0 to A2 are high. In my case this meant that the standard adres is 0x3F (63 decimal).
I'll post an image here of the 'differences' in expanders. (PCF874T or PCF8574AT, where I use the last one)
Re: I2C LCD printing strings
Posted: Sat Feb 29, 2020 11:17 am
by abcde
Hey
Can anyone help?
The LED flashes three times. I can't get the i2C display to work with the 18F4455.
I put the hex file in the microcontroller with a pickit2.
Thanks in advance
Re: I2C LCD printing strings
Posted: Sat Feb 29, 2020 3:05 pm
by QMESAR
Hi,
You schematic shows a 20Mhz clock your SW is setup for 48Mhz ,and the configuration looks suspicions to me
if this is the actual state of your project 20Mhz clock the LCD will never work as the baud rates are incorrect

- p2.jpg (23.46 KiB) Viewed 10651 times

- p1.jpg (36.58 KiB) Viewed 10651 times
Re: I2C LCD printing strings
Posted: Sun Mar 01, 2020 9:16 am
by jgu1
Hi abcde!
First of course what Qmsar said, the config have to be correct, otherwise it won´t work
Always when I use the I2C Backpack display, I solder the pad A0 + A1 + A2 and adjust the contrast. And I always have succes with this.
Br jorgen.
Re: I2C LCD printing strings
Posted: Sun Mar 01, 2020 10:45 am
by abcde
thanks for your response.
If I change in flow code 48MHZ to 20 MHZ then the LED flashes too fast and the display still does not work.
If I use 48 MHz de led flashes correct.
Indeed I think the error is in entering the "project options"
But I can't find the error.
Re: I2C LCD printing strings
Posted: Sun Mar 01, 2020 5:22 pm
by jgu1
Have you solder the A0 A1 A2 jumper on the I2C board?
Jorgen.
Re: I2C LCD printing strings
Posted: Sun Mar 01, 2020 6:22 pm
by abcde
163/5000
When I use the i2c board with an arduino, I don't solder the jumpers either and then the board will work.
That's why I don't think the problem lies with the board.
I suspect the problem lies with the microcontroller setting.