- Published: Wednesday, 08 June 2011
- Written by Jon Chandler
- Hits: 3591
Embedded Lab has another great tutorial, thie one on using the MCP23008 port expander. I've posted about it here before and written a Swordfish module.
A microcontroller comes with a limited number of general purpose input and output (GPIO) ports. However, some applications may require more ports than are available on the microcontroller. In such a case, GPIO expanders can be used to increase the I/O capability of the microcontroller. MCP23008 is one such device (manufactured by Microchip Technology) which provides an easy I/O expansion using 2-wire serial interface. This tutorial illustrates how to add an extra 8-bit I/O port to PIC12683 microcontroller (which has only 6 I/O pins) using MCP23008. A seven segment LED display and a tact switch will be connected to the extended port. The PIC12F683 microcontroller will count the switch presses and display the counter value on the seven segment LED module.