ECIO 40Pin+I2C LCD

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
sungchinghuang
Posts: 6
Joined: Mon Dec 10, 2018 9:28 am
Has thanked: 5 times
Contact:

ECIO 40Pin+I2C LCD

Post by sungchinghuang »

I tried working with it.
In flowcode 8,I can see the correct effect with the simulation function.
But it is not working on my ECIO circuits.
If anybody can tell to me why, I will be very grateful.
LCD Timer.fcfx
(8.18 KiB) Downloaded 245 times
LCD Timer.jpg
LCD Timer.jpg (165.12 KiB) Viewed 5717 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: ECIO 40Pin+I2C LCD

Post by medelec35 »

Have you got the datasheet for the I2C LCD?
We need to check the address is correct.
Where did you get the address of 127 from?
I have seen an address set to 0x27 = 39 for a I2C LCD.
It may not be correct for your one, but worth a try?
Can you try 39 for the address?
Alternatively you could adapt this I2c Sniffer for your set up?
It also maybe worth measuring both clock and data voltages with no clock or data pulses present to make sure there are pull-up resistors pulling up to 5V
Martin

sungchinghuang
Posts: 6
Joined: Mon Dec 10, 2018 9:28 am
Has thanked: 5 times
Contact:

Re: ECIO 40Pin+I2C LCD

Post by sungchinghuang »

After I uploaded it with address 39, my I2C LCD still didn't working.
In Flowcode8,how can I use I2C Address Sniffer?

Thanks.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: ECIO 40Pin+I2C LCD

Post by medelec35 »

Hi sungchinghuang,
Can you please answer questions from my previous post:
medelec35 wrote:Have you got the datasheet for the I2C LCD?
We need to check the address is correct.
Where did you get the address of 127 from?
medelec35 wrote:It also maybe worth measuring both clock and data voltages with no clock or data pulses present to make sure there are pull-up resistors pulling up to 5V
Are the pull-ups on the hardware, or do you have to add your own?
Finally, what connections of LCD go to what connections of ECIO?

I will also create the sniffer for ECIO
Martin

sungchinghuang
Posts: 6
Joined: Mon Dec 10, 2018 9:28 am
Has thanked: 5 times
Contact:

Re: ECIO 40Pin+I2C LCD

Post by sungchinghuang »

I don't have the I2C LCD's datasheet.I originally used address 39. I found that when ECIO was not working, I started searching for information on the Internet. Some users used address 63 and address 124 and address 127, etc. I tried it, but it still didn't work. I have also used Arduino to control this LCD. I used 0x27 in Arduino and it is usable.
I also tried to add a resistor on both the SDA and SCL lines, and wanted to make a pull-up function, but the LCD is still not working.
This program only has ECIO and LCD, and is not connected to other hardware.

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: ECIO 40Pin+I2C LCD

Post by QMESAR »

sungchinghuang wrote:I don't have the I2C LCD's datasheet.I originally used address 39. I found that when ECIO was not working, I started searching for information on the Internet. Some users used address 63 and address 124 and address 127, etc. I tried it, but it still didn't work. I have also used Arduino to control this LCD. I used 0x27 in Arduino and it is usable.
I also tried to add a resistor on both the SDA and SCL lines, and wanted to make a pull-up function, but the LCD is still not working.
This program only has ECIO and LCD, and is not connected to other hardware.
I always find these type of post very interesting.
If you have no datasheet and have no idea what the correct address should be ,then it makes it most important to use some tools to log and varify what your code and hardware is sending to the LCD.
Why don't you use a logic analyser which is standard equipment to test and design Communication protocols as I2C instead of just saying the ECIO is not working.if you have a problem you have to localize it down to a Component error/ HW error or code error,
As Martin advised you before use a I2C sniffer (analyser) to monitor what you are doing
:D

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ECIO 40Pin+I2C LCD

Post by Benj »

Hello,
I used 0x27 in Arduino and it is usable.
Arduino uses the 7-bit address without a bit shift.

Flowcode requires a 8-bit value wich is a combination of the 7-bit I2C address and a single read/write bit.

So in Flowcode try 0x27 x 2 = 0x4E or 78 in decimal.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: ECIO 40Pin+I2C LCD

Post by medelec35 »

Hi sungchinghuang,
Sorry for the delay, I was waiting for a ECIO40P to arrive.
Now it has, I can confirm the attached flowchart correctly reads addresses of All I2C components.
I believe you will need Comms C pack installed for this to work.
If you don't have comms C pack then let me know.
What you need is a serial terminal program like HyperTerminal or Tera Term (free open source)
Before you connect the power to ECIO40P, open device manager and select Ports (Com & LPT) to expand it.
Connect the USB lead into ECIO40P and see what USB com port is assigned to it.
For example with my set up:
USB serial1.png
(37.72 KiB) Downloaded 2246 times
For my setup if using Tera Term I just need set serial port to com 7 (Set up, Serial port...)
Once serial port is assigned in serial comms software, Remove and reconnect power, then you should see the I2c addresses appear.
If not you will have an hardware issue.
If you get stuck I can assist you further.
Attachments
IC2 Address Sniffer ECIO40 USB.fcfx
(19.34 KiB) Downloaded 206 times
Martin

sungchinghuang
Posts: 6
Joined: Mon Dec 10, 2018 9:28 am
Has thanked: 5 times
Contact:

Re: ECIO 40Pin+I2C LCD

Post by sungchinghuang »

Hi,medelec35
I am sorry that I replied so late.I have used the IC2 Address Sniffer ECIO40 USB.fcfx to find the I2C LCD Address.
Tera.jpg
Tera.jpg (74.83 KiB) Viewed 5453 times
But I always get different address by the same hardware.
Sniffer1.jpg
Sniffer1.jpg (55.04 KiB) Viewed 5453 times
Sniffer2.jpg
Sniffer2.jpg (62.27 KiB) Viewed 5453 times
Of course, my LCD still can't display, my God, it's really difficult.


Thank you very much for the help of the matrix company, I am very grateful.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: ECIO 40Pin+I2C LCD

Post by medelec35 »

I don't know why all the other addresses appear?
Assuming you have a LCD as only connected I2C device?

As a guess, can you try E0?

I will try mine again to confirm its working ok.

Can you see a part number for the I2C chip?
Martin

sungchinghuang
Posts: 6
Joined: Mon Dec 10, 2018 9:28 am
Has thanked: 5 times
Contact:

Re: ECIO 40Pin+I2C LCD

Post by sungchinghuang »

Sorry, I don't know how to use E0. In flowcode, SDA and SCL are B0 and B1.

I put my I2C here.
I2C.jpg
I2C.jpg (84.85 KiB) Viewed 5436 times
I2C-1.jpg
I2C-1.jpg (64.69 KiB) Viewed 5435 times
As the relevant address did not appear, If 0x4E does not work,
I would look more closely at your hardware and connections to ECIO40P

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: ECIO 40Pin+I2C LCD

Post by medelec35 »

Found your datasheet here
So 0x27 is correct without bit shift.
So what Ben suggested as 0x4E is what I would use as well.
To try 0x4E just enter 0x4E in the Address Field of the LED properties.
Martin

Post Reply