💾 Archived View for gem.librehacker.com › gemlog › tech › 20210714-0.gmi captured on 2023-01-29 at 03:30:53. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

ff-mcp23s17: Successful Output Test

I was able to set the GPIOs to output mode and to set the GPIOA pins to pattern 10101010. Here is me testing it with a voltmeter:

Arduino Nano driving an MCP23S17 GPIO Expander module

It turns out that I was sending SPI signals correctly, but that I had make a mistake in the register data I was sending. The IODIRA register, which sets the pins to input or output, requires a 1 for input and a 0 for output. I had assumed it was 1 for output.

MCP23S17 data sheet snippet: IODIR

I have found that if a MC periphal is not doing what is expected, the problem generally comes down to one of five issues:

Comments

Alaskalinuxuser, 2021-07-14

That's great that you got it figured out! By the way, the link to the data sheet just gives me a permanent failure when I click it.

Alaskalinuxuser, 2021-07-15

Just tested again this morning. It works now.