文件名称:deng
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- 刘*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
实现楼道间照明灯的方便控制,一个照明灯,在楼上和楼下各有一个(闭合式)开关控制。
开关的闭合并不直接决定灯的亮灭,而开关状态的改变才是决定灯亮灭的关键。即不管两个开关当前的状态
如何,只要有一个开关状态发声变化,都会使照明灯在打亮或者熄灭两种状态间切换。
比如当有人要上楼,若之前灯是灭的,在按下楼下开关后(此后开关为闭合状态),灯会打亮;当到楼上后,
再按楼上开关,灯会熄灭。而当后来又有人上楼时,再按次楼下开关(此后开关为打开状态),灯同样会打亮;
此试验中,用P1口相连的第一个led来模拟照明灯,而用s2和s3来模拟两个开关。注意,因为实际楼道中的
开关为闭合式的,而TX-1C的开关为反弹式的,所以实验时,请用手一直按着按键演示开关的闭合。-Convenient control of the corridor lights, a lighting, upstairs and downstairs, one each (closed) switch control. The closure of the switch is not directly determine the bright lights off, lights off key change is the decision to switch state. That, regardless of the two switching current state, as long as there is a switch state sound changes will make the lights lit or extinguished switch between two states. For example, when someone upstairs before lights off downstairs switch is pressed (after the switch is closed), the lamp lit upstairs switch to the upstairs, and then will go out. While later upstairs, and then downstairs switch (after the switch is turned on), the lamp will also lit trial connected to the P1 port led lights to simulate, while s2 and s3 to simulate the two switches. Note that, because of the switch in the actual corridor closed, TX-1C switch for the rebound-experiment, hand hold the key demo switch closed.
开关的闭合并不直接决定灯的亮灭,而开关状态的改变才是决定灯亮灭的关键。即不管两个开关当前的状态
如何,只要有一个开关状态发声变化,都会使照明灯在打亮或者熄灭两种状态间切换。
比如当有人要上楼,若之前灯是灭的,在按下楼下开关后(此后开关为闭合状态),灯会打亮;当到楼上后,
再按楼上开关,灯会熄灭。而当后来又有人上楼时,再按次楼下开关(此后开关为打开状态),灯同样会打亮;
此试验中,用P1口相连的第一个led来模拟照明灯,而用s2和s3来模拟两个开关。注意,因为实际楼道中的
开关为闭合式的,而TX-1C的开关为反弹式的,所以实验时,请用手一直按着按键演示开关的闭合。-Convenient control of the corridor lights, a lighting, upstairs and downstairs, one each (closed) switch control. The closure of the switch is not directly determine the bright lights off, lights off key change is the decision to switch state. That, regardless of the two switching current state, as long as there is a switch state sound changes will make the lights lit or extinguished switch between two states. For example, when someone upstairs before lights off downstairs switch is pressed (after the switch is closed), the lamp lit upstairs switch to the upstairs, and then will go out. While later upstairs, and then downstairs switch (after the switch is turned on), the lamp will also lit trial connected to the P1 port led lights to simulate, while s2 and s3 to simulate the two switches. Note that, because of the switch in the actual corridor closed, TX-1C switch for the rebound-experiment, hand hold the key demo switch closed.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
deng.c