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

Interrupt

Hello guys, can I monitor interrupt0 of 8051 by any h/w means like by LED or something? I have connected RTC DS12887 IRQ to INT0 however I couldn't see logic 1 on DMM

Parents Reply Children
  • The interrupt output is open-drain, i.e. it will basically tristate when not signaling an interrupt. Have you remembered to connect a pull-up resistor?

  • no actually RTC gives interrupt only when current time matches with predefined/alarm time

    Ok, I've dug out the data sheet for the part, and if I understand it correctly, this statement is not correct. The part has three different interrupt sources that can all lead to IRQ being set to low (active).

    anyway the zero on IRQ of RTC stays only for short amount of time(transient)

    That is also incorrect, according to the data sheet IRQ stays low until the control register C is read.

    Oh, and make sure that the 8051 isn't pulling the port pin to low (i.e. don't set the latch for the pin to 0).

  • When no interrupts are present, IRQ levels used to be in high impedance state (mentioned in one of the datasheets) that explains why I couldn't get logic high on that line, am I correct?

    multiple number of interrupting devices can be connected to IRQ bus. The IRQ bus is open drain output and requires external pull up resistor

    So does it mean I need to include a pull up resistor on that line?

  • If your C51 provides internal pull-up, then you do not need to add an external pull-up resistor.

    But as mentioned by Christoph Franck: You must make sure that your C51 does not drive the signal low.

    The Dallas chip can only sink the signal to ground. Without the chip connected, the processor pin should be high. If it isn't, then your processor hasn't support for an internal pull-up, or you haven't correctly configured your processor to activate the pull-up. Or you have instructed the C51 to drive the signal low.

  • More from datasheet (generally everybody may know):-

    The IRQ pin is an active low output of the DS12887 which can be used as an interrupt input to a processor. The IRQ output remains low as long as the status bit causing the IRQ is present and corresponding interrupt enable bit is present.To clear the IRQ pin processor program generally reads the C register

    So does it mean I need to exclusively read C register even if I serve the IRQ interrupt

  • I don't need what you mean by "exclusively read".

    The chip can generate three different interrupts.

    How can you "service" an interrupt, unless you read the status register to check which interrupt source (or sources) that generated the interrupt?

    How do you expect the chip will know that you have "serviced" the interrupt if you have a one-way communication, i.e. you only let the interrupt line trig your ISR, but you do not perform any action to report back to the Dallas chip that it may deactivate the interrupt line?

  • Ya Westermark without connecting dallas chip 89c51 int0 pin is high
    but as soon as I connect IRQ of DS12887 to INT0 of at89c51 the signal goes down (low level) so what does it mean?

  • Ok so I'll try putting XBYTE[0x0C] in my interrupt routine.

    but I thought after servicing IRQ it would be ok no to read 0x0C

  • Even this routine doesn't trig ISR

  • So does it mean I need to exclusively read C register even if I serve the IRQ interrupt

    Your interrupt service routine (running on the 8051) needs to read the C register of the RTC chip. How to do this is described in the datasheet of the RTC.

  • Thanks guys for your valuable support - The project is working fine Just needed to do was read the register C of RTC on the occurrence of interrupt