A13 MICRO GPIO table

Started by MBR, March 30, 2014, 11:04:40 PM

Previous topic - Next topic

MBR

Hi,

after plaing with A13-OLinuXino-MICRO, I made this table for GPIO programming via sysfs (without SUN4I_GPIO_UGLY enabled).




















IndexNamePIN#GPIO2
1pb3711
2pb4813
3pb10915
4pe42926
5pe53024
6pe63122
7pe73220
8pe83318
9pe93416
10pe103514
11pe113612
12pg93710
13pg10388
14pg11396

Index is the number that you must write to export file to bring up the GPIO directory. Name and PIN# are name and pin number (used elsewhere), GPIO2 is the number of pin in the GPIO2 connector. To bring up all GPIOs, become root, change into /sys/class/gpio and use this shell line:

for i in `seq 1 14` ; do echo $i > export ; done

Note: This will probably cause the green LED to shine dimly, because the LED is connected to gpio12_pg9 and the GPIOs are set as inputs by default.

Only the first and last three (pg* and pg*) support edge triggering. And the last three are used for other things (the green LED and such, see https://www.olimex.com/wiki/A13-OLinuXino).

Other usefull pin on the GPIO2 connector are the pins 2 and 4 - GND, the pin 3 - 3.3V (GPIOs are not 5V tolerant!) and the pin 9 - PIN6/pb2/PWM0, controlled by /sys/class/pwm-sunxi/pwm0.

I hope that this will be usefull to someone.

Tompai

Thanks, this was very helpful :)