Page 1 of 1

Bug on I2C lCD

Posted: Fri May 03, 2019 10:25 am
by ylanchec
Hi,
I have open an existing working project from FC7 to FC8.
But now the I2C LCD does not works.
The LCD is a DFRobot (with PCF8574) and the card is a MEGA.
sch.png
(39.7 KiB) Downloaded 1475 times
I have compare the i2c dialog on both cases :
Good (on FC7) :
good_i2c.png
(114.08 KiB) Downloaded 1475 times
Bad (on FC8) :
bad_i2c.png
(115.69 KiB) Downloaded 1475 times
As you cas see there is a value added each time.
Best regards
Yannick

Re: Bug on I2C lCD

Posted: Sat May 04, 2019 8:12 pm
by Jan Lichtenbelt
Hi ylanchec

RW should always be at 0V (or GND). It is better to remove the conenction to P1 of the microchip.

Kind regards

Jan Lichtenbelt

Re: Bug on I2C lCD

Posted: Mon May 06, 2019 7:15 am
by ylanchec
Hi Jan,
Of course i can connect RW to GND in Proteus, but on the real card i can't modify this.
The bug seems to comes from the i2c dialog, there are too many bytes in the command. (the last byte)
Best regards
Yannick

Re: Bug on I2C lCD

Posted: Mon May 06, 2019 11:01 am
by Jan Lichtenbelt
Dear ylanchec

Show us the flowcode and perhaps someone can help you with the software

Kind regards

Jan

Re: Bug on I2C lCD

Posted: Tue May 07, 2019 3:07 pm
by ylanchec
Hi Jan,
You will find here a zip file including :
- 1 simple fc7 writing "hello" on a LCD I2C --> HEX file
- the same file renamed and opened with fc8 --> HEX file
- proteus 8.8 file with Arduino mega linked to fc7 hex --> WORKING
- proteus 8.8 file with Arduino mega linked to fc8 hex --> NOT WORKING
The problem is the i2c dialog... not good on lcd on fc8 !
Test_LCD_I2C_FC7_FC8.zip
(93.36 KiB) Downloaded 277 times
Best Regards
Yannick

Re: Bug on I2C lCD

Posted: Tue May 07, 2019 3:08 pm
by ylanchec
Software FC7 and FC8
logfc8.png
(124.84 KiB) Downloaded 1381 times
logfc7.png
(128.83 KiB) Downloaded 1381 times

Re: Bug on I2C lCD

Posted: Tue May 07, 2019 3:09 pm
by ylanchec
On proteus 8.8
fc7.png
(261.96 KiB) Downloaded 1381 times
fc8.png
(282 KiB) Downloaded 1381 times
On FC8 there is too many bytes in a dialog !

Re: Bug on I2C lCD

Posted: Tue May 07, 2019 3:15 pm
by ylanchec
Good :
fc72.png
(6.87 KiB) Downloaded 1381 times
Bad : a 0x00 is immediatly sent after the good value !
fc82.png
(13.56 KiB) Downloaded 1381 times
Best regards
Yannick

Re: Bug on I2C lCD

Posted: Tue May 07, 2019 4:05 pm
by Benj
Hi Yannick,

I've posted a new version of the v8 component to the update system now. It contains a new property to decide if the backlight is controlled via the main display communication. When set to "No" this should be identical to the v7 component.

Let us know how you get on.

Hopefully the problem is with Proteus and the v8 component would have worked fine with actual hardware. Can you confirm if you have tried on hardware or not and how you got on.

Re: Bug on I2C lCD

Posted: Tue May 07, 2019 6:18 pm
by ylanchec
Hi Benj,
Thank you for your quick response.
I have tested your new update and it's ok on proteus.
I'm going to test on a real LCD at job in few days. You means that the second sent byte is a problem only on proteus ?
On a classical I2C LCD the back light is connected to P3 of 8574.
How is connected the back light on yours ?
Thank you.
Yannick