摘要:数码管从左向右依次显示1-6 #include<reg52.h>#include<intrins.h>#define uint unsigned int#define uchar unsigned charsbit D=P2^6;sbit W=P2^7;sbit D0=P1^0;uchar num; 阅读全文
posted @ 2018-09-27 23:38 孤鸿寄远 阅读(37) 评论(0) 推荐(0) 编辑
摘要:十六个数字循环显示 #include<reg52.h>#include<intrins.h>#define uint unsigned int#define uchar unsigned charsbit D=P2^6;sbit W=P2^7;uchar num;uint x,y,z;uchar c 阅读全文
posted @ 2018-09-18 13:09 孤鸿寄远 阅读(67) 评论(0) 推荐(0) 编辑
摘要:2、8个二极管来回亮,每次亮蜂鸣器滴滴两声; #include<reg52.h>#include<intrins.h>#define uint unsigned int#define uchar unsigned charuint x,y,z;uchar temp;sbit b=P2^3;void 阅读全文
posted @ 2018-09-06 17:12 孤鸿寄远 阅读(56) 评论(0) 推荐(0) 编辑
摘要:1、点亮发光二极管,8个发光管由上至下间隔1秒流动,其中每个管亮500没事, 灭500ms,亮时蜂鸣器响,灭时关闭蜂鸣器,一直重复下去 。 #include<reg52.h>#include<intrins.h>#define uint unsigned int#define uchar unsig 阅读全文
posted @ 2018-09-06 15:07 孤鸿寄远 阅读(78) 评论(0) 推荐(0) 编辑