16乘16点阵显示综合设计报告.docx

上传人:b****2 文档编号:24396601 上传时间:2023-05-27 格式:DOCX 页数:19 大小:228.96KB
下载 相关 举报
16乘16点阵显示综合设计报告.docx_第1页
第1页 / 共19页
16乘16点阵显示综合设计报告.docx_第2页
第2页 / 共19页
16乘16点阵显示综合设计报告.docx_第3页
第3页 / 共19页
16乘16点阵显示综合设计报告.docx_第4页
第4页 / 共19页
16乘16点阵显示综合设计报告.docx_第5页
第5页 / 共19页
点击查看更多>>
下载资源
资源描述

16乘16点阵显示综合设计报告.docx

《16乘16点阵显示综合设计报告.docx》由会员分享,可在线阅读,更多相关《16乘16点阵显示综合设计报告.docx(19页珍藏版)》请在冰豆网上搜索。

16乘16点阵显示综合设计报告.docx

16乘16点阵显示综合设计报告

 

一、方案设计

本设计大概包括时钟源、CPLD芯片,显示器。

此次实验所用的可编程逻辑器件的主芯片为EPF10K10LC84-3。

通过VHDL语言进行编程分别把程序模块进行编译仿真。

所编的十六进制计数器控制花样信号对字符库进行选择,计数器产生的花样信号和时钟信号共同控制行选信号和列选信号(列选频率一定要比字选频率大很多)把相应的值输入点阵,控制显示器显示相应的字符。

时钟源信号要高于24HZ。

所分模块有:

1、字选模块:

为十六进制计数器模块,其时钟源信号要比列选信号小得多。

2、列选信号:

通过给定的时钟信号用来选中列,再对列进行扫描。

3、显示模块:

经过字选信号和列选信号输出十六位二进制用来显示一行。

4、顶层模块:

该模块采用图形模式(图3),把所有模块按要求连接起来,再加上顶层输入信号。

二、实验原理

16×16扫描LED点阵的工作原理同8位扫描数码管类似。

它有16个共阴极输出端口,每个共阴极对应有16个LED显示灯。

所以其扫描译码地址需4位信号线。

2864E2PROM存贮器是电可擦除/编程的只读存贮器,容量为8k×8bit,有13位并行地址线和8位并行数据线,而一个完整的字符所需的存贮容间为32字节即32×8bit,也就是说2864最多可连续存256个16×16点阵字形。

存贮方式可事先约定好。

本实验就是要通过CPLD芯片产生读时序,将字形从2864中读出,然后产生写时序,写入16×16的点阵,使其扫描显示输出。

三、单元电路设计

1)十六进制计数器

用VHDL语言十六进制计数器进行设计,程序如下:

LIBRARYieee;

USEieee.std_logic_1164.all;

USEieee.std_logic_unsigned.all;

ENTITYJISHUIS

PORT(CLK,RST,LOAD:

INSTD_LOGIC;

DIN:

INSTD_LOGIC_VECTOR(3DOWNTO0);

DOUT:

BUFFERSTD_LOGIC_VECTOR(3DOWNTO0));

ENDJISHU;

ARCHITECTURESHILIUOFJISHUIS

BEGIN

PROCESS(CLK,RST,LOAD,DIN)

BEGIN

IF(CLK'EVENTANDCLK='1')THEN

IF(RST='1')THENDOUT<=(OTHERS=>'0');

ELSIF(LOAD='1')THENDOUT<=DIN;

ELSIF(DOUT=8)THEN

DOUT<="0000";

ELSE

DOUT<=DOUT+1;

ENDIF;

ENDIF;

ENDPROCESS;

ENDSHILIU;

设计完成后,器件图如图1

 

图1十六进制计数器

2)对行列控制模块进行及字库进行设计

行列控制模块进行及字库程序如下:

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entityzhiis

port(din:

instd_logic_vector(3downto0);

selout:

bufferstd_logic_vector(3downto0);

clk,rst:

instd_logic;

dotout:

outstd_logic_vector(15downto0));

endzhi;

architectureoneofzhiis

begin

process(clk,rst,din,selout)

variableb:

std_logic_vector(15downto0);

begin

ifrst='1'thenselout<="0000";

elsifclk'eventandclk='1'then

casedinis

when"0000"=>selout<=selout+1;

caseseloutis

when"1111"=>b:

="0000000000000000";

when"0000"=>b:

="0010001000011100";

when"0001"=>b:

="0001000100001000";

when"0010"=>b:

="0000100010010000";

when"0011"=>b:

="0000000000100010";

when"0100"=>b:

="0011100001000100";

when"0101"=>b:

="0001000000001000";

when"0110"=>b:

="0001000000010000";

