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 initialization problem

Hello,

I want to use the Timer 0 on the C167 in a program. The initialization is:

void initTimer(INT16U reloadVal) {
      T0REL = reloadVal;
      T0    = reloadVal;
      T01CON= 0x0042;   /* Prescalar = 32, Timer Mode, Timer enabled */
      T0IC  = 0x007C;   /* T0IE = 1 ILVL=15 GLVL=0 */
}

Everything works fine in the simulation. But when i want to debug the program with the Keil-Monitor 166 Driver the program stops when setting the T0IC.
What can be the problem?

Thanks,
Nora

0