communication_protocole_spi
Table des matières
Communication avec le protocole SPI
Ressources
Wikipedia:
Article à lire en 1er:
- Communication entre Raspberry Pi et Arduino en SPI Ne marche pas sur une ESP32
- La video, sans intérêt du tuto interressant de penguintutor.com Using Raspberry Pi and Arduino together through SPI serial communications
- roboticsbackend.com Raspberry Pi (master) Arduino Uno (slave) SPI communication with WiringPi
- circuitdigest.com How to Use SPI Communication in STM32 Microcontroller
- digikey.fr Pourquoi et comment utiliser l'interface périphérique série pour simplifier les connexions entre plusieurs dispositifs
Documents PDF
- 8-bus_spi.pdf en français, destiné aux Terminales SI
- protocole-spi.pdf avec quelques infos pour Arduino
- 3300-le-bus-spi.pdf en français, explications techniques
SPI entre Raspberry et Arduino
Avec arduino en mode slave
Ressources
Slave Mode with SPI.h
et avec des interrupt
SPI Slave Programming for Arduino @ arduino.stackexchange.com
SPI.h library by default only support Master mode, the SPI.begin() will automatically set slave select (ss) pin to HIGH whether you have pinMode(ss, OUTPUT) in your setup() code or not and set the Arduino as an SPI master.
As the SPI library does not contain the functionality for slave mode, in order to use Arduino as a Slave, you will need to do some customised setup, mainly on
- setting MISO as OUTPUT for slave to send data
- enable slave mode by setting the SPCR register
- enable interrupt when data is received.
Nick Gammon explique tout sur le SPI
Les scripts sont sur GitHub sergeLabo arduino_high_frequency avec la version python des master.
How to make an SPI slave
Montre le problème du 1er transfert.
How to get a response from a slave
Envoyez et recevez tout type de données
communication_protocole_spi.txt · Dernière modification : 2022/09/06 07:34 de serge