LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FTDI drivers usage in Labview

Solved!
Go to solution

Note that this was because you use LabVIEW 2020 64-bit with the 64-bit DLL from FTDI. If you had used 32-bit LabVIEW and the 32-bit DLL the old configuration should have still worked. However with this new setting it should be working for both.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 21 of 27
(1,494 Views)

Yes, and thanks to your earlier post, now I can use the FTDI drivers seamlessly in all my applications.  Thank you Rolfk!

0 Kudos
Message 22 of 27
(1,490 Views)

all ICs of X series have to use FT_EEPROM_Read and FT_EEPROM_Program functions instead of ReadEx and ProgramEx

you can toggle GPIO using FT_SetBitMode from D2xx

tcie_0-1665241783217.png

tcie_1-1665241790514.png

 

0 Kudos
Message 23 of 27
(1,408 Views)

Hello,

 

I am using the libMPSSE.dll from Mr. Benoit for I2C communication with the FT232H device. It works flawless. I am impressed with that.

 

I have now one issue with the usage that is, when there is no communication possible with the device (for eg. loss of power, fault in the wires, etc.) the VIs get frozen because the Read and Write functions wait till they receive some acknowledge from the device. So I thought of looking into the matter and found out that there is no timeout set for these function so that when there is any problem the functions timeout and do not freeze the application.

 

There is a FT_SetTimeouts function available in FTD2xx.dll which is missing in the libMPSSE.dll.

 

I also started using the FTD2xx.dll and building some VIs, but I did not find a function where I can set the clock speed for I2C (eg. 100k or 400k).

 

I would appreciate if someone could help me integrate the timeout function in the mpsse lib or suggest some solution to this problem or give some examples on FTD2xx.dll so that I can switch completely from libMPSSE.dll to FTD2xx.dll.

 

Thank you very much for your replys.

 

- Vishal

0 Kudos
Message 24 of 27
(137 Views)

libMPSSE is in fact a library that sits on top of libFTD2xx. As such it would be of course possible to implement all of libMPSSE in LabVIEW and access libFTD2xx instead. However MPSSE is not just a simple passthrough but involves quite a bit of logic to handle I2C and SPI functionality respectively using the MPSSE engine in the chip. It also has some specific code paths for certain types of FTD chip variants that don't exactly behave the same. Implementing all of that in LabVIEW, while possible, is not for the faint at heart and will require quite a bit of effort. It also will require you to know even more details about how to interface to DLL functions through the Call Library Node, to access all of the necessary FTD2xx functions correctly.

 

Are you sure you are ready for such a project? I have considered it for a long time, but always decided to avoid it because of the necessary work involved and lack of a project that would justify the needed time (and of course pay for the expenses).

 

You can look at the C source code of the MPSSE dll from FTDI here: https://ftdichip.com/software-examples/mpsse-projects/

 

Take a good look and then decide if you really want to reimplement all of that in LabVIEW!!

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 25 of 27
(124 Views)

Hello Rolf,

 

Thank you for your reply. I saw all the links and the documents available. You are right, it would be a very time consumning process to edit the dlls. I completely agree with that.

 

So now I am trying to implement the communication using the basic FTD2xx.dll. I am able to initialize the FT232H and get back the handle and device info. The write and read is not working yet.

 

Do you know how I can set the clock rate using the FTD2xx.dll in LabVIEW.

0 Kudos
Message 26 of 27
(110 Views)

You completely misunderstood me.

 

What I was basically saying is that reimplementing the existing MPSSE DLL in LabVIEW on top of FTD2xx.DLL is going to be a very time consuming job. Especially if you want to have anything that is more than a very crude proof of concept.

 

The easiest by far in terms of effort would be to modify the existing DLL to add the features you want it to have. Of course that requires you to be able to modify the existing C code and compile the result into a new DLL.

 

But if your knowledge is to limited for that, the change to get anything useful when trying to reimplement MPSSE.DLL in LabVIEW is very small too.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 27 of 27
(98 Views)