Pi-WiringPi-GPIO-Numbering

De MCHobby - Wiki
Révision datée du 9 septembre 2013 à 17:38 par Admin (discussion | contributions) (Page créée avec « {{Pi-WiringPi-NAV}} == Brochage du GPIO == Pin numbering of the BCM2835 GPIO port(s) on the Raspberry Pi has been a source of great confusion since the designs for the Pi w... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Sauter à la navigation Sauter à la recherche


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Brochage du GPIO

Pin numbering of the BCM2835 GPIO port(s) on the Raspberry Pi has been a source of great confusion since the designs for the Pi were first published. In the early days (even beofre hardware was avalable) the default usable GPIO pins were simply referred to by number as GPIO0 through GPIO7. Additionally there were pins for other purposes, SPI, I2C and serial. This was highlighted on the original image on the Raspberry Pi Wiki site too.

So when initially writing wiringPi, I chose to have the same default pin numbering scheme and numbered them from 0 upwards. This is no different to how the Arduino operates – “Pin 13″ on the Arduino is Port B, bit 5 for example. The underlying hardware definitions are hidden by a simplified numbering scheme. On the Pi, using wiringPi, pin 0 is BCM_GPIO pin 17 for example)

However this has subsequently been viewed as “wrong” and several people have expressed concern about my numbering scheme, however I’ve stuck with it (as by then people were using wiringPi). and it’s proven its worth over the hardware board revisions where some pins changed their hardware definitions, however wiringPi was able to hide this from the user. As a result (for example) a program that uses wiringPi pin 2 on a Rev. 1 Pi will work unchanged on a Rev 2. Pi, however someone using BCM_GPIO pin 21 on a Rev 1 Pi will need to change their program to use BCM_GPIO pin 27 on a Rev 2.

So wiringPi supports its own pin numbering scheme as well as the BCM_GPIO pin numbering scheme, and as of Version 2, it also supports the physical hardware pin numbers (for the P1 connector only), but I would like to suggest you stick to the simplified wiringPi pin numbers. That way your programs will be portable over different hardware revisions without needing any changes.

The following tables give the mapping of the Raspberry Pi GPIO Pins to the (P1) GPIO connector in relation to the pin numbers and the physical location on the connector. This is a representation of the GPIO connector as viewed looking at the board from above. The GPIO connector is to the top-right of the board with the Ethernet and USB sockets to the bottom.



Source: WiringPi.com. WiringPi est une libraire sous licence GPL écrite par Gordon Henderson. Crédit: wiringpi.com

Traduit de l'anglais par Meurisse D. pour MCHobby.be

Traduit avec l'accord de Gordon Henderson, créateur de wiringPi - Translated with authorization of Gordon Henderson, creator of wiringPi

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.