EDA16x16点阵滚动+动画显示.docx

上传人:b****5 文档编号:7637513 上传时间:2023-05-11 格式:DOCX 页数:19 大小:62.63KB
下载 相关 举报
EDA16x16点阵滚动+动画显示.docx_第1页
第1页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第2页
第2页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第3页
第3页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第4页
第4页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第5页
第5页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第6页
第6页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第7页
第7页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第8页
第8页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第9页
第9页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第10页
第10页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第11页
第11页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第12页
第12页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第13页
第13页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第14页
第14页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第15页
第15页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第16页
第16页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第17页
第17页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第18页
第18页 / 共19页
EDA16x16点阵滚动+动画显示.docx_第19页
第19页 / 共19页
亲,该文档总共19页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

EDA16x16点阵滚动+动画显示.docx

《EDA16x16点阵滚动+动画显示.docx》由会员分享,可在线阅读,更多相关《EDA16x16点阵滚动+动画显示.docx(19页珍藏版)》请在冰点文库上搜索。

EDA16x16点阵滚动+动画显示.docx

EDA16x16点阵滚动+动画显示

四、课程设计的总体步骤

1、单个字符的显示(如:

黄):

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entityxianshiis

port(clk2:

instd_logic;

rck,sck:

outstd_logic;

si:

outstd_logic);

end;

architectureoneofxianshiis

signalsel:

std_logic_vector(3downto0);

signalq:

std_logic_vector(31downto0);

signali:

integerrange0to31;

signalcoi:

std_logic;

begin

process(sel,clk1)

begin

caseselis

when"0000"=>q<="00000100000000000111111111111111";

when"0001"=>q<="00000100000000011011111111111111";

when"0010"=>q<="00100100000000011101111111111111";

when"0011"=>q<="00100101111110101110111111111111";

when"0100"=>q<="00100101010100101111011111111111";

when"0101"=>q<="11111101010101001111101111111111";

when"0110"=>q<="00100101010100001111110111111111";

when"0111"=>q<="00100111111100001111111011111111";

when"1000"=>q<="00100101010100001111111101111111";

when"1001"=>q<="11111101010101001111111110111111";

when"1010"=>q<="00100101010101001111111111011111";

when"1011"=>q<="01100111111100101111111111101111";

when"1100"=>q<="00100100100000101111111111110111";

when"1101"=>q<="00001100000000011111111111111011";

when"1110"=>q<="00000100000000001111111111111101";

when"1111"=>q<="00000000000000001111111111111110";

whenothers=>null;

endcase;

ifclk1'eventandclk1='1'then

si<=q(i);i<=i+1;coi<='0';

ifi=31theni<=0;coi<='1';sel<=sel+'1';

endif;

rck<=notcoi;

endif;

endprocess;

sck<=clk1;

end;

时序仿真:

从图中可以看出,当clk1在第32个上升沿rck变为低电频,sck与clk1是同一电频,故此程序满足要求。

2、多个字符的跳动显示(如:

黄小红):

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entityxianshiis

port(clk1:

instd_logic;

clk2:

instd_logic;

rck,sck:

outstd_logic;

si:

outstd_logic);

end;

architectureoneofxianshiis

signallie:

std_logic_vector(3downto0);

signalsel:

std_logic_vector(3downto0);

signalq:

std_logic_vector(31downto0);

signali:

integerrange0to31;

signalcoi:

std_logic;

begin

process(sel,clk1,clk2)

begin

ifclk2'eventandclk2='1'then

lie<=lie+'1';

endif;

caselieis

when"0000"=>

caseselis

when"0000"=>q<="00000100000000000111111111111111";

when"0001"=>q<="00000100000000011011111111111111";

when"0010"=>q<="00100100000000011101111111111111";

when"0011"=>q<="00100101111110101110111111111111";

when"0100"=>q<="00100101010100101111011111111111";

when"0101"=>q<="11111101010101001111101111111111";

when"0110"=>q<="00100101010100001111110111111111";

when"0111"=>q<="00100111111100001111111011111111";

when"1000"=>q<="00100101010100001111111101111111";

