Modifications

Sauter à la navigation Sauter à la recherche
48 octets ajoutés ,  9 septembre 2013 à 17:53
Ligne 2 : Ligne 2 :     
== Brochage du GPIO ==
 
== 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.
+
{{bloc-etroit|text=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)
 
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.
+
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.
 
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.
Ligne 14 : Ligne 14 :  
[[Fichier:Pi-WiringPi-GPIO-01.png]]
 
[[Fichier:Pi-WiringPi-GPIO-01.png]]
   −
Board Revisions: Please note the differences between board revisions 1 and 2 (Rv1 and Rv2 above) The Revision 2 is readily identifiable by the presence of the 2 mounting holes.
+
Révision des cartes:  
 +
 
 +
Faite attention aux différences entre les révisions 1 et 2 des cartes (Rv1 et Rv2 ci-dessus). La révision 2 est facilement identifiable par la présence de 2 tours de fixation.
    
[[Fichier:Pi-WiringPi-GPIO-02.png]]
 
[[Fichier:Pi-WiringPi-GPIO-02.png]]
29 917

modifications

Menu de navigation