at89c51简单编程
时间:10-02
整理:3721RD
点击:
单键控制单灯亮灭
#include<reg51.h>
sbit LED_L=P1^0;
sbit S_L=P3^0;
void delay(unsigned int i)
{
unsigned int k;
for (k=0;k<i;k++);
}
void main()
{
bit c;
while(1)
{c=S_L;
LED_L=c;
delay(20000);
LED_L=1;
delay(20000);}
}
#include<reg51.h>
sbit LED_L=P1^0;
sbit S_L=P3^0;
void delay(unsigned int i)
{
unsigned int k;
for (k=0;k<i;k++);
}
void main()
{
bit c;
while(1)
{c=S_L;
LED_L=c;
delay(20000);
LED_L=1;
delay(20000);}
}
我有12864电子钟的套件需要不,只要70RMB,可以下载程序学习,当电子钟用,PCB板与12864液晶尺寸一样大,非常美观的。我QQ:176798246