NI-8452 ChipSelect pin with Matlab
조회 수: 6 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
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.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!