Modifications
Sauter à la navigation
Sauter à la recherche
← Modification précédente
Modification suivante →
ENG-CANSAT-PICO-HowTo
(voir la source)
Version du 26 février 2022 à 00:25
49 octets ajoutés
,
26 février 2022 à 00:25
→SPI Bus
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>
Admin
Bureaucrates
,
Administrateurs
29 917
modifications
Menu de navigation
Outils personnels
Se connecter
Espaces de noms
Page
Discussion
Variantes
Affichages
Lire
Voir le texte source
Voir l’historique
Plus
Rechercher
Navigation
ARDUINO
RASPBERRY-PI
[:: PI Hacking ::]
Particle.IO
Micro Python
Imprimante 3D
Actualités
Modifications récentes
Page au hasard
Aide
Outils
Pages spéciales
Version imprimable