Modifications

Sauter à la navigation Sauter à la recherche
931 octets ajoutés ,  25 février 2022 à 23:40
Ligne 230 : Ligne 230 :     
=== SPI Bus ===
 
=== SPI Bus ===
The onboard LED is tied to the GPIO 25. Here how to control it.
+
An SPI bus is high speed full duplex bus. High speed means several mega-hertz (can be up to +20 MHz). The full duplex means communicates in both direction at the same time.
 +
 
 +
SPI bus are very short (below 10cm) and use 3 wires + a "Slave Select" wire per device:
 +
 
 +
 
 +
bus is a very popular serial bus in electronic to connect sensors and electronics to a microcontroler. Some DIY Maker companies did also use some "normalized" connectors around I2C bus. You may probably already ear words about Qwiic from SparkFun, StemmaQt from Adafruit (Qwiic compatible), Grove from SeeedStudio.
 +
 
 +
Maybe not the fastest bus, this bus is easy to wire and to manage and requires only 2 wires:
 +
 
 +
    SDA: Serial Data
 +
    SCL: Serial Clock
 +
 
 +
The I2C protocol use an address (0..127) to contact the target board with request and waiting for response. For sure each sensor boards must have an unique address on the I2C. On I2C implementation, the microcontroler do always keeps the control over the I2C communication.  
    
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
29 917

modifications

Menu de navigation