文件名称:Staircase-lighting
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2013-08-20
- 文件大小:
- 8kb
- 下载次数:
- 0次
- 提 供 者:
- 崔**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
程序功能:实现楼道间照明灯的方便控制,一个照明灯,在楼上和楼下各有一个(闭合式)开关控制。开关的闭合并不直接决定灯的亮灭,而开关状态的改变才是决定灯亮灭的关键。即不管两个开关当前的状态
如何,只要有一个开关状态发声变化,都会使照明灯在打亮或者熄灭两种状态间切换。比如当有人要上楼,若之前灯是灭的,在按下楼下开关后(此后开关为闭合状态),灯会打亮;当到楼上后,再按楼上开关,灯会熄灭。而当后来又有人上楼时,再按次楼下开关(此后开关为打开状态),灯同样会打亮;此试验中,用P1口相连的第一个led来模拟照明灯,而用s2和s3来模拟两个开关。注意,因为实际楼道中的
开关为闭合式的,而TX-1C的开关为反弹式的,所以实验时,请用手一直按着按键演示开关的闭合。-Program features: to achieve a convenient corridor between the lighting control, a lamp, in the upstairs and downstairs have a (Closed) switch. Switch closure does not directly determine the bright lights and the switch state changes is what determines the key lights off. That regardless of how the current state of the two switches, as long as there is an audible switch status changes, will cause the lights lit or extinguished in the switch between the two states. For example, when someone wants to go upstairs, if before the lights are off, and press the downstairs switch (thereafter switch is closed), the lamp lit when upstairs, press upstairs switch, the lamp goes out. And when later someone upstairs, then downstairs switch times (since the switch is open), the lamp will also be highlighted this test, the P1 port is connected with the first one led to simulate lighting, but with s2 and s3 to simulate two switches. Note that because the actual corridor-style switch is closed, while
如何,只要有一个开关状态发声变化,都会使照明灯在打亮或者熄灭两种状态间切换。比如当有人要上楼,若之前灯是灭的,在按下楼下开关后(此后开关为闭合状态),灯会打亮;当到楼上后,再按楼上开关,灯会熄灭。而当后来又有人上楼时,再按次楼下开关(此后开关为打开状态),灯同样会打亮;此试验中,用P1口相连的第一个led来模拟照明灯,而用s2和s3来模拟两个开关。注意,因为实际楼道中的
开关为闭合式的,而TX-1C的开关为反弹式的,所以实验时,请用手一直按着按键演示开关的闭合。-Program features: to achieve a convenient corridor between the lighting control, a lamp, in the upstairs and downstairs have a (Closed) switch. Switch closure does not directly determine the bright lights and the switch state changes is what determines the key lights off. That regardless of how the current state of the two switches, as long as there is an audible switch status changes, will cause the lights lit or extinguished in the switch between the two states. For example, when someone wants to go upstairs, if before the lights are off, and press the downstairs switch (thereafter switch is closed), the lamp lit when upstairs, press upstairs switch, the lamp goes out. And when later someone upstairs, then downstairs switch times (since the switch is open), the lamp will also be highlighted this test, the P1 port is connected with the first one led to simulate lighting, but with s2 and s3 to simulate two switches. Note that because the actual corridor-style switch is closed, while
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1、楼梯照明灯
.............\deng
.............\deng.LST
.............\deng.M51
.............\deng.OBJ
.............\deng.Opt
.............\deng.Uv2
.............\deng.c
.............\deng.hex
.............\deng.lnp
.............\deng.plg
.............\deng_Opt.Bak
.............\deng_Uv2.Bak