CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - traffic light asm
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - traffic light asm - List
[
Other Embeded program
]
U51asm
DL : 0
交通灯: 1. 因为本设计是交通灯的控制,所以要先了解实际交通灯的变化规律。假设一个十字路口为东西南北走向。初始状态0为东西红灯,南北红灯。然后转状态1南北绿灯通车,东西红灯。过一段时间转状态2,南北绿灯闪几次转亮黄灯,延时几秒,东西仍然红灯。再转状态3,东西绿灯通车,南北红灯。过一段时间转状态4,东西绿灯闪几次转亮黄灯,延时几秒,南北依然红灯。最后循环至状态1。 2. 双色LED是由一个红色LED管芯和一个绿色管芯封装在一起,公用负端。当红色正端加高电平,绿色正端加低电平,红灯亮;红色正端加低电平,绿色正端加高电平,绿灯亮;两端都加高电平,黄灯亮。 急救车和交通灯: 中断服务程序的关键是:1. 保护进入中断时的状态,并在推出中断之前恢复进入时的状态;2. 必须在中断程序中设定是否允许中断重入,即设置EX0位。 本设计使用了INT0中断,一般中断程序进入时应保护 PSW,ACC以及中断程序使用但非其专用的寄存器。本设计中的INT0程序保护了PSW,ACC,2等三个寄存器并且在退出前恢复了这三个寄存器。另外中断程序中涉及到关键数据的设置时应关中断,及设置时不允许重入。本设计中没有涉及这种情况。 name:trled1.asm trled2.asm-traffic lights : 1. Because of the design of the traffic lights, so there must first understand the traffic lights change. Assuming a crossroads for the east-west north-south. Initial state of things 0 red light, red light north-south. Then the state opening of a north-south green, red things. For a period of time to state 2-green flashing yellow light switch several times, a few seconds delay, things are still red. Three sub-state, opening things green, red light north-south. For a period of time to state four, several things turn green blinking yellow light, a few seconds delay, the North and the South is still red. The last cycle to a state. 2. Two-color LED is a red LED tube core and a core package of green together, the common negative side. When the red is added to I-Greenpeace-Canad
Date
: 2025-12-26
Size
: 2kb
User
:
孙菱蔚
[
Other Embeded program
]
J32-3320_
DL : 0
IO程序 - 交通灯演示程序,采用中断驱动模式。① 南北路口的绿灯,东西路口的红灯同时亮30秒。 ② 南北路口的黄灯闪烁3次,同时东西路口红灯继续亮。 ③ 南北路口的红灯,东西路口的绿灯同时亮30秒。 ④ 南北路口的红灯继续亮。同时东西路口的黄灯闪烁3次。 ⑤ 转 ① 重复注:黄灯的每次闪烁亮0.5秒,熄0.5秒。- The IO procedure- traffic light demonstration program, uses the severance actuation pattern. (1) North and south street intersection green light, at the same time thing street intersection red candle bright 30 seconds. (2) north and south street intersection yellow light glitters 3 times, simultaneously the thing street intersection red candle continues brightly. (3) north and south street intersection red candle, at the same time thing street intersection green light bright 30 seconds. (4) north and south street intersection red candle continues brightly. Simultaneously the thing street intersection yellow light glitters 3 time. (5) revolution of (1) redundant note: The yellow light each time glitters the bright 0.5 second, extinguishes for 0.5 second.
Date
: 2025-12-26
Size
: 35kb
User
:
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.