NI-8452 ChipSelect pin with Matlab

3 vues (au cours des 30 derniers jours)
Po-Tsung
Po-Tsung le 22 Mai 2019
Hi,
I'm trying to send SPI control signals to an device that we are testing recently over the NI-8452.
The signal geneerated from the NI-8452 SPI_SCLK and SPI_MOSI pins are all correct.
A 'ChipSelect' sign from NI-8452 CS0 pin is also generated correctly.
However, the device need another signal from the NI-8452 CS1 pin.
I checked the Matlab Instrument Contrl Toolbox user's guide, but did not find a clear answer.
It only described the ChipSelect value is 0.
So, the question is can Matlab fully utilize the NI-8452 and generate signals from mulitple Cihip Select pins now?
Thank you very much

Réponses (1)

John Hribar
John Hribar le 27 Mai 2019
Hi,
ChipSelect is a property of the spi object in Matlab. The default is zero, but you can change this to any chip select pin 0-7 by typing
S.ChipSelect = pinNumber;
where pinNumber is the desired pin and S is the name of your spi object defined by
S = spi('ni845x', 0, 0);
I hope this helps.

Catégories

En savoir plus sur Instrument Control Toolbox Supported Hardware dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by