when"0111"=>b:

="0111111111100000";

when"1000"=>b:

="0111111111111100";

when"1001"=>b:

="0001000000000100";

when"1010"=>b:

="0001010000000100";

when"1011"=>b:

="0001100000000100";

when"1100"=>b:

="0011000000000100";

when"1101"=>b:

="0000000000011100";

whenothers=>b:

="0000000000000000";

endcase;

when"0001"=>selout<=selout+1;

caseseloutis

when"1111"=>b:

="0000000000000000";

when"0000"=>b:

="0000000000000000";

when"0001"=>b:

="0000000110000000";

when"0010"=>b:

="0000001100000000";

when"0011"=>b:

="0000011000000000";

when"0100"=>b:

="0000110000010000";

when"0101"=>b:

="0000000000001000";

when"0110"=>b:

="0111111111111100";

when"0111"=>b:

="0111111111111110";

when"1000"=>b:

="0000000000000000";

when"1001"=>b:

="0000110000000000";

when"1010"=>b:

="0000011000000000";

when"1011"=>b:

="0000001100000000";

when"1100"=>b:

="0000000110000000";

when"1101"=>b:

="0000000000000000";

whenothers=>b:

="0000000000000000";

endcase;

when"0010"=>selout<=selout+1;

caseseloutis

when"1111"=>b:

="0000000000000000";

when"0000"=>b:

="0000000000000110";

when"0001"=>b:

="0001100000000110";

when"0010"=>b:

="1001100000000110";

when"0011"=>b:

="1101100110000110";

when"0100"=>b:

="0111100110000110";

when"0101"=>b:

="0011100110000110";

when"0110"=>b:

="0001100110000110";

when"0111"=>b:

="0001100110000110";

when"1000"=>b:

="0011100110000110";

when"1001"=>b:

="0111100110000110";

when"1010"=>b:

="1101100110000110";

when"1011"=>b:

="1001100000000110";

when"1100"=>b:

="0001100000000110";

when"1101"=>b:

="0000000000000110";

whenothers=>b:

="0000000000000000";

endcase;

when"0011"=>selout<=selout+1;

caseseloutis

when"1111"=>b:

="0000000000000000";

when"0000"=>b:

="0000000000000100";

when"0001"=>b:

="0000000000001100";

when"0010"=>b:

="0001000000011100";

when"0011"=>b:

="0101011011110000";

when"0100"=>b:

="0101011101100000";

when"0101"=>b:

="0101010110000000";

when"0110"=>b:

="1111010111111111";

when"0111"=>b:

="0101010111111110";

when"1000"=>b:

="0101010101100100";

when"1001"=>b:

="0101011000110000";

when"1010"=>b:

="0001000000011000";

when"1011"=>b:

="0000000000001100";

when"1100"=>b:

="0000000000000100";

when"1101"=>b:

="0000000000000000";

whenothers=>b:

="0000000000000000";

endcase;

when"0100"=>selout<=selout+1;

caseseloutis

when"0000"=>b:

="0000000000011000";

when"0001"=>b:

="0000011000110000";

when"0010"=>b:

="0110011011000000";

when"0011"=>b:

="0111111111111100";

when"0100"=>b:

="0111111111111110";

when"0101"=>b:

="0110011110000000";

when"0110"=>b:

="0000011011100000";

when"0111"=>b:

="0000000001100000";

when"1000"=>b:

="0000000000000000";

when"1001"=>b:

="0000011111110000";

when"1010"=>b:

="0000011111100000";

when"1011"=>b:

="0000000000001000";

when"1100"=>b:

="0111111111111100";

when"1101"=>b:

="0111111111111110";

when"1110"=>b:

="0000000000000000";

whenothers=>b:

="0000000000000000";

endcase;

when"0101"=>selout<=selout+1;

caseseloutis

when"0000"=>b:

="0000000000000000";

when"0001"=>b:

="0000111000000010";

when"0010"=>b:

="0000111000000110";

when"0011"=>b:

="0000100110001000";

when"0100"=>b:

="0000100110010110";

when"0101"=>b:

="0000100110101110";

when"0110"=>b:

="0110100111010110";

when"0111"=>b:

="0110101110100110";

when"1000"=>b:

="0110100110000110";

when"1001"=>b:

="0000100110010110";

when"1010"=>b:

="0000100110001110";

when"1011"=>b:

="0000100110000110";

when"1100"=>b:

="0000111000000110";

when"1101"=>b:

="0000111000000010";

when"1110"=>b:

="0000000000000000";

whenothers=>b:

="0000000000000000";

endcase;

when"0110"=>selout<=selout+1;

caseseloutis

when"1111"=>b:

="0000000000000000";

when"0000"=>b:

