多功能电子时钟数字系统课程设计设计实验报告(编辑修改稿)内容摘要:
_h:out std_logic_vector(3 downto 0))。 end entity。 24 architecture behav of trans is signal m,n:integer range 9 downto 0。 begin m=num/10。 n=num rem 10。 num_l=conv_std_logic_vector(n,4)。 num_h=conv_std_logic_vector(m,4)。 end behav。 ( 6)动态显示模块 s e c o n d l[ 3 ..0 ]s e c o n d h [3 ..0 ]m in u te l[ 3 ..0 ]m in u te h [3 ..0 ]s u m [3 ..0 ]c lke n [3 ..0 ]s e g [3 ..0 ]f la gs h o win s t8 library ieee。 use。 entity show is port(secondl,secondh,minutel,minuteh:in std_logic_vector(3 downto 0)。 sum:in std_logic_vector(3 downto 0)。 clk:in std_logic。 en:out std_logic_vector(3 downto 0)。 25 seg:out std_logic_vector(3 downto 0)。 flag:out std_logic)。 end entity。 architecture behav of show is begin process(clk) variable counter:integer range 0 to 3。 begin if(clk39。 event and clk=39。 139。 ) then if(counter=3) then counter:=0。 else counter:=counter+1。 end if。 end if。 case counter is when 0 = if(sum=0110)then 26 flag=39。 139。 else flag=39。 039。 end if。 en= 0111。 seg=minuteh。 when 1 = if(sum=0110)then flag=39。 039。 else flag=39。 139。 end if。 en= 1011。 seg=minutel。 when 2 = if(sum=0110)then flag=39。 139。 else flag=39。 039。 end if。 en= 1101。 27 seg=secondh。 when 3 = if(sum=0110)then flag=39。 039。 else flag=39。 139。 end if。 en= 1110。 seg=secondl。 when others=null。 end case。 end process。 end behav。 ( 7) 8 段数码管译码模块 f lagdis play er_enc ount [ 3. . 0]s ev en_s eg_input [ 7. . 0]c ount er_dis play erins t 3 library ieee。 use。 28 entity counter_displayer is port(flag:in std_logic。 displayer_en:in std_logic。 count:in std_logic_vector(3 downto 0)。 seven_seg_input:out std_logic_vector(7 downto 0))。 end counter_displayer。 architecture behav of counter_displayer is signal seven_seg_input_reg:std_logic_vector(7 downto 0)。 begin display:process(displayer_en,count) begin if displayer_en=39。 039。 then if(flag=39。 139。 ) then case count is when0000=seven_seg_input_reg=00000010。 when0001=seven_seg_input_reg=10011110。 when0010=seven_seg_input_reg=00100100。 when0011=seven_seg_input_reg=00001100。 when0100=seven_seg_input_reg=10011000。 29 when0101=seven_seg_input_reg=01001000。 when0110=seven_seg_input_reg=01000000。 when0111=seven_seg_input_reg=00011110。 when1000=seven_seg_input_reg=00000000。 when1001=seven_seg_input_reg=00001000。 when1010=seven_seg_input_reg=00010000。 when1011=seven_seg_input_reg=11000000。 when1100=seven_seg_input_reg=01100010。 when1101=seven_seg_input_reg=10000100。 when1110=seven_seg_input_reg=01100000。 when1111=seven_seg_input_reg=01110000。 WHEN OTHERS =seven_seg_input_reg =00000010。 end case。 else case count is when0000=seven_seg_input_reg=00000011。 when0001=seven_seg_input_reg=10011111。 when0010=seven_seg_input_reg=00100101。 when0011=seven_seg_input_reg=00001101。 when0100=seven_seg_input_reg=10011001。 when0101=seven_seg_input_reg=01001001。 30 when0110=seven_seg_input_reg=01000001。 when0111=seven_seg_input_reg=00011111。 when1000=seven_seg_input_reg=00000001。 when1001=seven_seg_input_reg=00001001。 when1010=seven_seg_input_reg=00010001。 when1011=seven_seg_input_reg=11000001。 when1100=seven_seg_input_reg=01100011。 when1101=seven_seg_input_reg=10000101。 when1110=seven_seg_input_reg=01100001。 when1111=seven_seg_input_reg=01110001。 WHEN OTHERS =seven_seg_input_reg =00000011。 end case。 end if。 end if。 seven_seg_input=seven_seg_input_reg。 end process。 end behav。 ( 8)秒表模块 31 f lagrs tc lkf s ec ond[ 3. .0]s ec ond[ 5. .0]m inu te[ 3. .0]ccins t6 library ieee。 use。 use。 entity cc is port(flag,rst,clk:in std_logic。 fsecond:out std_logic_vector(3 downto 0)。 second:out integer range 63 downto 0。 minute:out std_logic_vector(3 downto 0))。 end entity。 architecture behav of cc is ponent count60ss is port(rst,clk:in std_logic。 num1:out std_logic_vector(5 downto 0)。 outp:out std_logic)。 end ponent。 ponent count10s is port(rst,clk,flag:in std_logic。 32 num1:out std_logic_vector(3 downto 0)。 outp:out std_logic)。 end ponent。 ponent rr is port(a:in std_logic_vector(5 downto 0)。 b: out integer ra。多功能电子时钟数字系统课程设计设计实验报告(编辑修改稿)
相关推荐
图 31单片机 STC89C52引脚图 引脚功能简介: 单片机的 40个引脚大致可分为 4 类:电源、时钟、控制和 I/O 引脚。 电源 ( 1) VCC— 芯片电源,接 5V; ( 2) VSS— 接地端; 时钟 XTAL XTAL2:晶体振荡电路反相输入和输出端。 控制线 (1)ALE/PROG:地址锁 存允许 /片内 EPROM 编程脉冲 ALE 功能:用来锁存 P0 口送出的低 8位地址
准 化的设计流程 Authorware 的门槛很低,因为 Authorware 是直接面向对象的图标化设计流程,启动 Authorware 进入程序主界面,在窗体左边的就是 Authorware 的图标栏,它上面 的图标即是 Authorware 流程线上的核心元素。 只要在流程线上添加各种各样的设计图标并进行相关属性设置,就可以实现复杂的功能。 ② 强 大 的交互能力 交互
增加运动种类,相信会在未来跑步机的发展中开辟出新的方向和道路。 2 辅助自行车工作原理及功能 辅助自行车工作原理 当前室内体育运动器械当众有模拟自行车骑行健身的体育器材。 如图所示,本设计即集成自行车功能在跑步机上,使用普通自行车与普通跑步机相结合即可达到专业运动设备的运动效果。 在普通跑步机的基础之上加装自行车扶手,适当加长跑步机的带长,一方面便于降低 骑行难度,另一方面增加部分安全措施
面波,变成只在一个平面上振动的波,称为偏振光。 偏振光只能通过相应方向的偏振玻璃,如果偏振玻璃的偏振方向和偏振光线的有一定的夹角,就会减弱偏振光强度,甚至偏振光无法通过。 如果大家对这方面有兴趣,可以参阅有关的大学物理书籍。 夹住液晶的两片偏振玻璃,假设为 a、 b,他们的偏振方向会设置为 90 度夹角。 光线通过 第一片偏振玻璃 a 后,假设这 X 方向偏振,通过液晶后,液晶通电流之后
阶段的负载 F=22105N,按此计算 A1 则 2232551**8*2110*40 22105211 cmmmpp FAb 液压缸直径 cmcmAD *44 1 由 A1=2A2 可知活塞杆直径 cmcmDd * 按 GB/T23481993 将所计算的 D 与 d 值分别圆整到相近的标准直径,以便采用标准的密封装置。 圆整后得 D=9cm,d=。
N Y N Y N Y 图 42 键盘扫描模块程序流程图 (3)判断按键是否释放。 首先要计算出闭合键的键值,然后对按键判断是否释放。 如果按键释放就等待;如果键已经释放,那么就再延时消抖。 (4)命令处理。 输入闭合键的键值后,程序自动实现该键已经设定的功能。 开始 是否有键按下 消抖 确实有键按下 判断并计算键号,执行相应命令 按键是否释放 返回 第四章 计算器的软件系统设计 16