Microcontroller Interrupt from multiple sources

Discussion in 'General Electronics Chat' started by Enforcer83, Jun 29, 2012.

  1. Enforcer83

    Thread Starter Member

    Oct 29, 2010
    25
    0
    I got three devices that all are capable of an interrupt to a host MCU. Each device does something different and mostly involved with the power management side of the house. Two of the outputs are high when an interrupt is generated while the third is low when an interrupt is generated. I need to combine the signals so that when either of them changes state high to low for one devices and low to high for the other two, a "0" is sent to the microcontroller IRQ pin (see the below truth table)

    a b c | y
    0 0 0 | 0
    0 0 1 | 1
    0 1 0 | 0
    0 1 1 | 0
    1 0 0 | 0
    1 0 1 | 0
    1 1 0 | 0
    1 1 1 | 0

    I can implement it with two gates (nor and or) but would rather use one if at all possible. Is anyone aware of a single gate that produces this result?
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,440
    3,361
    IRQ input pins are usually ACTIVE LOW, i.e. the interrupt responds when the IRQ pin goes from high to low. The simplest way to have multiple interrupting sources is to make all sources generate an ACTIVE LOW signal via an open collector or open drain output driver.
    You can implement this using transistors or 7406 and 7407 type gates.
     
  3. bilal ahmed warraich

    New Member

    Sep 17, 2012
    1
    0
    i want to know about microcontroller instruction sets and i want to know how these instruction s work tell me some one if any one have answer for me thanks
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,440
    3,361
    You have just hijacked someone else's thread. Please start a new topic of your own.

    A microcontroller executes simple instructions.
    Here are some examples:

    MOVE A TO B
    ADD B AND A
    SUBTRACT B FROM A
    TEST IF A IS ZERO

    Complex programs are created using combinations of such simple instructions.
     
  5. WTP Pepper

    New Member

    Aug 1, 2012
    21
    6
    Keep it simple to reduce extra hardware and use a timer interrupt to poll the inputs. All inputs are fed to i/o and the TSR deals with the changes.
    At some point you are going have to read ABC so they will need i/o anyway.
    You can use crude delayed diode XORs, but I wouldn't bother.
     
  6. ssnyde

    New Member

    Apr 4, 2012
    19
    5
    If you can incur the latency of polling in a timer isr, I agree wth that suggestion. Otherwise you can implement that truth table with a single chip 74HC4075.
     
  7. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,387
    1,605

    y = not(a) * not(b) * c

    two inverters, one 3-input AND.

    If you demand a single IC solution then you would have to look hard for a multiplexer with a high on the selected output line.
     
  8. ssnyde

    New Member

    Apr 4, 2012
    19
    5
    You can do anything with nand or nor, they are universal and you get a few gates per chip...
     
Loading...