when"1001"=>q<="11111101010101001111111110111111";

when"1010"=>q<="00100101010101001111111111011111";

when"1011"=>q<="01100111111100101111111111101111";

when"1100"=>q<="00100100100000101111111111110111";

when"1101"=>q<="00001100000000011111111111111011";

when"1110"=>q<="00000100000000001111111111111101";

when"1111"=>q<="00000000000000001111111111111110";

whenothers=>null;

endcase;

when"0001"=>

caseselis

when"0000"=>q<="00000000000000000111111111111111";

when"0001"=>q<="00000000000100001011111111111111";

when"0010"=>q<="00000000001000001101111111111111";

when"0011"=>q<="00000000010000001110111111111111";

when"0100"=>q<="00000001100000001111011111111111";

when"0101"=>q<="00000110000000101111101111111111";

when"0110"=>q<="00000000000000011111110111111111";

when"0111"=>q<="11111111111111101111111011111111";

when"1000"=>q<="00000000000000001111111101111111";

when"1001"=>q<="00000100000000001111111110111111";

when"1010"=>q<="00000010000000001111111111011111";

when"1011"=>q<="00000001000000001111111111101111";

when"1100"=>q<="00000000100000001111111111110111";

when"1101"=>q<="00000000011000001111111111111011";

when"1110"=>q<="00000000000000001111111111111101";

when"1111"=>q<="00000000000000001111111111111110";

whenothers=>null;

endcase;

when"0010"=>

caseselis

when"0000"=>q<="00000100010001000111111111111111";

when"0001"=>q<="00001100111001101011111111111111";

when"0010"=>q<="00110101010001001101111111111111";

when"0011"=>q<="11000110010010001110111111111111";

when"0100"=>q<="00000100010010001111011111111111";

when"0101"=>q<="00001000010010101111101111111111";

when"0110"=>q<="00100000000000101111110111111111";

when"0111"=>q<="00100000000000101111111011111111";

when"1000"=>q<="00100000000000101111111101111111";

when"1001"=>q<="00100000000000101111111110111111";

when"1010"=>q<="00111111111111101111111111011111";

when"1011"=>q<="00100000000000101111111111101111";

when"1100"=>q<="01100000000000101111111111110111";

when"1101"=>q<="00100000000001101111111111111011";

when"1110"=>q<="00000000000000101111111111111101";

when"1111"=>q<="00000000000000001111111111111110";

whenothers=>null;

endcase;

whenothers=>null;

endcase;

ifclk1'eventandclk1='1'then

si<=q(i);i<=i+1;coi<='0';

ifi=31theni<=0;coi<='1';sel<=sel+'1';

endif;

rck<=notcoi;

endif;

endprocess;

sck<=clk1;

end;

时序仿真:

从上图看出,当clk1在第32个上升沿rck变为低电频,sck与clk1是同一电频,故此程序满足要求。

3、汉字的滚动和动画显示(如:

黄小红+笑脸):

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entityxianshiis

port(clk1:

instd_logic;

clk2:

instd_logic;

rck,sck:

outstd_logic;

si:

outstd_logic);

end;

architectureoneofxianshiis

signallie:

std_logic_vector(3downto0);

signalsel:

std_logic_vector(3downto0);

signalq:

std_logic_vector(31downto0);

signali:

integerrange0to31;

signalcoi:

std_logic;

begin

process(sel,clk1,clk2)

begin

ifclk2'eventandclk2='1'then

lie<=lie+'1';

endif;

caselieis

when"0000"=>

caseselis

when"0000"=>q<="00000100000000000111111111111111";

when"0001"=>q<="00000100000000011011111111111111";

when"0010"=>q<="00100100000000011101111111111111";

when"0011"=>q<="00100101111110101110111111111111";

when"0100"=>q<="00100101010100101111011111111111";

when"0101"=>q<="11111101010101001111101111111111";

when"0110"=>q<="00100101010100001111110111111111";

when"0111"=>q<="00100111111100001111111011111111";

when"1000"=>q<="00100101010100001111111101111111";

when"1001"=>q<="11111101010101001111111110111111";

when"1010"=>q<="00100101010101001111111111011111";

