返回

【51单片机】【STC89C52(A2版)】2-4LED流水灯PLUS

发布时间:2023-02-12 03:14:18 271

#include

void Delay1ms(unsigned int xms)  //@12.000MHz

{

unsigned char i, j;

while(xms)

{

 i = 2;

j = 239;

do

{

 while (--j);

} while (--i);

 xms--;

}

}

 

void main()

{

while(1)

{

 P2=0XFE;//1111 1110

 Delay1ms(1000);

 P2=0XFD;//1111 1101

 Delay1ms(5000);

 P2=0XFB;//1111 1011

 Delay1ms(1200);

 P2=0XF7;//1111 0111

 Delay1ms(100);

 P2=0XEF;//1110 1111

 Delay1ms(1100);

 P2=0XDF;//1101 1111

 Delay1ms(500);

 P2=0XBF;//1011 1111

 Delay1ms(300);

 P2=0X7E;//0111 1111

 Delay1ms(700);

}

}

特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报
评论区(0)
按点赞数排序
用户头像
精选文章
thumb 中国研究员首次曝光美国国安局顶级后门—“方程式组织”
thumb 俄乌线上战争,网络攻击弥漫着数字硝烟
thumb 从网络安全角度了解俄罗斯入侵乌克兰的相关事件时间线