2
\$\begingroup\$

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% .

\$\endgroup\$
3
  • \$\begingroup\$ Because they'll be connected to separate interrupt lines? \$\endgroup\$ Nov 26, 2014 at 18:11
  • \$\begingroup\$ I have only one interrupt line. i try to make a simple circuit which aparts the interrupt signals, connected INT pin of PCF to a PORT pin and from this point a GATE of P-Channel MOSFET which make the switching to INT pin of mcu \$\endgroup\$
    – MrBit
    Nov 26, 2014 at 18:19
  • \$\begingroup\$ Why not use the internal pullups? \$\endgroup\$ Nov 26, 2014 at 18:32

1 Answer 1

1
\$\begingroup\$

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.

\$\endgroup\$
2
  • \$\begingroup\$ 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) \$\endgroup\$
    – MrBit
    Nov 26, 2014 at 18:41
  • \$\begingroup\$ AVR inputs don't latch. \$\endgroup\$ Nov 26, 2014 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.