I am intending to implement the same m-file code in this question in Simulink. I am finding that the writeRead command does not have completing similar Simulink block because: the SPI register read only reads an address, the SPI register write only writes to an address, and the SPI master transfer is the closest but does not return my expected results. Potentially I am not writing the proper syntax to use the SPI master transfer correctly.
Would anyone know how to implement this particular segment of code into a Simulink diagram?
dataRate = writeRead(myADS1256,[bin2dec('00010011'), 0]); % read data rate
dataRate = writeRead(myADS1256,0); % original data rate should equal 240 or '11110000'
The reason why I ask this is because I currently am using the SPI register read block however it is only returning '1110000' instead of the correct '11110000'.

답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB Support Package for Raspberry Pi Hardware에 대해 자세히 알아보기

질문:

2018년 2월 22일

편집:

2018년 2월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by