【正文】
首 先應(yīng)該清楚, 在計(jì)分器電路的設(shè)計(jì)中,按十進(jìn)制進(jìn)行加減分操作的,當(dāng)出現(xiàn)時(shí)鐘信號(hào)上升沿 CLK 就可以完成對參賽者加減分操作。 譯碼模塊圖 在這個(gè)模塊中主要實(shí)現(xiàn)搶答過程中將 BCD 碼轉(zhuǎn)換成 7 段的功能。 9 WHEN OTHERS=DOUT7=0000000。 5 WHEN 0110=DOUT7=1011111。 1 WHEN 0010=DOUT7=1101101。 DOUT7: OUT STD_LOGIC_VECTOR(6 DOWNTO 0))。 ( 四 )譯碼模塊 VHDL 源程序 LIBRARY IEEE。 end case。 case count is when 00=y=a。)then if(count=10)then count=00。)then count=00。 architecture body_chooser of sjxz is signal count: std_logic_vector (1 downto 0)。 clk2,rst: in std_logic。 use 。 end one。 end if。 then if s=39。 then tb=0010。 p2:process(co,rst,s,stop,tb) begin if rst=39。 end if。 then if ta=0000 then ta=1001。 then co=39。 then ta=0000。 begin p1:process(clk,rst,s,stop,ta) begin if rst=39。 warn:out std_logic。 (二)計(jì)時(shí)模塊 VHDL 源程序 library ieee。 end process p2。 elsif (st=0010) then states=0010。 end if 。 ) then st(3)=39。 or st(1)=39。 or st(3)=39。139。139。139。 end if 。 or st(3)=39。)and not( st(0)=39。 if (s1=39。139。139。139。 elsif clk239。039。 tmp:out std_logic)。 use 。 框圖 加分 減分 圖 1 搶答器總體框圖 由主體電路和擴(kuò)展電路兩部分構(gòu)成,主體電路完成基本的搶答功能,即開始搶答后,當(dāng)選手按動(dòng)搶答鍵時(shí),能顯示選手的編號(hào),同時(shí)能封鎖輸入電路,禁止其他選手搶答。 設(shè)置一個(gè)計(jì)分電路,每組開始預(yù)置 100分,由主持人記分,答對一次加 10分,答錯(cuò)一次減 10分。 基本要求: 設(shè)計(jì)一個(gè)可容納 6組參賽的數(shù)字式搶答器,每組設(shè)一個(gè)按鈕,供搶答使用。當(dāng)主持人按下 “復(fù)位 ”按鈕,所有組的按鍵才可用。 主持人復(fù)位后,開始搶答,第一信 號(hào)鑒別鎖存電路得到信號(hào)后,有指示燈顯示搶答組別,揚(yáng)聲器發(fā)出 23秒的音響。本輪搶答完畢,主持人操作控制開