79603538

Date: 2025-05-02 14:16:27
Score: 1.5
Natty:
Report link

Revisiting this again.

Actually, my previously accepted answer was not what it ended up being.

When using the MCP23017, I noticed that the GPIOA / GPIOB registry is very undesireable to poll when OUTPUTS are changed; but rather it is very consistent on INPUT changes.

Instead of polling GPIOA/GPIOB for output status, I instead wrote to OLATA / OLATB which forces the chip to be in that state. I am not saying it will be 100% right, but it has lead me to far greater success. I hope this backtrack will help you in the future if needed.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: emb3dd3d