#include <REGX52.H>标签:P2,do,LED,--,STC89C52,void,Delay500ms,while,闪烁 From: https://blog.51cto.com/nclx/5806273
#include <INTRINS.H>
void Delay500ms() //@12.000MHz
{
unsigned char i, j, k;
_nop_();
i = 4;
j = 205;
k = 187;
do
{
do
{
while (--k);
} while (--j);
} while (--i);
}
void main()
{
while(1)
{
P2 = 0xFE;
Delay500ms();
P2 = 0xFF;
Delay500ms();
}
}