Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
Daniel
Daniel le 29 Mai 2017
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

Réponses (1)

Madhu Govindarajan
Madhu Govindarajan le 18 Oct 2017
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 commentaires
Stefan Frutiger
Stefan Frutiger le 30 Jan 2018
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 le 30 Jan 2018
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Raspberry Pi Hardware dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by