Kalyan Kumar Penujeevi

Using all the Output compare and Overflow timer Interrupts at a time

Discussion created by Kalyan Kumar Penujeevi on Apr 7, 2006
Latest reply on Apr 23, 2007 by PsychoDebugger
Hi everyone,
i'm working with MC9S12NE64 processor.
right now i'm facing some problem using the timers.
i'm not facing any problem using all the output compare timers (TC4, TC5,TC6 and TC7) together.
but, once i use Overflow timer (Standard overflow timer), the processor is behaving strangely. the Timer overflow is not occuring at the right time.
to give more info on the problem;-
i'm not programming the TCNT register. and i'm installing the Interrupt handler for the same and assigning TSCR2 = 0x80 and TSCR1 = 0x90.
and i'm installing all the handlers for output compare interrupts (12,13,14,15 interrupt vectors) and setting TIOS = 0xF0. in the ISR of individual output compare ports, i'm assigning some value + TCNT. that is for example
                   TC4 = 0x1DFC + TCNT.
                     TC5 = 0x1DFC + TCNT.
                    TC6 = 0x1DFC + TCNT.
                   TC7  = 0x1DFC + TCNT.
please let me know if i'm not doing any thing correctly.
and tell me if i can simultaniously use all the output compare timers as well as overflow timer.