="0000000000000010";

when"0001"=>b:

="0110000000000110";

when"0010"=>b:

="0110000110000110";

when"0011"=>b:

="0110000110000110";

when"0100"=>b:

="0110000110000110";

when"0101"=>b:

="0110000110000110";

when"0110"=>b:

="0111111111111110";

when"0111"=>b:

="0111111111111110";

when"1000"=>b:

="0110000110000110";

when"1001"=>b:

="0110000110000110";

when"1010"=>b:

="0110000110000110";

when"1011"=>b:

="0110000110000110";

when"1100"=>b:

="0110000000000110";

when"1101"=>b:

="0000000000000010";

whenothers=>b:

="0000000000000000";

endcase;

when"0111"=>selout<=selout+1;

caseseloutis

when"0000"=>b:

="0000000000100100";

when"0001"=>b:

="0010001000011000";

when"0010"=>b:

="0010010100011000";

when"0011"=>b:

="0010110010100100";

when"0100"=>b:

="0011000001001010";

when"0101"=>b:

="0010010010101010";

when"0110"=>b:

="0010010010101010";

when"0111"=>b:

="0010010010101010";

when"1000"=>b:

="0111111111111110";

when"1001"=>b:

="0010010010101010";

when"1010"=>b:

="0010010010101010";

when"1011"=>b:

="0010010010101010";

when"1100"=>b:

="0011111110001010";

when"1101"=>b:

="0000010000001010";

when"1110"=>b:

="0000010000000010";

whenothers=>b:

="0000000000000000";

endcase;

when"1000"=>selout<=selout+1;

caseseloutis

when"0000"=>b:

="0000000001111100";

when"0001"=>b:

="0000100011000000";

when"0010"=>b:

="0010100100100000";

when"0011"=>b:

="0010101000010000";

when"0100"=>b:

="0111111111001000";

when"0101"=>b:

="0010100100000100";

when"0110"=>b:

="0010100100000010";

when"0111"=>b:

="0000100000000010";

when"1000"=>b:

="0000000000000010";

when"1001"=>b:

="0100010001110010";

when"1010"=>b:

="0100100010001010";

when"1011"=>b:

="0101000010001010";

when"1100"=>b:

="0110010010001010";

when"1101"=>b:

="0111111001110010";

when"1110"=>b:

="0000000000000000";

whenothers=>b:

="0000000000000000";

endcase;

when"1001"=>selout<=selout+1;

caseseloutis

when"1111"=>b:

="0000111100001111";

when"0000"=>b:

="0000111100001111";

when"0001"=>b:

="0000111100001111";

when"0010"=>b:

="0000111100001111";

when"0011"=>b:

="1111000011110000";

when"0100"=>b:

="1111000011110000";

when"0101"=>b:

="1111000011110000";

when"0110"=>b:

="1111111111110000";

when"0111"=>b:

="0000111100001111";

when"1000"=>b:

="0000111100001111";

when"1001"=>b:

="0000111100001111";

when"1010"=>b:

="0000111100001111";

when"1011"=>b:

="1111000011110000";

when"1100"=>b:

="1111000011110000";

when"1101"=>b:

="1111000011110000";

when"1110"=>b:

="1111000011110000";

whenothers=>null;

endcase;

when"1010"=>selout<=selout+1;

caseseloutis

when"1111"=>b:

="1111000011110000";

when"0000"=>b:

="1111000011110000";

when"0001"=>b:

="1111000011110000";

when"0010"=>b:

="1111000011110000";

when"0011"=>b:

="0000111100001111";

when"0100"=>b:

="0000111100001111";

when"0101"=>b:

="0000111100001111";

when"0110"=>b:

="0000111100001111";

when"0111"=>b:

="1111000011110000";

when"1000"=>b:

="1111000011110000";

when"1001"=>b:

="1111000011110000";

when"1010"=>b:

="1111000011110000";

when"1011"=>b:

="0000111100001111";

when"1100"=>b:

="0000111100001111";

when"1101"=>b:

="0000111100001111";

when"1110"=>b:

="0000111100001111";

whenothers=>null;

endcase;

when"1011"=>selout<=selout+1;

caseseloutis

when"1111"=>b:

="0000000011111111";

when"0000"=>b:

="0000000011111111";

when"0001"=>b:

="0000000011111111";

when"0010"=>b:

="0000000011111111";

when"0011"=>b:

="0000000011111111";

when"0100"=>b:

="0000000011111111";

when"0101"=>b:

="0000000011111111";

when"0110"=>b:

="0000000011111111";

when"0111"=>b:

="1111111100000000";

when"1000"=>b:

="1111111100000000";

whe

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

当前位置:首页 > 农林牧渔 > 农学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1