Jump to content

[CR] MPSSE SPI


Recommended Posts

MPSSE SPI


For a personal project, I needed to communicate between my computer and a SPI device slave device. So, I use a FTDI chip FT232h.

I have adapted the library MPSSE I2C already available on this website to make it works for SPI.

Warning ! VI are not 100% tested (especially Read functions), I provided it as it is.


 

Link to post
  • 3 months later...

Hi RomainP,

Thank you very much for these drivers. 
I am using them successfully with a FT232H (inside a UM232H module) and MPSSE-SPI running at 30Mbps to get familiar with the MPSSE operation via LabVIEW so I can communicate with PC via SPI slave device as you did.

I have a couple of questions I'm hoping you or someone can help with.

I am currently running a LV loop to write 50kbytes, then read 50kbytes to the SPI, at full speed...and this works... but it is half-duplex.

How would I go about implementing duplex..so I can have read & write simultaneously ? Is there a SPI read-write.vi ? Or could I perhaps write my own ?..if so could you make some suggestions...or is it not possible due to dll limitations ?

Secondly, are there some examples which show how to use the FT232H GPIO pins via LabVIEW whilst using your drivers ?

Regards,

tech1962

Link to post
  • 1 year later...

Hello RomainP,

I really would like to thank you for your libraries. Would it be possible for you to downgrade your MPSSE SPI library in order to be used with Labview2014?

Beforehand, thank you for your response.

Regards!

Edited by lvfan2018
Typo
Link to post
  • 2 months later...
  • 1 year later...

Hi,

I am attempting to use your vi.s to communicate to a adafruit BMP388 module via SPI. Thank you BTW! I seem to be getting hung up on reading from the data registers on the BMP388. I'm not sure if I need to implement the SPI write read function to do so. I've implemented it and still see no activity on MISO line? But unsure I'm using the functions properly?I believe I have the configuration data sent properly with SPI write. In theory i just need to read from the registers. It seems I would need to specify somewhere what registers I want read to get the data? Any guidance would be appreciated. Thanks Marty

Link to post
  • 1 month later...
  • 6 months later...

HI

I downloaded the MPSS SPI. I plug the cable in and that is working fine according the windows device manager. But when I open the labview project and the test.vi I have an broken run arrow. when i look in to the sub vi's I find this error "The library specified for this node cannot be found or cannot be loaded. Right-click the Call Library Function node and select Configure, then choose the correct library name or path"

when I select configure an change the path to the MPSS.DDL included in the download i get "the library selected is not valid for the current platform. For example, you are running 64 bit labview and the library might be a 32 bit library"

I try both the 32 and the 64 bit labview but both the same error. 

Do someone know what is going wrong?

Link to post
On 3/19/2021 at 2:58 PM, RDUV said:

HI

I downloaded the MPSS SPI. I plug the cable in and that is working fine according the windows device manager. But when I open the labview project and the test.vi I have an broken run arrow. when i look in to the sub vi's I find this error "The library specified for this node cannot be found or cannot be loaded. Right-click the Call Library Function node and select Configure, then choose the correct library name or path"

when I select configure an change the path to the MPSS.DDL included in the download i get "the library selected is not valid for the current platform. For example, you are running 64 bit labview and the library might be a 32 bit library"

I try both the 32 and the 64 bit labview but both the same error. 

Do someone know what is going wrong?

The MPSSE.DLL is only a high level DLL driver that depends on the low level D2XX driver from FTDI. You need to have that installed too, and it needs to be present in a location where the Windows DLL Loader can find it. If you download and install the standard driver from the FTDI site, this should be taken care for you. https://ftdichip.com/drivers/d2xx-drivers/

Link to post

Thanks for the Reaction.

I did install the D2XX driver. but this morning i reinstalled the D2XX driver as admin (I didn't install it the first time as admin). But noting is changed. 

I'm running labview 2018 64bit on a virtual windows in VM ware. If i look at de device manager i can see the USB Serial Converter under the Universal serial Bus Controllers, and i see the USB serial Port (Com3) under Ports(Com&LTP). When i look at the properties of the com3 or the USB Serial Converter i see the the device  is working properly. in the driver Details is can see that the ftd2xx drivers are installed (see picture 4).

in Labview i have the error showed the 3th picture. when i look at the path of the library I see the picture 2. I redirected the path to the dll in the LabVIEW directory that I downloaded from this forum. but that give me the the error from the 1th picture. Is there something that I miss? do I need to do anything with the dll or do anyone have a idea about whit is going wrong?

 

thanks

redirect.png

labview MPSSE.png

labview error.png

ftdi Drivers.png

Edited by RDUV
Link to post

Well you installed the 32-bit version of the the DLL (syswow64 is despite its name NOT for 64-bit DLLs but the 32-bit versions of  DLLs on a 64-bit Windows system). Same accounts possibly for the MPSEE.DLL. They all need to be 64-bit in order to be loadable in 64-bit LabVIEW!

 

Best is probably to download the actual MPSEE driver directly from the FTDI site here and use the 64-bit version of the DLL inside under: libMPSSE.zip\libMPSSE__0.6\lib\windows\visualstudio\x64\Release\libMPSEE.dll

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By venustas08
      I have a question.... The MPSSE I2C driver works great. But it does not have a Write-Read dll in it.
      Calling the WriteDevice and Read Device separately in LabVIEW is generating considerable delay ( ~1ms windows scheduler + labview ).
      is there a combined DLL for Write-Read.
      currently I am able to reach only about 400 samples per second with my ADC. I want to be able to use upto 10ksps.
      Is there any other way to reduce this delay ? 
      Thanks for the help.
       
       





    • By RomainP
      For a personal project, I needed to communicate between my computer and a SPI device slave device. So, I use a FTDI chip FT232h.
      I have adapted the library MPSSE I2C already available on this website to make it works for SPI.
      Warning ! VI are not 100% tested (especially Read functions), I provided it as it is.
    • By Joseph Gorse
      View File FTDI libMPSSE-SPI
      Initial release. It is hairy, but less so than the original import wizard.
      Submitter Joseph Gorse Submitted 01/25/2017 Category *Uncertified* LabVIEW Version  
    • By Joseph Gorse
      Initial release. It is hairy, but less so than the original import wizard.
    • By Benoit
      There it is... finaly... 
      Because the code given in the FTDI web page is not convenient, not working and haven't been developed by real LABview programmer, I decided to create a library for the I2C.
       
      a version for SPI will come soon.
       
      This library is free to use. If FTDI want's it in ther site, I do not allow you to publish it since you didn't help any of your customer with LABview.
      but of course feel free to publish this link.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.