| 
 
| 79F里面的定时器0设置5ms问题
 
 频率按照9.8304M计算吗?5ms程序这样写可以吗?void initTimer(void) //5ms 中断
 
 {
 
 TMOD=0x1;
 
 TH0=0x40;//65536-49152=16384
 
 TL0=0x00;
 
 TR0=1;
 
 ET0=1;
 
 Key5msCounter=0;
 
 }
 
 void timer0(void) interrupt 1
 
 {
 
 TH0=0x40;
 
 TL0=0x00;
 
 Key5msCounter++;
 
 //add your code here.
 
 }
 | 
 |