Location:
Search - data6-10
Search list
Description: 先初始化各芯片,包括8233接二极管,8253接1MHZ频率,数据口放入0C350H,8259用IRQ3等;然后,开中断,等待脉冲中断。一次脉冲会在DATA6中记录,满20次脉冲表明过了1秒钟,此时,LED更新时间,中断处理程序用来实现LED显示的控制和状态是否要改变的判断;WATING程序段用来实现二极管的显示以及是否进入3秒以内,若小于等于3秒,则调用闪烁程序。
设置DI作为变量保存状态2到状态9执行一次的循环次数,循环一次,DI就自减1,若DI不为0,则跳转到状态2重复执行,若DI减为0,则跳转到状态10,即进入夜间模式。
夜间模式执行完之后,进入状态1,完成红绿灯白天工作的初始化,往下执行。
运行过程:
先全黄灯亮5s,初始化;东西绿灯,南北红灯 10s 东西绿灯+红灯,南北红灯 10s 东西绿灯+黄灯,南北红灯 5s 东西黄灯,南北红灯 5s;东西红灯,南北绿灯 10s 东西红灯,南北绿灯+红灯,10s 东西红灯,南北绿灯+黄灯 5s 东西红灯,南北黄灯 5s;全黄灯,夜间, 5s 全黄灯 5s,初始化;……
-Sorry,I am not good at English!!
Platform: |
Size: 4096 |
Author: linjie |
Hits:
Description: 《把脉VC++》源代码6--10章。作者从事VC++开发近10年,对各个技术都有深刻的理解;全面性:涵盖VC++开发的各个方面,对高级开发技术也作了简单的介绍。-" Pulse VC++" source code 6- 10 chapters. On VC++ development in the past 10 years, and have a deep understanding of various technology comprehensive: VC++ development covering all aspects of the development of the advanced technology also made a brief introduction.
Platform: |
Size: 25256960 |
Author: lbo |
Hits:
Description: 掌握时序电路的设计方法
掌握密码检测电路的设计完成密码检测电路的Verilog程序-module mimajianceqi(clock,reset,data1,data2,data3,data4,data5,data6,data7,data8,data_out)
input clock,reset,data1,data2,data3,data4,data5,data6,data7,data8
output data_out
reg data_out
reg[15:0] state
parameter
start_s=16 h0000,
first_s=16 h0001,
second_s=16 h0010,
third_s=16 h0011,
fourth_s=16 h0100,
fifth_s=16 h0101,
sixth_s=16 h0110,
seventh_s=16 h0111,
last_s=16 h1000
always@(posedge clock)
if(!reset)
begin
state<=start_s
data_out<=0
end
else
case(state)
start_s:
begin
data_out<=0
if(data6==1)
state<=first_s
else
state<=start_s
end
first_s:
begin
data_out<=0
if(data4==1)
state<=second_s
else
state<=start_s
end
second_s:
begin
data_out<=0
if(data8==1)
state<=third_s
else
state<=start_s
end
third_s:
begin
data_out<=0
if(data6==1)
state<=fourth_s
Platform: |
Size: 135168 |
Author: 任梦婕 |
Hits: