We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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;
Take a look at the following example program: http://www.keil.com/download/docs/80c517_timer2.zip.asp Jon
ic now...the TF2 should be cleared by ISR! and there is setting for T2CON Thanks Jon!