From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SPI implementation in LabVIEW only

Hi Folk,

 

A couple years ago I used a LabVIEW program that implemented SPI using nothing but a comm or parallel port.

 

It was from a customer and was custom code that I did not have access to.

 

Does anyone have an example of a LabVIEW only SPI solution.

 

Thanks,

 

-SS



0 Kudos
Message 1 of 9
(4,060 Views)
Message 2 of 9
(4,053 Views)
0 Kudos
Message 3 of 9
(4,038 Views)

Hi Simon,

 

What would you be connecting to the Serial/Parallel port?  In the following article: Understanding the SPI Bus with NI LabVIEW it talks about different options for communicating with SPI in LabVIEW.

 

The following link has also been helpful for me when generating SPI Digital Waveforms SPI Digital Waveform Reference Library

 

Do you remember needing any specific drivers to run that previous code?

Scott A
SSP Product Manager
National Instruments
Message 4 of 9
(3,993 Views)

Hi Scott A,

 

I am connecting to a proprietary SPI interface (EEPROM) so sorry there are no specifications that I can share.

 

I believe it connected to a parallel port directly.  No specific drivers were needed but there was some low level type code that did use semaphores in the vi's.

 

It was fairly fast if I remember correctly.

 

Regards,

 

-SS



0 Kudos
Message 5 of 9
(3,977 Views)
0 Kudos
Message 6 of 9
(3,969 Views)

Ben,

 

I have more information and found my original files.  It turns out the code used cviVXDWrapper.dll

 

When I search that *.dll a previous post from you comes up:  http://ni.lithium.com/t5/LabVIEW/Why-would-I-get-different-sized-exe-s-if-I-build-the-same-source/m-...

 

Any experience with this dll?

 

Regards,

 

-SS



0 Kudos
Message 7 of 9
(3,942 Views)

That DLL is used by the "In Port" and "Out Port" VIs. It's part of the CVI Run-Time Engine. The VIs themselves allowed you to read/write the parallel port (as well as any other port).

 

EDIT: The "In Port" and "Out Port" VIs are still available in vi.lib in the vi.lib\Platform\portaccess.llb library. 

Message 8 of 9
(3,932 Views)

.

0 Kudos
Message 9 of 9
(3,137 Views)