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
  • OK, you've got the 'pre' and '/pre' tags now, but don't you beleive in indentation for your code?
    eg,

    void display()
    {
       for( x=a; x>0; x-- )
       {
          P0 = disp[x];
          P2 = scan[x];  //3:8 decoding
       }
    }
    


    And a little whitespace can work wonders for legibility!

    Remember: don't use TABs to lay-out your code; use only spaces.
    (TABs are entirely unreliable)

Reply
  • OK, you've got the 'pre' and '/pre' tags now, but don't you beleive in indentation for your code?
    eg,

    void display()
    {
       for( x=a; x>0; x-- )
       {
          P0 = disp[x];
          P2 = scan[x];  //3:8 decoding
       }
    }
    


    And a little whitespace can work wonders for legibility!

    Remember: don't use TABs to lay-out your code; use only spaces.
    (TABs are entirely unreliable)

Children
No data