- UID
- 132976
- 性别
- 男
|
使用PE的TimeInt来做很简单呀.调用时延迟时间n.....
unsigned int time ;
void Delay(unsigned int n) {
unsigned int stopTime ;
stopTime = time + n ;
while(stopTime != time );
}
中断服务程序:
void TI1_OnInterrupt(void)
{
/* Write your code here ... */
time++ ;
CRGFLG = 0x80 ;
}
|
|