《多功能数字钟》EDA实验报告 下载本文

CASE SEC1 IS

WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN OTHERS=>T<=0; END CASE; END PROCESS;

--------------------------------------------------------------------- PROCESS(Clk,T) BEGIN

IF(Clk'EVENT AND Clk='1') THEN

Music_Count<=Music_Count+1;

IF(MIN10=\在59分50秒开始提示

IF((T MOD 2)=0) THEN --在偶数秒开始发声 SPK<=Music_Count(2); --嘀 ELSE

SPK<='0'; END IF;

ELSIF(MIN10=\THEN

SPK<=Music_Count(1); --嗒 ELSE

SPK<='0'; END IF; END IF; END PROCESS; PROCESS(Clk) BEGIN

IF(Clk1hz'EVENT AND Clk1hz='1') THEN

IF(MIN10=\AND MIN1=\AND SEC10=\THEN --在59分55秒开始提示

led_Count<=led_Count+1; ELSE

led_count<=\ END IF; END IF; END PROCESS;

4.3复位和时间调节功能

Clk1Hz<=Clk_Count1(13); PROCESS(Clk1Hz,S12) BEGIN

IF(S12='0') THEN --系统复位 SEC1<=\ SEC10<=\ MIN1<=\ MIN10<=\ HOUR1<=\ HOUR10<=\

ELSIF(Clk1Hz'EVENT AND Clk1Hz='1') THEN --正常运行 IF(S1='0') THEN --调节小时 IF(HOUR1=\ HOUR1<=\ HOUR10<=HOUR10+1;

ELSIF(HOUR10=\ HOUR1<=\ HOUR10<=\ ELSE

HOUR1<=HOUR1+1; END IF;

ELSIF(S2='0') THEN --调节分钟 IF(MIN1=\ MIN1<=\

IF(MIN10=\ MIN10<=\

4.4时间显示功能 PROCESS(led_count) BEGIN

CASE (led_count) IS

WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN OTHERS=>led_display<=\ END CASE; led<=led_display; END PROCESS;

-------------------------------------------------------------------------- PROCESS(SEG_SEL) BEGIN

CASE (SEG_SEL+1) IS

WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN OTHERS=>Disp_Temp<=SEC1; END CASE;

END PROCESS;

----------------------------------------------------------------------- --扫描累加

PROCESS(Clk) BEGIN

IF(Clk'EVENT AND Clk='1') THEN SEG_SEL<=SEG_SEL+1; Display<=Disp_Decode; END IF; END PROCESS;

--------------------------------------------------------------------------显示转换

PROCESS(Disp_Temp) BEGIN

CASE Disp_Temp IS

WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN \ WHEN OTHERS=>Disp_Decode<=\全灭 END CASE; END PROCESS; END ART;