This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

P89LPC932 External Interrupt 0

Hi, I need to use the external interrupt 0
on the P89LPC932. I know I need to set up the register
TCON = 0x01 for falling edge detection
and then set the P1.3 as an input. and the ISR is number 0. But this interrupt pin active low. This means that a low input like ground will generate the interrupt, even if the micro is sleeping. I tried it this way and it did not work. Do you see anything wrong or missing here? thank you

Parents
  • Why do I need an EA if I already set the
    external interrupt in this function.
    Also, I put a for ever loop in this same function.

    //Initialize INT0 as edge triggered
    void Pulses_received(void)
    {
    IT0 = 1; //pulses will be edge triggered
    EX0 = 1;
    }

    //Initialize INT0 as edge triggered
    void Pulses_received(void)
    {
    IT0 = 1; //pulses will be edge triggered
    EX0 = 1;
    while(1);
    }
    please make comments. about the loop and the
    EA.
    Thank you.

Reply
  • Why do I need an EA if I already set the
    external interrupt in this function.
    Also, I put a for ever loop in this same function.

    //Initialize INT0 as edge triggered
    void Pulses_received(void)
    {
    IT0 = 1; //pulses will be edge triggered
    EX0 = 1;
    }

    //Initialize INT0 as edge triggered
    void Pulses_received(void)
    {
    IT0 = 1; //pulses will be edge triggered
    EX0 = 1;
    while(1);
    }
    please make comments. about the loop and the
    EA.
    Thank you.

Children