2

I want to connect 5 of pcf8574t on my AVR ATMEGA32L. One for LCD 2x16 and 4 for general purpose I/O. The question is: if i get an interrupt signal from one of 4 chips, how can i know which chip has send the interrupt?

I think that circuit may be usefull to apart interrupt signal. enter image description here

This circuit x4 times (one from each PCF8574T chip). "mcu Interrupt pin" connected together to AVR Global Interrupt pin, such as INT0, or INT1. "PINx mcu" pin, connected seperate to a GPIO pin of AVR such as PB7, PB6, PB5, PB4. and "PCF INT OpenDrain" connected also seperate to INT pin of PCF8574T.

but i don't know if this circuit it's working 100% .

MrBit
  • 2,013
  • 4
  • 31
  • 61

1 Answers1

1

Unfortunately the PCF8574T does not provide a mechanism for polling the chip to see if an interrupt has been generated. You may want to consider using a chip such as the MCP23017 which does (via the INTFx registers).

Or if, as your new edit shows, you're connecting the interrupt outputs to GPIOs anyways then just use the PCINT capabilities of the MCU to detect the interrupt.

Ignacio Vazquez-Abrams
  • 48,488
  • 4
  • 73
  • 103
  • may this circuit help me to find which PCF8574T makes the interrupt, just to consider the Value of a PORT? For example: One of PCF (e.g first) makes a Interrupt, this triggered the INT line of my mcu. Then just considering a PORT (PORTB) to see the value we found a interrupt, (e.g. value of 0111 of portb shows chip 1 has interrupt) – MrBit Nov 26 '14 at 18:41
  • AVR inputs don't latch. – Ignacio Vazquez-Abrams Nov 26 '14 at 19:32