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 2 interrupt in 80C517A

Dear All,
I am a newbie
Could you give me advice how to configure / initialize timer 2 in 517A so it will generate interrupt every 1 ms with 11.0592MHz crystal. I cannot see clearly in the datasheet of 517A how to configure this timer. There is no TR2 register like in T0 and T1 and no such TMOD. I try the code below in the initialization, but I got interrupt much faster (more than 10 KHz):

 
 TH2   = 0xFC;
 TL2   = 0x67;
 T2CON   &= 0xFD;
 T2CON   |= 0x04;
 IP1   |= 0x20;
 IP0   &= ~0x20;
 ET2   =  1;