static int count = 0;
void main(){
SMW = 1;
SMW = 0;
SMD = 1;
SMD = 0;
TMOD = 0x01;//T0定时器模式1
TL0 = 0xCC;
TH0 = 0xD4;
TR0 = 1;//开始计时
EA = 1;
ET0 = 1;//外部定时器中断开
while(1) {
}
}
void time_0() interrupt 1 using 1{
count++;
TL0 = 0xCC;
TH0 = 0xD4;
if(count == 500 ){
count = 0;
L7 = ~L7;
}
}
void main(){
SMW = 1;
SMW = 0;
SMD = 1;
SMD = 0;
TMOD = 0x01;//T0定时器模式1
TL0 = 0xCC;
TH0 = 0xD4;
TR0 = 1;//开始计时
EA = 1;
ET0 = 1;//外部定时器中断开
while(1) {
}
}
void time_0() interrupt 1 using 1{
count++;
TL0 = 0xCC;
TH0 = 0xD4;
if(count == 500 ){
count = 0;
L7 = ~L7;
}
}