Modifications

Sauter à la navigation Sauter à la recherche
49 octets ajoutés ,  26 février 2022 à 00:25
Ligne 241 : Ligne 241 :  
* SCLK: Clock signal giving the rythme to the data transfer.
 
* SCLK: Clock signal giving the rythme to the data transfer.
 
* SS: Slave Select (activated at LOW) used to activate the device on the bus. It is also used to start "transaction" with the device.  
 
* SS: Slave Select (activated at LOW) used to activate the device on the bus. It is also used to start "transaction" with the device.  
 +
    
The following snip of code creates an instance of the SPI(0) bus
 
The following snip of code creates an instance of the SPI(0) bus
Ligne 247 : Ligne 248 :     
ss = Pin( 5, Pin.OUT, value=1 ) # Slave Select in deactivated state by default.
 
ss = Pin( 5, Pin.OUT, value=1 ) # Slave Select in deactivated state by default.
spi = SPI( 0, baudrate=400000 ) # reducing clock speed to 400 KHz
+
# SPI(0) : GP4=Miso, GP5=/SS, GP6=Sck, GP7=Mosi
 +
# reducing clock speed to 400 KHz
 +
spi = SPI( 0, baudrate=400000 )
 
</syntaxhighlight>
 
</syntaxhighlight>
  
29 917

modifications

Menu de navigation