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 handling

Hello,

I need some help with the interrupt handling on a C-167 controller. In this case, the timer T3 is started (in Timer Mode) and works.
The period time is about 1s, in this cycle comes the reset from the watchdog.. So, there is no access to the interrupt routine.
See someone my mistake or the missing thing?

Dietmar


....
/* set Timer und Interrupt Register */
DP3_3 = 1;
T3IC = 0x44;
T3 = 0x0;
IEN = 1;
T3CON = 0x0646; /* start */
....



#include <reg167.h> /* special function register 80C167 */


void timer(void) interrupt 0x23 {


P3_2 = !P3_2;

}

Parents
  • Hi,

    In your code you are not assigning the reload value i.e timer value of 1s to the timer.


    What I mean to say is you have to assign the 1s timer value to T3 data register.

    some thing like T3=0xCA;

    Then after timer starts ,it completes the timer value and generates the timer interrrupt.

    Hope this will solve your problem.


    Madhu.

Reply
  • Hi,

    In your code you are not assigning the reload value i.e timer value of 1s to the timer.


    What I mean to say is you have to assign the 1s timer value to T3 data register.

    some thing like T3=0xCA;

    Then after timer starts ,it completes the timer value and generates the timer interrrupt.

    Hope this will solve your problem.


    Madhu.

Children