0
\$\begingroup\$

I am working with 8 YS-17 flame sensors and may need more in the future. There are only two INT0 and INT1 in port 3. Is there any way to get the other interrupts or I/Os to work as external interrupts?

The microcontroller is an AT89S52 and the oscillator is running at 16MHz.

\$\endgroup\$
3
  • 2
    \$\begingroup\$ It was common practice to use a single interrupt pin for multiple interrupts in small microprocessors and microcontrollers and let the interrupt handler work out which device caused the interrupt. \$\endgroup\$ Commented Jan 3, 2021 at 15:02
  • \$\begingroup\$ but how to use a single interrupt pin for multiple interrupts ? @PeterSmith \$\endgroup\$ Commented Jan 3, 2021 at 15:12
  • 1
    \$\begingroup\$ Why on earth you even need an interrupt at all? Does it matter if you detect flames with 1 microsecond or 1 second accuracy? \$\endgroup\$
    – Justme
    Commented Jan 3, 2021 at 15:50

1 Answer 1

1
\$\begingroup\$

One option is to use an I/O expander such as the MCP23017 or MCP23S17 (I²C or SPI). These chips can record an interrupt on any of 16 pins and report it over a single (additional) pin. Reading two 8-bit registers will tell you which of the 16 pins sent the interrupt. This chip is also available in an 8-port version (MCP23008 or MCP23S08).

\$\endgroup\$
4
  • \$\begingroup\$ MCP23017 or MCP23S17 don't exist in the ICs markets \$\endgroup\$ Commented Jan 3, 2021 at 15:22
  • \$\begingroup\$ @KiroloesAmir Check here, for example. \$\endgroup\$ Commented Jan 3, 2021 at 15:23
  • \$\begingroup\$ @AlexHajnal the link you suggest gives "0 results". Perhaps the parts are available in some countries, not in others? \$\endgroup\$ Commented Jan 3, 2021 at 16:03
  • \$\begingroup\$ @MathKeepsMeBusy Perhaps. Normally their site will optionally redirect to a local branch if you're not in the US. Given that Mouser is a US company it's prohibited from doing business with some countries (Iran, North Korea, etc.) by ITAR so might return no results for that country. Just conjecture on my part; the search gives the same results on a number of their sites (USA, France, Thailand, India, Estonia, Turkey, China). \$\endgroup\$ Commented Jan 3, 2021 at 16:10

Your Answer

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

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