October 9, 2016

The Beaglebone Black -- Pins and Signals

The BBB has two 46 pin headers that you can connect stuff to. Be aware that the BBB uses 3.3 volt logic levels and you will cause damage connecting directly to 5 volt logic. Also the analog input pins are limited to 1.8 volts. Beware.

If you set the board on a table in front of you with the network connector to your right, the P8 will be close to you and the P9 will be away from you. Pin 1 on each will be to your right.

Label those pins!

Here are some handy labels you can print out and glue to the connectors. I just printed them on plain white paper and used white glue applied with a toothpick to place them, but if you can print on label stock that might (or might not) be handier. Glue allows you to float them precisely into position which I consider a virtue.

Find the GPIO signals

This is not as simple as you might think. There are a myriad of diagrams available online and it is worth looking them over. I have several here that I found and like (no I did not make these an I feel bad not giving credit where it is due, but ....).

Consider once again that we have 92 pins available (46*2). 14 are allocated to power and ground, 9 are allocated to analog inputs, and 2 to power and reset. This leaves 67 pins for general puposes (and there are 128 gpio signals inside the chip, struggling to get out, they aren't all going to make it!).

Don't get excited by the following chart though. You are going to be in for a lot of confusion and disappointment if you just try to start using GPIO pins based on the following diagram. Keep reading this to the end.

The above handy chart claims "only" 65 pins, but near as I can tell that count seems to be based on the idea that P9 pins 19 and 20 can only be used for i2c2 .... but near as I can tell these can be mapped to gpio pins in mode 7. At any event 65 or 67 pins is a lot of GPIO, but there is another whole issue to consider first. As it turns out, you are only going to be able to use about half of those.

Here is another chart that shows a more truthful display as pins that are dedicated to things other than good old GPIO can be readily identified. Since eMMC and the HDMI chip grab a lot of the pins (the HDMI is the "LCD" on this map as near as I can tell), you are in for a lot of frustration and confusion if you try to use any pin on the diagram above. In a nutshell, if it doesn't say GPIO in the diagram below you are not going to be able to use it for GPIO. In some cases you can reconfigure things, but in general you are out of luck. At any event, if it don't say GPIO it ain't gonna work straight out of the box. I count 29 pins in the following diagram available for uncontested GPIO.

I sometimes wish some contiguous groups of GPIO pins were available rather than the byzantine hodge-podge collection we have. That might be partially solved on a BBG (beaglebone green) where the hdmi/lcd pins are not tied up. This might provide some "bus-like" pin groups that would solve my problems.

The following tables show what is available on each of the pins, note that the "mode" value across the top is the pinmux setting which controls what internal chip signal gets routed to a particular pin.

First here is P8:

And the following shows P9:

Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org