From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

problem of USB-8451 SPI

Solved!
Go to solution

Hi,

 

I refer to the below tutorial.

 

http://www.ni.com/tutorial/4692/en/

 

And I design vi( attached)

 

But, my USB-8451 doesn't output any signal. I check using a logic analyzer.

 

I think, USB-8451 output 0xFF but not.

 

Do you know how to use it?

 

 

0 Kudos
Message 1 of 4
(2,408 Views)

MOSI.png

 

How did you check the output 0xFF??

As you can see the above, you can check the output by measuring MOSI pin.

But if you write 0xFF in MOSI, you can't check whether the data is real data or not because MOSI pin is always High during the idle status.

Of course, if you check both SCLK and MOSI, you can find out where it is but the data is still 0b11111111 so you can't be sure it's a real data.

I recommend you write the data such as 0xAA which is 0b10101010 and then check MOSI pin by using a scope.

0 Kudos
Message 2 of 4
(2,374 Views)

My first problem is that I don't configure USB-8451 in MAX.

 

After configuring my USB-8451 output data.

 

I output 0xAA but, the output is not.

 

My USB-8451 output 0xAA and my stm32 output 0x60.

 

But when I check the data using logic analyzer, the data is strange.

제목 없음.png

 

This is my hardware connection.

 

2019-02-20-14-07-50.jpg

0 Kudos
Message 3 of 4
(2,367 Views)
Solution
Accepted by topic author Sangkyu

Configuring VISA Alias in MAX is not essential. That is just for a kind of customizing the name of USB-8451.

I think you should only use USB-8451 and the logic analyzer without stm32 because you're not sure there are no problems on USB-8451 and the logic analyzer.

you should check MOSI pin with USB-8451 and the logic analyzer first, and then check MISO pin with all instruments that you have

 

I think SPI CLK is well measured. so can you try to change ch0 to ch2? this is just for ensuring ch2 in the logic analyzer is not broken.

and how was USB-8451 GND connected with the logic analyzer GND? it seems the red line is only connected with your stm32.

0 Kudos
Message 4 of 4
(2,358 Views)