As much as possible GPIO Outs . What should I do ?

Hi, I need the maximum possible GPIOs out of the BBB.
I’ll direct connect a optocopler to decouple the bbb form the external devices.
But my first tries with P8 Pin 3-46 wher enot successful may be my overlay file is a bit to big. Or do somebody the same.? How about the boot pins ? If I use them as output do I have to pull them down anyway ?


Depending on how fast you need to control and respond to the GPIO, it may be easier to
use the I2C bus and control some GPIO expanders.

A chip like the PCA9555 will get you 16 each GPIO, and you can control 8 of them on an I2C bus.
If you need more GPIO than that, you can buy other parts that occupy different I2C addresses and
put another 8 times 16 GPIO on the bus.

This also adds a layer of isolation between the BBB and the GPIO. The GPIO pins on the
expanders are more rugged than the GPIO pins on the BBB, and a Voltage spike would kill
the cheap expander IC, and generally, not the more expensive BBB.

Depending on how you organize things, using the I2C bus approach will add several milliseconds to
respond to, or command the GPIO. On the other hand, you are running under Linux, which has it’s
own delays and jitter that can be greater than that.

So, how many do you need? and what are your timing requirements for sensing the state of a pin
or commanding an output on the pin?

— Graham

HI Graham,

we like to just connect things we can order directly. Any extra chip, component we need to wire solder etc. should be prevented.
Therefore we already pushed aside the i2c. I agree that this would be more stable but needs extra effort to build up many of them :wink: and no one sold us a full solution.

Therefore we like to use the baremetal BBB and as much as possible GPIOs directly. Speed … no matters cos we switch on/off DSL modem power.
hdmi, sound, … not used…
pure console via J1 and ssh via wired Ethernet.

I found a couple of examples for single or up to 8 GPIOs but no full setup.



Well, read the system Reference Manual Section 8 carefully.

The GPIO pins associated with “Expansion Boot Pins” can generally not be used
without additional external circuitry. (mostly the same pins as the LCD Conflict Pins).

If you are using the eMMC, then you can not use the eMMC conflict pins.

Does everything else leave you with enough GPIO pins to do what you want to do?

— Graham