2

I have multiple MCP23017 ICs with their interrupts all connected in serial. The interrupt pins are configured to be open-drain.

All the A port interrupt pins are connected together and all the B port interrupt pins are connected together.

When I have up to 2 interrupts on the same line, when an interrupt is triggered I get a logical 0, active low, as expected. When I have more than 2 interrupts on the same line I get a logical 1.

After measuring the line, the voltage still drops but not far enough to be considered a logical 0. I assume this is something to do with the pull-ups on the ICs that are currently pulled high as no interrupt has been triggered on those ICs.

My understanding is that devices connected on the same line with an open-drain would act as if they were logically being AND'd, and therefore if any device went low the entire line would be low too. What have I misunderstood?

I have attached the schematic, code, and MCP23017 datasheets below.

Schematic: https://i.stack.imgur.com/IIKhX.jpg

Arduino code: https://gist.github.com/P4rk/13d0ca7865f8dede6a54042c220fb957

MCP23017 datasheet: https://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf

P4rk
  • 23
  • 2
  • 1
    `interrupt pins are connected together` is a parallel connection – jsotola May 21 '22 at 17:50
  • 1
    it should say `devices connected on the same line with an open-drain would act as if they were logically being OR'd` because the logic is `active low` ... any low asserts the INT term ... think `low = logic 1` – jsotola May 21 '22 at 17:55
  • 1
    it sounds like you have the INT outputs not configured as open drain – jsotola May 21 '22 at 18:01
  • From your description, if 2 chips pull int line low it works, but not if 3 chips pull in line low - which makes no sense. Can you be more specific about voltages and how many chips pull low, or none, which is the only case the pin should read high (assuming there is something to pull it up). – Justme May 21 '22 at 18:03

1 Answers1

1

You said the INT pins are open-drain, but they are not open-drain, unless you configure them open-drain. By default, they are push-pull outputs, and there is no indication they were configured as open-drain.

Justme
  • 127,425
  • 3
  • 97
  • 261
  • Yeah, you're correct. Turns out the library I was using was setting the IOCON.ODR bit as 0 but documented that as open-drain. The datasheet specifies that the IOCON.ODR bit needs to be set as 1 to be active driver. A fix for the library's documentation https://github.com/blemasle/arduino-mcp23017/issues/26 – P4rk May 22 '22 at 20:56