Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-8452 used as slave

Solved!
Go to solution

Hey,

 

is it possible to use NI-8452 both being as master and slave?

 

Thanks,

Message 1 of 14
(7,652 Views)

Hi Grega!

 

 Yes, the NI-8452 can be used both as a slave module, and as a master module. The Slave API is not available only for the 8451. Please check out this document for further information, or ask away in this thread.

 

Kind regards:

 

Andrew Valko

National Instruments

Andrew Valko
National Instruments Hungary
0 Kudos
Message 2 of 14
(7,638 Views)

This applies also for the SPI? I have a ADC that does continuous conversion and is connected to FPGA. This FPGA wants me to have a slave SPI device, that will communicate with it. So the FPGA gives data, clock and busy signal, all as output.

Aren't the SPI bits on NI 8452 for clock, and CS only outputs?

 

Regards

0 Kudos
Message 3 of 14
(7,635 Views)
Solution
Accepted by topic author grega

Dear Grega!

 

You are correct, SPI slave function is not supported on the 8452, as it will always provide clock and chip select signals as outputs. There are a few things we can do to solve this, depending on your resources and application.

a. Use the FPGA as a slave module, because that is supported. If you're testing master behavior though, this is not applicable.

b. Oversample the FPGA output. You'll use both devices as masters so they will not be synced, but the SPI needs no ACK from the slave so data transfer still works this way. The redundant data created in this case (since the USB must run faster not to miss anything, so some data will be measured twice) must be somehow programatically removed.

c. Use any DIO module that supports edge detection to act as a slave device. 

 

If I understood correctly, since we're collecting measurement data from the FPGA, no two-way communication is necessary, we just have to read what the master module writes onto the bus. If that is not true (you want the slave to react by responding on the bus) then only a proper SPI slave (another FPGA perhaps) is suitable.

 

Kind regards:

 

Andrew Valko

NI

Andrew Valko
National Instruments Hungary
Message 4 of 14
(7,626 Views)

Thank you for the information.

Yes, I only need to read data from the FPGA.

So if I use DIO module to detect a busy signal (when the data is ready), I would still need a synchronized clock from FPGA and the SPI module.

Hmm, probably the easiest way is to reprogram the FPGA...

 

Thanks,

 

Regards

0 Kudos
Message 5 of 14
(7,623 Views)

Dear Grega!

 

Glad I could provide some tips to move forward with your application. It is as you've said: If you want to use a DIO module, you'll have to connect the clock output from the FPGA as an ingoing clock, as well as the busy signal for edge detection. 

 

Best of luck to you and please get back to me if you have any other questions.

 

Regards:

 

Andrew Valko

NI

Andrew Valko
National Instruments Hungary
0 Kudos
Message 6 of 14
(7,618 Views)

Hi!,

 

I found this post on your forum.

 

http://forums.ni.com/t5/Automotive-and-Embedded-Networks/Can-the-NI-8452-I2C-behave-as-multiple-slav...

 

It looks like that now can act as slave. It's correct? And which is the buffer size?

0 Kudos
Message 7 of 14
(7,443 Views)

Hey,

 

as I read through the NI-845x 2.1.1 readme file, it says that they added the support for the device being a slave only for I2C. Or am I mistaken?

 

Best Regards,

Grega

0 Kudos
Message 8 of 14
(7,388 Views)

Hi Grega and Mario79,

 

yes the slave API is only available for the I2C, not the SPI.

Best regards,
Jano
0 Kudos
Message 9 of 14
(7,372 Views)

Hi Ardent!

Is there any update regarding slave mode support in SPI for NI-8452?


I am doing a LabView project that needs to acquire data at 24MHz from touch controller in debugging mode but unfortunately touch controller sends data as spi master.
It needs to be synchronized.

If NI-8452 still does not support SPI slave mode, could you please suggest me any other SPI interface device that can be used easily with labView?

0 Kudos
Message 10 of 14
(6,877 Views)