可以实行连加操作及数码管显示,数码管一共六位 因此可以对6位数字进行运算 精确度很高 里面的对应程序有消抖方法很巧妙,而且利用中断实行精确时间的控制
仿真原理图如下(proteus仿真工程文件可到本帖附件中下载)
单片机源程序如下:
- /* Main.c file generated by New Project wizard
- *
- * Created: 周二 四月 17 2018
- * Processor: 80C51
- * Compiler: Keil for 8051
- */
- #include <reg51.h>
- #include <stdio.h>
- void main(void)
- {
- // Write your code here
- while (1)
- ;
- }
复制代码
所有资料51hei提供下载:
加法.rar
(413.08 KB, 下载次数: 18)
|