Raspberry Pi 3 B Simulink Sensor Implementation SPI

조회 수: 1 (최근 30일)
Ferdinand
Ferdinand 2020년 7월 14일
댓글: Prasanth Sunkara 2020년 7월 30일
Hello,
I need help to implement an angle sensor AMT203 CUI on a raspberrypi 3b using Matlab Simulink. Do I have to unlock the SPI Pins first in the Command Window? Which Simulink blocks do I use to read data from those pins, SPI register read, or GPIO read?

답변 (1개)

Prasanth Sunkara
Prasanth Sunkara 2020년 7월 23일
Hello Ferdinand,
If you are working with a SPI sensor, you should have the SPI module enabled. In most cases, SPI module(and the SPI pins) are enabled by default. You can check this using raspi-config.
You can directly use the SPI blocks to interact with the sensor.
For reference, please see the below links.
Hope this helps!
Thanks,
Prasanth
  댓글 수: 2
Ferdinand
Ferdinand 2020년 7월 23일
Thank you Prasanth.
Where do I get the register adresses for SPI REGISTER WRITE/READ blocks, can I find them in the datasheet of the sensor's microchip?
With kind regards,
Ferdinand
Prasanth Sunkara
Prasanth Sunkara 2020년 7월 30일
Sorry for the late reply. Yes, those values can be found in the sensor's datasheet.
Thanks,
Prasanth

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by