Azzera filtri
Azzera filtri

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

3 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

Madhu Govindarajan
Madhu Govindarajan il 18 Ott 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 Commenti
Stefan Frutiger
Stefan Frutiger il 30 Gen 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 il 30 Gen 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.

Accedi per commentare.

Categorie

Scopri di più su Raspberry Pi Hardware in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by