cpp
直接写
#include "reg52.h"
void main()
{
unsigned char wei=0;
unsigned int Ys=47474;
while(1)
{
if(--Ys==0)
{
switch(++wei)
{
case 1:P0=24; break;
case 2:P0=36; break;
case 3:P0=66; break;
default: P0=129;break;
}
if(wei==4)wei=0;
Ys=47474;
}
}
}