NI-8452 ChipSelect pin with Matlab

조회 수: 6 (최근 30일)
Po-Tsung
Po-Tsung 2019년 5월 22일
답변: John Hribar 2019년 5월 27일
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에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by