文件名称:LEDPMW
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- c*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
51单片机PWM 控制 LED 灯渐亮渐灭程序
利用定时器控制产生占空比可变的 PWM 波 按K1,PWM值增加,则占空比减小,LED 灯渐暗. 按K2,PWM值减小,则占空比增加,LED 灯渐亮。 当PWM值增加到最大值或减小到最小值时,蜂鸣器将报警 资源:p0口,8路指示灯。p1.4,p1.5亮度控制按键(端口按键)p3.7小喇叭报警-51 Single-chip PWM control of LED lights become bright procedures gradually eliminate the use of timer control variable PWM duty cycle generated wave by K1, PWM values increase, then decrease the duty cycle, LED lights dimming. By K2, PWM value decrease, then increase the duty cycle, LED lights become bright. When the PWM value to the maximum value or decrease to the minimum value, the buzzer will alarm resources: p0 mouth, 8-way light. p1.4, p1.5 brightness control button (port keys) p3.7 small speaker alarm
利用定时器控制产生占空比可变的 PWM 波 按K1,PWM值增加,则占空比减小,LED 灯渐暗. 按K2,PWM值减小,则占空比增加,LED 灯渐亮。 当PWM值增加到最大值或减小到最小值时,蜂鸣器将报警 资源:p0口,8路指示灯。p1.4,p1.5亮度控制按键(端口按键)p3.7小喇叭报警-51 Single-chip PWM control of LED lights become bright procedures gradually eliminate the use of timer control variable PWM duty cycle generated wave by K1, PWM values increase, then decrease the duty cycle, LED lights dimming. By K2, PWM value decrease, then increase the duty cycle, LED lights become bright. When the PWM value to the maximum value or decrease to the minimum value, the buzzer will alarm resources: p0 mouth, 8-way light. p1.4, p1.5 brightness control button (port keys) p3.7 small speaker alarm
(系统自动生成,下载前可以参看下载内容)
下载文件列表
LEDPMW.c