05-22-2010 07:32 AM
Hy everybody,
For a bachelor's project, I've to communicate with I2C protocol beetween a FT2232H mini module and a digital accelerometer. I decided to do this with Labview, but with help of exemple given by FTDI http://www.ftdichip.com/Projects/MPSSE/FTCI2C.htm but I don't know wich functions a need just to read a register of my accelerometer. I tried just to use the "Exemple.Vi" without using the "Write.vi" function but the communication doesn't work at all.
Does anybody know how to do it?
Thank you very much,
JB
05-25-2010 05:01 AM
Hello JB,
thank you for posting at the National Instruments Forum. I would like to clarify your setup:
Your computer is connected to the FTDI-Chip using USB, the Windows Driver for the USB-Device is provided by FTDI. The onboard I²C implementation allows to communicate to I²C devices using FTDI technology.
FTDI provides a separate library (FTCI2C.DLL), which enables you to communicate with your application using USB. This DLL can be used by a variety of programming languages like Visual Basic .NET, Visual C++ and so on.
Have you successfully tried the provided examples from FTDI for these languages to communicate with your application?
LabVIEW offers the possibility, to access external DLLs. As soon as you are familiar with the handling of the DLL, you may use the "" function in LabVIEW to use the DLL.
More information about using DLLs in LabVIEW can be found in the LabVIEW help (Fundamentals » Calling Code Written in Text-Based Programming Languages » Concepts » Importing Shared Libraries) and here:
How Do I Call a Dynamic Link Library (DLL) from LabVIEW?
http://digital.ni.com/public.nsf/allkb/DCB90714981A1F148625731E00797C33
The details for your application (commands, sequences etc.) may be obained from the manufacturer of the accelerometer.
Best regards
05-25-2010 05:41 AM
05-28-2010 02:10 AM