登录
首页 » c » 单片机彩色旋转灯

单片机彩色旋转灯

于 2022-07-15 发布 文件大小:51.91 kB
0 238
下载积分: 2 下载次数: 1

代码说明:

D1~D8 八个发光二极管构成彩色旋转灯,D9~D13 为档位指示灯,一档旋转速度最慢(周期1s,D13 亮),二档较快(周期0.8s,D12 亮),三档更快(周期0.6s,D11 亮),四档再快(周期0.4s,D10 亮),五档最快(周期0.2s,D10 亮)。四个按键KEY0-KEY1用于设定旋转方向为顺时针旋转或者逆时针旋转,KEY2-KEY3 用于增快或则减慢旋转速度。 按键扫描的方式可以采用前面示例程序中的方法:线反转法或行扫描法。可以用汇编语言实现,也可以用C 语言实现。建议如前面示例所示,汇编采用行扫描法,C 语言用线反转法。程序控制流程是:首先初始化设置默认运行参数,然后读取按键,识别键码,并根据键码的不同执行运行参数调整,最后根据当前的运行参数执行发光二极管D1-D8 的轮流旋转。按键的识别中的键码可以根据图3.11 中的连接情况,总结出其键值表,速度的控制通过控制调用延时程序的次数来决定。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 02-Computer-System-2rd.pdf
    深入理解计算机系统第二版中文,基于c语言理解计算机架构(Thorough understanding of computer systems in the second edition of the Chinese language, based on C language understanding of computer architecture)
    2016-07-16 21:35:22下载
    积分:1
  • 基于单片机的流水灯设计
    基于单片机的流水灯设计,实现led灯一次点亮Based on MCU water lamp design, to achieve a LED lamp lit
    2023-08-03 16:40:06下载
    积分:1
  • hog
    这是用于提取图片的hog特征的,是在VS环境下配置opencv库实现的,希望对你有用(This is the picture of the hog for extracting feature is the VS environment configuration opencv library to achieve, and I hope useful to you)
    2013-07-07 10:45:29下载
    积分:1
  • CMPP3.ISMG
    cmpp2.0协议 开发详解 cmpp3.0协议 开发详解 (cmpp open )
    2013-05-17 15:29:43下载
    积分:1
  • Learning_OpenCV
    这本书非常适合入门Opencv,主要的代码和规范都是1.0版本的,并且适合作为一个图像处理和计算机视觉的参考资料(This book is ideal for entry Opencv, are the main code and version 1.0 specification, and is suitable as an image processing and computer vision reference)
    2015-10-13 15:14:42下载
    积分:1
  • 单片机 三轴地磁传感器
    三轴地磁传感器 LCD液晶显示屏显示 三轴地磁传感器 LCD液晶显示屏显示 三轴地磁传感器 LCD液晶显示屏显示 三轴地磁传感器 LCD液晶显示屏显示 三轴地磁传感器 LCD液晶显示屏显示 三轴地磁传感器 LCD液晶显示屏显示 三轴地磁传感器 LCD液晶显示屏显示 三轴地磁传感器 LCD液晶显示屏显示 
    2022-04-29 15:21:29下载
    积分:1
  • 这是一个在VS2003上边写的打印的源代码,通过简单的程序,提供了打印文档常用的方法,可以作为C#初学者一个很好的参考程序,代码不复杂,但是比较容易看懂。...
    这是一个在VS2003上边写的打印的源代码,通过简单的程序,提供了打印文档常用的方法,可以作为C#初学者一个很好的参考程序,代码不复杂,但是比较容易看懂。-This is a VS2003 upside in the Print write the source code, through a simple procedure Print the document provides a method commonly used as a beginners C# good reference procedure code is not complicated, But relatively easy to understand.
    2022-05-08 15:53:53下载
    积分:1
  • Hashi游戏
    复现康斯的Hashi游戏,同时有自动解决算法,采用最裸的dfs,能够保证有解。也能有自定义地图的模式,能够自定义地图。
    2022-05-28 00:06:31下载
    积分:1
  • gjwnm
    非归零型差分相位调制信号建模与仿真分析 ,能量熵的计算,包含位置式PID算法、积分分离式PID。( NRZ type differential phase modulation signal modeling and simulation analysis, Energy entropy calculation, It contains positional PID algorithm, integral separate PID.)
    2017-05-10 23:15:24下载
    积分:1
  • control
    说明:  根据数据动态生成button按钮或者自定义控件,测试中生成五个label,分别点击不同的label,在panel中根据数据生成不同的button ,并且按照一定的规律进行排列(According to the data, the button button or custom control is generated dynamically. In the test, five labels are generated, and different buttons are generated by clicking on different labels. In the panel, different buttons are generated according to the data and arranged according to certain rules.)
    2020-06-18 21:00:01下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载