例12数字钟设计及显示 设计要求 1、具有时、分、秒,计数及数码管 显示功能,以24小时循环计时。 2、具有清零,调节小时、分钟功能
1 例12 数字钟设计及显示 设计要求: 1、具有时、分、秒,计数及数码管 显示功能,以 24 小时循环计时。 2、具有清零,调节小时、分钟功能
实验系统箱中8位数码管的连接关系: 日H 7eg6.0] 选择信号sel[2.0]
2 实验系统箱中8位数码管的连接关系: 7seg[6..0] 选择信号 sel[2..0]
顶层设计文件: G1 MAX+plus II-h: \lecture\experiment\clock\clock- [clock. gdf- Graphic Editor A MAX+plus II Eile Edit yiew Symbol Assign Utilities Options window Help 口圖刍剧幽回炤△國囫卧為圖画图武會雷Aal SECOND o吕婴, sEc⊥3..o RESET SEc2[3.o a UX61Sc∩N CLKSCAN IN工【3,,。 H工NUTE oDT【3..o IN3【3.。】sEL[己 sEL【2.0 RESET MIN≥【3.,。 Ns【3.. HOUR SEGMENT7 DATAC3-.O DOUT 7SEG[6 圃开叫国浏览一E,xtx1…图年K可画1940
3 顶层设计文件:
秒计数设计文件: MAX+plus II-f: \ dh\mp2 \lecture\clock\second-[second, vhd- Text Editor] R MAX+plus I Ele Edt Templates Assign Utilties options window Help 口哆匈属N△囫画B感為画武會雷 Courier New,4B運 library ieee use ieee std logic 1164.alli use ieee. std logic unsigned alli entity second is port(clk, reset: in std logic secl, sec2: out std logic vector (3 downto 0)i carry: out std logic)i end secondi architecture rtl of second is signal secl t, sec2 t: std logic vectoR (3 downto o)i begin I Line 14[ Col 27 INSI
4 秒计数设计文件:
秒计数设计文件(续): WiMAX+plus II-f:\(dh(mp2 \lecture( clock(second-[second,whd-Text Editor] FR MAX+plus Il Ele Edit Iemplates Assign titles options window Help 口舀△囫郾即感囟丛盈国画国武留 ourierNew24 process(clk, reset egin if reset=1 then sec1t<="0000"; sec2t<="0000"; elsif clki event and clk=1 then if sec1 t=1001 then sec1t<="0000 if sec2 t=0101 then sec2t<="0000"; lse sec2 t<=sec2 t+li end ifi else secl t<=secl t+l I Line 14 I Col 27 INS 4I
5 秒计数设计文件(续):