How do I expand the number of digital I/O pins?

29 May 2011

Mbed Community

How do I increase the number of Digital I/O pins available.

Kind Regards David

29 May 2011

Hi David,

Any of the mbed LPC1768 pins p5 - p30 can be used as digital I/O (i.e. 26 lines).

If this is not enough you can use things like I2C port expanders. You can connect a number of these chips to the 2 pin I2C bus, with each chip giving you control of usually 8 or 16 I/O lines. There are a number listed in the cookbook under "Interfaces and Drivers".

One example would be:

But see the Cookbook for a whole selection.

Simon