LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I2C FTCI2C problem

Hi guys,

 

This is my bachelor final project. I need to communicate with 3 sensors. I'm using FT2232H USB to I2C converter.

And trying to launch everything with FTDI example I2C code.

 

As i looked at osciloscope i can see that FTDI sends SCL and SDA correctly and slave address seems to be correct as 

it is in sensor TSL2561 datasheet (ADDR Sel is floating). And I can't get ACK from sensor. It is not responding. 

I checked it on my friends Cypress board it seems to work, but we can't get even part ID code.

 

So maybe I dont understand this code or something. If you have even worked with connecting to sensors or eeprom with this ftdi board

would be nice to hear some helpful tips. 

 

Thanks

Karolis

0 Kudos
Message 1 of 20
(6,408 Views)

Hi Karolis,

 

Which specific LabVIEW VI from the driver page are you using to test?

 

Do you get a LabVIEW error when running this code? Have you been able to find the specific place the code isn't working correctly for you? Screenshots are helpful.

 

Are you sure that you have the correct version of the DLL paired with it - it doesn't look like the 2.0.x DLL is necessarily supported for the LabVIEW example driver at that link you sent me.

Joey S.
Senior Product Manager, Software
National Instruments
0 Kudos
Message 2 of 20
(6,374 Views)

Thanks for your fast response Joey,

I'm using LabVIEW 2011 and I'm not using any of these drivers. I'm just checking on scope, which can detect I2C communication.

When i'm running this code i'm not getting any errors. On Scole i just see write and read address binary codes, but sub address

I can not see anywhere. I'm tried almost all of the writing spots on the user interface to write, but there wasn't any changes.

In this screenshot below is example parameters addresses of eeprom. I can get Read/Write codes, but if I'm writing to go to specific

register i got zero respond just repeating same call for R/W.

About DLL file I'm using the old one. 

Maybe You can help me at this point? 

example_code_2.jpg

0 Kudos
Message 3 of 20
(6,366 Views)

Sorry, uploading screenshot again, bevause there wass too small resolution.

And example code i haven't changed, just deleted one part where one of FTDI output GPIO pin

was set high for Write Protection.

0 Kudos
Message 4 of 20
(6,364 Views)

Karolis,

 

When I search on our website (www.ni.com/idnet) for supported drivers, I do not see any NI supported drivers from this company or device. 

 

The screenshot of code looks like the example VI from the LabVIEW driver on the linked page. So I don't understand what you mean when you say that "I'm not using any of these drivers".

 

Also, it sounds like your device is working correctly, but your syntax may not be correct. I would recommend contacting the manufacturer or seeing if there is anyone in your lab who has more experience related to this.

 

Good luck!

Joey S.
Senior Product Manager, Software
National Instruments
0 Kudos
Message 5 of 20
(6,338 Views)

Older FTCI2C.dll  WARNING TIMING ISSUE
Violates Data Hold spec after Clock falling edge. Fails with some devices, but not others that have designed in hold times.

 

Notice: FTDI recommends using the newer MPSSE dll.

0 Kudos
Message 6 of 20
(5,963 Views)

For the I2C driver, follow this link:

https://lavag.org/files/file/282-mpssedll-labview-driver/

🙂

Message 7 of 20
(5,729 Views)

Is that the 64 bit version?

I had given up on FTDI. Their 64 bit beta version worked until our company got security anal. No support help offered, just a tough luck Chuck attiitude.

So, now we use NI USB-8452. Costly, but oh so much faster, and reliable.

0 Kudos
Message 8 of 20
(5,713 Views)

You can use the same VI that i have created, but download the 64 bit version of theire dll. the 64 bit version has the same name.

 

Benoit

0 Kudos
Message 9 of 20
(5,701 Views)

Hi.

 

I tried your program and it recognises that the ftdi cabkle is connected but cannot find the device.

 

libMPSSE.lvlib:Error Converter (ErrCode or Status).vi<ERR>
FT_DEVICE_NOT_FOUND


<b>Complete call chain:</b>
libMPSSE.lvlib:Error Converter (ErrCode or Status).vi
libMPSSE.lvlib:I2C Device Write.vi
test.vi

 

The i2C address is 28 hex, any ideas why it is not recognising the device?

 

 

0 Kudos
Message 10 of 20
(5,540 Views)