Raspberry Pi Simulink SPI
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!