#include <STC89C5xRC.H>
void Delay1ms(unsigned int xms)
{
unsigned char i, j;
while(xms)
{
i = 2;
j = 239;
do
{
while (--j);
} while (--i);
xms--;
}
}
void main()
{
if(P31==0)
{
Delay1ms(20);
while(P31==0)
Delay1ms(20);
P20=~P20;
}
}
标签:LED,--,STC89C52,51,unsigned,Delay1ms,while,20,xms From: https://blog.51cto.com/u_15865347/6025730