Hi, I'm using Timer T6 to generate a clock for a device and I want to keep a count of these clock pulses. Also I want to use CC12 as positive edge interupt (P2.12). I have kept the priority of this interupt higher than that of the timer. I have pasted the code to achieve this below. My problem is that when I try to give interupt on P2.12, the CPU enters T6 interupt routine. Please can anyone help me solve this problem. Thanks and regards Sonali //------------------------------------------------ #include <stdio.h> #include <reg167.h> sbit ADC_CONV = P3^5; sbit ADC_BUSY = P2^12; unsigned int num = 0x00; void timer6(void) interrupt 0x26 { num++; } void adc976(void) interrupt 0x28 { ADC_CONV = 0; ADC_CONV = 1; } void main(void) { P2 = 0x0000; DP2 = 0x0000; P3 = 0xFFFF; DP3 = 0xFFFF; CC12IC = 0x46; CCM3 = 0x0001; T6 = 0x6768; CAPREL = 0xFFC3; T6CON = 0x8201; T6IC = 0x44; T6R = 1; IEN = 1; ADC_CONV = 0; ADC_CONV = 1; while(1) { ; } }