新聞中心

EEPW首頁 > 消費(fèi)電子 > 設(shè)計(jì)應(yīng)用 > 基于VHDL語言的FPGA簡易數(shù)字鐘設(shè)計(jì)

基于VHDL語言的FPGA簡易數(shù)字鐘設(shè)計(jì)

作者: 時(shí)間:2012-09-18 來源:網(wǎng)絡(luò) 收藏

when 4 => shi = 1001100;

when 3 => shi = 0000110;

when 2 => shi = 0010010;

when 1 => shi = 1001111;

when 0 => shi = 0000001;

end case;

case feng_t is

when 9 => feng = 0000100;

when 8 => feng = 0000000;

when 7 => feng = 0001111;

when 6 => feng = 0100000;

when 5 => feng = 0100100;

when 4 => feng = 1001100;

when 3 => feng = 0000110;

when 2 => feng = 0010010;

when 1 => feng = 1001111;

when 0 => feng = 0000001;

end case;

case fens_t is

when 5 => fens = 0100100;

when 4 => fens = 1001100;

when 3 => fens = 0000110;

when 2 => fens = 0010010;

when 1 => fens = 1001111;

when 0 => fens = 0000001;

end case;

case shig_t is

when 9 => shig = 0000100;

when 8 => shig = 0000000;

when 7 => shig = 0001111;

when 6 => shig = 0100000;

when 5 => shig = 0100100;

when 4 => shig = 1001100;

when 3 => shig = 0000110;

when 2 => shig = 0010010;

when 1 => shig = 1001111;

when 0 => shig = 0000001;

end case;

case shis_t is

when 2 => shis = 0010010;

when 1 => shis = 1001111;

when 0 => shis = 0000001;

end case;

end process c;

end first;

和匯編有的一拼啊,呵呵,由于是新手,所以很多程序都帶有單片機(jī)的想法,其實(shí)和C、和單片機(jī)是兩種不同的、芯片,主要是要有并行思想和狀態(tài)機(jī)的概念,很遺憾我現(xiàn)在好像都沒有。

設(shè)置模式開關(guān)是sw01.、分鐘設(shè)置按鈕key01、key02 。


上一頁 1 2 下一頁

評(píng)論


相關(guān)推薦

技術(shù)專區(qū)

關(guān)閉