ff-mcp23s17 Project Started

I started a project to control the MCP23S17 GPIO expander chip with FlashForth over SPI. If you need lots of I/O lines in a project, one approach is to attach to a microcontroller that has a lot of GPIO pins. Sometimes however you might have some reason to use a particular MC with less built-in lines, and in this case you can instead use a GPIO expander chip. The MCP23S17 has the following features:

The downside is since it is serial communication, you have to spend some extra cycles just transferring data. But MCP23S17 supports 5 Mhz SPI, and anyway with many GPIO applications you don't need to check or modify the GPIO lines at a super high frequency.

So far, I haven't gotten much further than setting up the repository, writing the SPI initialization code, and setting up some code to control the Chip Select lines. It seemed a likely enough scenario in this case that someone might be using more than one expander chip on a board, so I have to take that into account while writing the code.

The ff-mcp23s17 code repository

Proxied content from gemini://gem.librehacker.com/gemlog/tech/20210630-0.gmi

Gemini request details:

Original URL
gemini://gem.librehacker.com/gemlog/tech/20210630-0.gmi
Status code
Success
Meta
text/gemini
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.