LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SPI 8451 with labview , CS issues

HI , im using NI 8451 I2C,SPI module .

used NI few examples and wrote a simple code to communicate Master-->Slave .

The problem is that the CS' , isnt toggles when i toggle it , it always on 3.3V.

Im using Labview 2016.

What could be the issue ?

Thank u.

0 Kudos
Message 1 of 14
(3,196 Views)

The NI-8451 uses an active low chip select by default, and its output high voltage is 3.3 V. Even when running the examples, do you see this behavior? Otherwise, if you want to change the behavior of the NI-8451 so that it uses an active high chip select, refer to the following document: http://digital.ni.com/public.nsf/allkb/4D3F32C0318FEE5D862574B3006A5726?OpenDocument. 

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 2 of 14
(3,135 Views)

Hi , yes its behave as you said , all the CS ports are 3.3V , but my question is : How i can change the CS to be 'LOW" ? .

im using the "porperty node" "NI-845X SPI configuration to control the ChipSelect , but it doesnt change anything.

I've added only one part of the code .

Capture.JPG

0 Kudos
Message 3 of 14
(3,125 Views)

The CS line should be pulled low once the line is selected using the SPI Basic API. After the portion of code you included, you should be able to read/write successfully. 

 

If you wish to have more control over the CS line, you can use the SPI Scripting API. This includes 2 VIs (CS Low and CS High) which allows for setting the lines low and high. I recommend looking at some of the examples in LabVIEW for this API. In addition, you can refer to the following document (section 3, scenario 1) for more detailed information: http://www.ni.com/white-paper/8359/en/. 

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 4 of 14
(3,118 Views)

Hi , the interesting thing is that : when i pulling the CS low , and measuring the voltage , i still measure 3.3V , insted of GND .

0 Kudos
Message 5 of 14
(3,100 Views)

Are you measuring the CS line that you are selecting? In addition, are you able to write and read data using this line? If you are unable to write and read data on this line, and it seems that it always is 'High', then the device may be damaged.

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 6 of 14
(3,092 Views)

HI ,

Yes im measuring the CS line using using DVM , and i measure always '1' , it seems that im able to write , but not to read .

i've tried two devices.

Maybe you have some simple code , that you can upload , and ill check ?

0 Kudos
Message 7 of 14
(3,083 Views)

There some write and read examples in LabVIEW (example finder) that you can try out: ensure that you are wiring and configuring your device properly.

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 8 of 14
(3,068 Views)

Hi , based on the examples , i wrote a code for read and write , using SPI scripting.

i've attached probes to all the 4 signals , and analyzing the signals , the strange thing is that the MISO line , is not on Hi-Z . 

im attaching the screenshots and the VI .

20180114_182708.jpg 

0 Kudos
Message 9 of 14
(3,056 Views)

Hi ,

tried to use the internal labview examples for reading and writing , and it seems that everything goes well.

 

0 Kudos
Message 10 of 14
(3,048 Views)