NI-8452 ChipSelect pin with Matlab

5 次查看(过去 30 天)
Po-Tsung
Po-Tsung 2019-5-22
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

回答(1 个)

John Hribar
John Hribar 2019-5-27
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.

类别

Help CenterFile Exchange 中查找有关 Instrument Control Toolbox Supported Hardware 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by