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

Timer 0 interrupt not getting triggered

Hi,
I tried this example but the isr doent seem to be getting executed.

In the isr i m calling a function to display on 7-segment displays.
Otherwise the normal program flow is based on Receiving and Sending data on UART0(using timer1 in 8-bit auto-reload for 9600 baud generation)

Parents
  • "there might not be a need to call display() in an ISR...or rather it is not recommended..."

    I suspect that it is both not recommended and not needed!

    "the method being used as of now(the code i posted) isnt the best way to do it, isnt it?"

    Clearly not - as it doesn't work!

    "An ISR for serial interrupt which will be responsible for interpreting the data received and putting it into the display_array"

    No - you've missed the point!

    In general, an ISR should not interpret the data at all!
    Simply receive and buffer it.
    All interpretation and handling for display should generally be outside the ISR

    Take a look at the interrupt-driven serial IO examples in the Downloads area...

Reply
  • "there might not be a need to call display() in an ISR...or rather it is not recommended..."

    I suspect that it is both not recommended and not needed!

    "the method being used as of now(the code i posted) isnt the best way to do it, isnt it?"

    Clearly not - as it doesn't work!

    "An ISR for serial interrupt which will be responsible for interpreting the data received and putting it into the display_array"

    No - you've missed the point!

    In general, an ISR should not interpret the data at all!
    Simply receive and buffer it.
    All interpretation and handling for display should generally be outside the ISR

    Take a look at the interrupt-driven serial IO examples in the Downloads area...

Children
No data