when"1011"=>q<="01100111111100101111111111101111";

when"1100"=>q<="00100100100000101111111111110111";

when"1101"=>q<="00001100000000011111111111111011";

when"1110"=>q<="00000100000000001111111111111101";

when"1111"=>q<="00000000000000001111111111111110";

whenothers=>null;

endcase;

when"0001"=>

caseselis

 

when"0000"=>q<="00100101111110101110111111111111";

when"0001"=>q<="00100101010100101111011111111111";

when"0010"=>q<="11111101010101001111101111111111";

when"0011"=>q<="00100101010100001111110111111111";

when"0100"=>q<="00100111111100001111111011111111";

when"0101"=>q<="00100101010100001111111101111111";

when"0110"=>q<="11111101010101001111111110111111";

when"0111"=>q<="00100101010101001111111111011111";

when"1000"=>q<="01100111111100101111111111101111";

when"1001"=>q<="00100100100000101111111111110111";

when"1010"=>q<="00001100000000011111111111111011";

when"1011"=>q<="00000100000000001111111111111101";

when"1100"=>q<="00000000000000001111111111111110";

when"1101"=>q<="00000000000000000111111111111111";

when"1110"=>q<="00000000000100001011111111111111";

when"1111"=>q<="00000000001000001101111111111111";

whenothers=>null;

endcase;

when"0010"=>

caseselis

when"0000"=>q<="00100101010100001111110111111111";

when"0001"=>q<="00100111111100001111111011111111";

when"0010"=>q<="00100101010100001111111101111111";

when"0011"=>q<="11111101010101001111111110111111";

when"0100"=>q<="00100101010101001111111111011111";

when"0101"=>q<="01100111111100101111111111101111";

when"0110"=>q<="00100100100000101111111111110111";

when"0111"=>q<="00001100000000011111111111111011";

when"1000"=>q<="00000100000000001111111111111101";

when"1001"=>q<="00000000000000001111111111111110";

when"1010"=>q<="00000000000000000111111111111111";

when"1011"=>q<="00000000000100001011111111111111";

when"1100"=>q<="00000000001000001101111111111111";

when"1101"=>q<="00000000010000001110111111111111";

when"1110"=>q<="00000001100000001111011111111111";

when"1111"=>q<="00000110000000101111101111111111";

whenothers=>null;

endcase;

when"0011"=>

caseselis

when"0000"=>q<="11111101010101001111111110111111";

when"0001"=>q<="00100101010101001111111111011111";

when"0010"=>q<="01100111111100101111111111101111";

when"0011"=>q<="00100100100000101111111111110111";

when"0100"=>q<="00001100000000011111111111111011";

when"0101"=>q<="00000100000000001111111111111101";

when"0110"=>q<="00000000000000001111111111111110";

when"0111"=>q<="00000000000000000111111111111111";

when"1000"=>q<="00000000000100001011111111111111";

when"1001"=>q<="00000000001000001101111111111111";

when"1010"=>q<="00000000010000001110111111111111";

when"1011"=>q<="00000001100000001111011111111111";

when"1100"=>q<="00000110000000101111101111111111";

when"1101"=>q<="00000000000000011111110111111111";

when"1110"=>q<="11111111111111101111111011111111";

when"1111"=>q<="00000000000000001111111101111111";

whenothers=>null;

endcase;

when"0100"=>

caseselis

when"0000"=>q<="00100100100000101111111111110111";

when"0001"=>q<="00001100000000011111111111111011";

when"0010"=>q<="00000100000000001111111111111101";

when"0011"=>q<="00000000000000001111111111111110";

when"0100"=>q<="00000000000000000111111111111111";

when"0101"=>q<="00000000000100001011111111111111";

when"0110"=>q<="00000000001000001101111111111111";

when"0111"=>q<="00000000010000001110111111111111";

when"1000"=>q<="00000001100000001111011111111111";

when"1001"=>q<="00000110000000101111101111111111";

when"1010"=>q<="00000000000000011111110111111111";

when"1011"=>q<="11111111111111101111111011111111";

when"11

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 幼儿教育 > 幼儿读物

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2