- 18
- 0
- 约 4页
- 2015-08-18 发布于河南
- 举报
点阵汉字显示VHDL语言设计.doc
16*16的点阵显示设计
1、实验目的
熟悉MAX+plusⅡ的VHDL文本设计流程的全过程,学会用可编程逻辑器件设计制作一个16*16的点阵的显示设计。
16*16点阵显示是传统的点阵显示基本应用,它是很多复杂的显示的基础。这种点阵的显示可以使用多种方法来实现,其中所用到的器件也不尽相同,但是很多基本算法和思想都是相同的,只是根据不同的硬件,具体的方法有所区别。在此设计中,我所使用的点阵的列式有16个行信号组成的,每一行是由一个单独的位来控制,高电平有效,而列式由四个位矢量来控制的。例如:“0000”表示第0行,“0000000000000001”表示第1行的点亮。由于列式由一个矢量决定的,而每一时刻列只能有一个固定的值,因而只能是某一列的如干点亮,因此就决定了只能用逐列扫描的方法。
2、各模块及功能
模块CHW控制每个字母显示时间
Library ieee;
Use ieee.std_logic_1164.all;
Use ieee.std_logic_unsigned.all;
Entity chw is
Port (clk:in std_logic;
Q:out std_logic_vector(1 downto 0));
End chw;
Architecture chw_arc of chw is
Begin
Process(clk)
Variable cnt:integer;
Variable tmp:std_logic_vector(1 downto 0);
begin
If clkevent and clk=1then
if cnt10000 then
Cnt:=cnt+1;
Else
Cnt:=0;
If tmp=11then
Tmp:=00;
Else
Tmp:=tmp+1;
End if;
End if;
end if;
Q=tmp;
End process;
End chw_arc;
模块CNTA产生列选择信号。
Library ieee;
Use ieee.std_logic_1164.all;
Use ieee.std_logic_unsigned.all;
Entity cnta is
Port(clk:in std_logic;
Q:out std_logic_vector(3 downto 0));
End cnta;
Architecture cnt_arc of cnta is
Begin
Process(clk)
Variable tmp:std_logic_vector(3 downto 0);
Begin
If clk’event and clk=’1’then
If tmp=”1111”then
Tmp:=”0000”;
Else
Tmp:=tmp+1;
End if;
End if;
Q=tmp-1;
End process;
End cnt_arc;
模块CORA对应列选择信号,输出每个列对应的数据,点亮相应的灯。
Library ieee;
Use ieee.std_logic_1164.all;
Entity cora is
Port(ch:in std_logic_vector(1 downto 0);
Sel:in std_logic_vector(3 downto 0);
Q:out std_logic_vector(15 downto 0));
End cora;
Architecture corn_arc of cora is
Begin
Process(ch,sel)
Begin
Case ch is
When “00”=
Case sel is
when 0000 = q=0010000000000000;
when 0001 = q=0100011111110000;
when 0010 = q=0010000000100000;
when 0011 = q=0001000001000000;
when 0100 = q=0000100010000000;
when 0101 = q=0100000100000000;
when 0110 = q=0010001111111000;
when 0111 = q=0001000000010100;
when 1000 = q=0000100000100010;
when 1001 = q=0000000001000010;
when 1010 = q=0000000010001010;
when 1011 = q=0000101100010010;
when 1100 = q=0001000000100
您可能关注的文档
- 标准化卷烟陈列指导说明.doc
- 标准建模UML教程.pdf
- 标准椭圆封头下料尺寸表.pdf
- 标准海事通信用语及单词.doc
- 标语内容.xls
- 案例分析与方案设计.doc
- 案例教学过程优化研究.pdf
- 档案管理员工作计划.doc
- 档案管理学试题.doc
- 梵高及其作品欣赏.ppt
- (2026春新版)部编版八年级语文下册《第一单元》PPT课件.pptx
- 2018电力监控系统网络安全监测装置技术规范.docx
- 2022电力监控系统安全防护方案审核要点.docx
- 2014电力电缆光伏系统EN 50618欧标.docx
- (2026春新版)人教版二年级数学下册《第三单元 万以内数的认识》教案.docx
- (2026春新版)人教版二年级数学下册《第四单元 万以内的加法和减法》教案.docx
- (2026春新版)人教版二年级数学下册《综合与实践 时间在哪里》教案.docx
- (2026春新版)苏教版二年级数学下册《综合与实践 时间有多长》教案 .pdf
- (2026春新版)部编版三年级语文下册第3单元(教案).docx
- (2026春新版)部编版三年级语文下册第8单元(教案).docx
原创力文档

文档评论(0)