02-17-2023 06:56 PM
Hello LabVIEW Community,
I'm working on code to perform I2C writes via the FT260 USB HID-to-I2C bridge device. I'm using the LibFT260.dll provided by FT. My hardware for initial development is the UMFT260EV1A eval board.
When I attempt to execute an I2C write I see no traffic on the I2C bus, which I'm probing with an o'scope.
I'm following the sequence outlined by example code from FT to initialize the I2C interface and attempt a write:
1. Discover and open HID interfaces using FT260_OpenByVidPid function.
2. Reset the I2C Master using FT260_I2CMaster_Reset function.
3. Initialize the I2C Master with 100kHz clock using FT260_I2CMaster_Init function.
4. Write to slave address 56 using FT260_I2CMaster_Write function.
5. Close the HID interfaces.
Things I have verified:
The facts above lead me to believe something about my usage of the DLL, specifically the I2C functions, is not quite correct. I just cant figure out what it is.
I have attached my code, along with the DLL. Drill down in I2C 64bit Troubleshooter.vi for the sequence outlined above. Can you see any errors in what I have so far? Where could I be going wrong?
Thank you,
Aaron
Solved! Go to Solution.
02-20-2023 06:06 PM
I resolved my issues. I incorrectly defined the enumeration values for FT260_I2C_FLAG. In the FT260Lib .h file, the enums go 0, 2, 3, 4, 6:
I went 0, 1, 2, 3, 4. So when I intended to send a Start and Stop condition (0x06), I was telling it to send a stop condition (0x04) which apparently appeared as no traffic on the bus. Oops.
Anyway, maybe this info will help someone in the future.
03-15-2023 04:42 PM
can you give me you library LibFT260.lib with the functions i am working with the same board UMFT260EV1A
i have a question did you manage how to get all the different code error from the ftdi in a separated vi ?
01-28-2024 08:23 PM
good lucky! execuse me, could you share here the your source vi code of LabVIEW 2017 32bit?