Manufacturers P/N: MCP23S17
Cost: $1.65 from Digikey.com
Description: 16-bit I/O expander w/ Serial Interface
Sometimes using small microcontroller chips (to save money!) offers a limited number of inputs and outputs. Especially when using the Picaxe family of chips, the inputs and outputs are sometimes just not enough. There is an unfortunate event that happens with the Picaxe 08, 08M, 14M, 20M, 18, 18A, 28A chips: not enough GOSUBs are allowed. The Picaxe 18X, 28X family, and 40X family has the memory and GOSUBs available to handle this expansion. This tutorial uses sub procedures for the serial communications. The X1 and X2 parts have SHIFTOUT and SHIFTIN capabilities that saves a lot of memory. I have done some experimenting, and I have taken a poorly written program (143 bytes) to a better one (123 bytes). This information is provided, but the actual example program will demonstrate a little more and will be much larger.