Hi all, I am using T2 and T3 timer with T3INT interrupt as below:
void init_T2(void) { T2 = 195; // for 10ms with 51,2 resolution T2CON = 0x0027; // reload, timer mode } void init_T3(void) { T3 = 195; // for 10ms with 51,2 resolution T3CON = 0x00C7; T3IC = 0x0030; // level 12, group 0 } interrupt (T3INT) void T3_ISR(void) { counter++; sec = counter/100; min = sec/60; tenth = sec/10; hundreth = sec/100; } void main(void) { init_T2(); init_T3(); IEN = 1; while(1) { } }
Hi all again, I found the reason why interrupt was not active:
void init_T3(void) { T3 = 195; // for 10ms with 51,2 resolution T3CON = 0x00C7; T3IC = 0x0030; // level 12, group 0 }