A simple SPI port expander
It is easy to make a simple SPI-compatible port expander with common TTL chips. The version shown below uses two 74HCT595 chips to make a 16-bit port expander. You could use a single chip if you just need 8 bits.
The clock and data signals come from the mbed SPI's sck and mosi lines. A DigitalOut signal is also needed to generate a rising edge after the transfer is over (think of it as an active-low chip select). The SPI data is transferred to the output pins of the '595s when the latch signal goes high.
This circuit will support any speed that the mbed's SPI can generate.
2 comments on A simple SPI port expander:
Please log in to post comments.
This posted example looks simple. Trading complexity for more features (and half the cost) also consider MCP23S17-E/SP (SPI) or MCP23017-E/SP (I2C).