文件名称:traffic-lights
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 2kb
- 下载次数:
- 0次
- 提 供 者:
- Aaron*****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
交通灯课程设计,每次只有一个按键有作用,其余的按键使用前应使单片机复位.按下K1键,数码管后两位0~59计数,满60向高两位数码管进位,高两位范围也是0~59,同时有流水灯,再按K1键则转为只有一个数码管显示0~9,再按键则循环.
按下K2键,数码管后两位0~59计数,满60向高1位数码管进位,高1位范围是0~9,过段时间再按K2键则数码管灭.按下K3键,数码管后两位0~59计数,满60重新开始计数,有流水灯过段时间再按K3键则数码管灭.按下K4键,将显示交通灯的程序,数码管自然分为两组,倒计时计数依次红20秒--->黄灯闪5秒---->绿灯20秒--->循环.
-Curriculum design of traffic lights, each time there is only one key role, the rest of the keys to microcontroller reset before use. Press K1 key, the digital two 0 to 59 after the count, over 60 to carry high the two digital, high-two Bit range is 0 to 59, while a water lights, then K1 is only one key is converted to digital display 0 to 9, and then key the loop.
Press the K2 key, the digital two 0 to 59 after the count, over 60 to the high carry a digital tube, high a range of 0 to 9, over time and then key the K2 LED off. Press K3 key , The digital count of 0 to 59 after two, over 60 to start counting, over time water and then lights the LED off key K3. Press the key K4, the program will display traffic lights, digital tubes naturally divided into two Group, followed by red for 20 seconds countdown count--->----> green light yellow light flashes 5 seconds 20 seconds---> cycle.
按下K2键,数码管后两位0~59计数,满60向高1位数码管进位,高1位范围是0~9,过段时间再按K2键则数码管灭.按下K3键,数码管后两位0~59计数,满60重新开始计数,有流水灯过段时间再按K3键则数码管灭.按下K4键,将显示交通灯的程序,数码管自然分为两组,倒计时计数依次红20秒--->黄灯闪5秒---->绿灯20秒--->循环.
-Curriculum design of traffic lights, each time there is only one key role, the rest of the keys to microcontroller reset before use. Press K1 key, the digital two 0 to 59 after the count, over 60 to carry high the two digital, high-two Bit range is 0 to 59, while a water lights, then K1 is only one key is converted to digital display 0 to 9, and then key the loop.
Press the K2 key, the digital two 0 to 59 after the count, over 60 to the high carry a digital tube, high a range of 0 to 9, over time and then key the K2 LED off. Press K3 key , The digital count of 0 to 59 after two, over 60 to start counting, over time water and then lights the LED off key K3. Press the key K4, the program will display traffic lights, digital tubes naturally divided into two Group, followed by red for 20 seconds countdown count--->----> green light yellow light flashes 5 seconds 20 seconds---> cycle.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
traffic lights.c