필터 지우기
필터 지우기

Raspberry Pi 3 SPI - Blocks. How to start the SPI Communication?

조회 수: 1 (최근 30일)
Daniel
Daniel 2017년 5월 29일
댓글: Madhu Govindarajan 2018년 1월 30일
Hello, I can´t implement the Matlab Simulink SPI Block for Raspberry Pi 3. I wan´t to connect the Pi with an Arduino Mega. I can´t measure any Signal on the Ports. Is there an example?
Thank you. Best Regards, Daniel

답변 (1개)

Madhu Govindarajan
Madhu Govindarajan 2017년 10월 18일
Here is an example of using SPI communication with Raspberry PI and simulink - https://www.mathworks.com/help/supportpkg/raspberrypi/examples/communicating-with-an-eeprom.html . Usually the trick with SPI and I2C sensors is to perform the initialization routine accurately, once you have that going based on your specific sensor's commands it should be smooth afterwards.
  댓글 수: 2
Stefan Frutiger
Stefan Frutiger 2018년 1월 30일
This example is really good. But i have another Problem with the SPI Interface. How can you change the Sample Time from the SPI Read Block? Because this is an essentially Parameter for an Input.
Madhu Govindarajan
Madhu Govindarajan 2018년 1월 30일
It looks like this block is implemented from a MATLAB System object and I believe those do not allow you to specify the sample time. Others here might be able to throw more light on this - but I believe one cannot access parameters from p coded files and it might not even change if you change the SPI bus speed.
Sorry for not being able to help you further.

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

카테고리

Help CenterFile Exchange에서 Raspberry Pi Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by