#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
void delay(uchar z)
{
unsigned int x,y;
for(x=0;x<z;x++)
for(y=0;y<110;y++);
}
sbit a=P1^0;
sbit b=P1^1;
sbit c=P1^2;
void main()
{
while(1)
{
if(b==1)
a=0;
delay(100);
a=1;
if(b==0)
c=0;
delay(100);
c=1;
}
}
上一篇:Ug帝國編程模板下一篇:編程背景的顏色變化