#include
sbit P1_1 = P1^1;
//定时器的初始化
void delay_1ms(void)
{
TMOD = 0x01;//采用16位计数器
TH0 = 0xFC;
TL0 = 0x18;
ET0 = 0;
TR0 = 1; //开启
while(!TF0);
TF0 = 0;
TR0 = 0;
}
void main(void)
{
while(1){
P1_1 = 1;
delay_1ms();
delay_1ms();
P1_1 = 0;
delay_1ms();
delay_1ms();
}
}
『本文转载自网络,版权归原作者所有,如有侵权请联系删除』