单片机型号 STC89C516RD+
#include <REGX52.H>
#include <INTRINS.H>
void Delayms(unsigned int m)
{
unsigned int n;
for(n=0;n<m;n++){
unsigned char i, j;
_nop_();
i = 2;
j = 199;
do
{
while (--j);
} while (--i);
}
}
void main()
{
while(1){
P2_0=0;
Delayms(1000);
P2_0=1;
Delayms(1000);
}
}