Skip to main content
Visitor II
February 16, 2004
Question

Interrupt Management

  • February 16, 2004
  • 2 replies
  • 662 views
Posted on February 16, 2004 at 08:40

Interrupt Management

    This topic has been closed for replies.

    2 replies

    Visitor II
    February 14, 2004
    Posted on February 14, 2004 at 08:09

    dear sir,

    i am working on a Application where i am counting a pulse in st72f264 microcontroller.This pulse is coming from another device to micro i/o pin.I am considering this pulse as an External Interrupt to micro.I am managing this thro MISCR register (i mean rising edge or falling edge).

    I have build another application named RTC using 16 bit timer output compare interrupt.Now i want to use these two types of interrupts in the same application.It should work like this....

    1)

    Whenever an external interrupt(PB3/OCMP2_A) comes i will increment a register and at the sametime a real time clock should be managed thro

    output campare interrupt option.I could not understand how these two interrupts can be managed at the same time?Because i have to check the Pulse count register after some amount of time based on RTC register(managed by outputcompare interrupt).

    2)

    Is it possible to use same pin as external interrupt pin and ouput compare pin

    pls can u explain it . help.

    Thanks & Regards,

    Arup
    Visitor II
    February 16, 2004
    Posted on February 16, 2004 at 08:40

    1/ First of all, these two interrupts have different interrupt vector addresses so there is no issue to handle them simultanously. You have to declare your pulse count register as volatile because you are modifying it inside the external interrupt service routine.

    2/ If the alternate function for the output compare pin is disabled by OCiE bit in the CR2 register you can use this pin as normal I/O pin. Please refer datasheet (Note#2 page 62/171).