eda16X16点阵控制接口设计.docx
《eda16X16点阵控制接口设计.docx》由会员分享,可在线阅读,更多相关《eda16X16点阵控制接口设计.docx(18页珍藏版)》请在冰豆网上搜索。
eda16X16点阵控制接口设计
北华航天工业学院
《电子技术》
课程设计报告
报告题目:
16X16点阵控制接口设计
作者所在系部:
作者所在专业:
作者姓名:
作者学号:
指导教师姓名:
完成时间:
2012年12月13日
课程设计任务书
课题名称
16X16点阵控制接口设计
完成时间
指导教师
职称
副教授
学生姓名
班级
总体设计要求和技术要点
总体设计要求:
通过本课程的学习使学生掌握可编程器件、EDA开发系统软件、硬件描述语言和电子线路设计与技能训练等各方面知识;提高工程实践能力;学会应用EDA技术解决一些简单的电子设计问题。
技术要点:
1.在时钟信号的控制下,使点阵动态点亮,点亮方式自行设计,其中位选信号为16-4编码器编码输出。
2.设计8位开关控制的8种图案显示。
3.设计4位或4位以上的汉字循环显示,例如“北华航天”。
工作内容及时间进度安排
第15周:
周1---周3:
立题、论证方案设计
周4---周5:
预答辩
第16周:
周1---周3:
仿真实验
周4---周5:
验收答辩
课程设计成果
1.与设计内容对应的软件程序
2.课程设计报告书
3.成果使用说明书
4.设计工作量要求
内容摘要
LED显示屏广泛应用于车站、码头、机场、医院、市场和其他公共场所。
LED点阵显示是由多个独立的LED发光二极管封装而成。
LED点阵显示屏可以显示数字或符号等。
设计方案包括系统的硬件设计,软件流程图设计和VHDL语言的设计。
设计采用动态扫描的显示方法。
LED列有4—16译码器控制。
关键词:
LED、VHDL语言、4—16译码器
目录
一、概述………………………………………………………………1
二、方案设计与论证………………………………………………………………2
三、总原理图………………………………………………………………………2
四、元器件清单…………………………………………………………………4
五、程序…………………………………………………………………………6
六、收获与体会…………………………………………………………………6
七、参考文献……………………………………………………………………6
一、概述
在实验仪中,16X16点阵的列驱动电路已经做好,其列选信号送到4—16译码电路,译码电路的输出通过8只75451驱动点阵管的16条共阴极列线;DIN[3..0]为显示花样模式选择,高电平有效;CLK为时钟输入端。
二、方案设计与论证
用LED显示屏显示信息,不论显示文字还是图形,都是控制与组成这些图形或文字的各个点所在位置相应的LED器件发光。
事先把需要显示的图案转换成点阵图形,在按照显示控制的要求以一定的格式形成显示数据。
对于只控制通断的的图形显示屏来说,每个LED发光器件占据数据中的1位。
三、总原理图
四、原件清单
LED发光二级管256个
4—16译码器1个
EPF10K10LC84-4芯片1个
分频器1个
拨码开关3个
按键开关1个
导线导线
五、程序
libraryieee;
useieee.std_logic_1164.all;
useieee.std_logic_unsigned.all;
useieee.std_logic_arith.all;
useieee.numeric_std;
entitykesheis
port(
clk,clr:
instd_logic;
din:
instd_logic_vector(3downto0);
dout:
outstd_logic_vector(15downto0);
selout:
outstd_logic_vector(3downto0)
);
endkeshe;
architecturebehaveofkesheis
signaldin_temp:
std_logic_vector(3downto0);
signalsel_temp:
std_logic_vector(3downto0);
signaldout_temp:
std_logic_vector(15downto0);
signalflag:
std_logic;
signalcount:
std_logic_vector(3downto0);
signalx:
std_logic_vector(1downto0);
begin
process(clk,din,clr)
variablenote:
integer:
=0;
variablenum:
integer:
=0;
begin
ifclr='1'then
sel_temp<=(others=>'0');
dout_temp<=(others=>'0');
flag<='1';
dout_temp<="0000000000000001";
elsifclk'eventandclk='1'then
ifdin="0000"then
sel_temp<=sel_temp+1;sel_temp<=sel_temp+1;
ifsel_temp="1111"then
sel_temp<="0000";
endif;
selout<=sel_temp;
num:
=num+1;
ifnum=160then
num:
=0;
ifflag='1'then
lop1:
foriin1to15loop
dout_temp(i)<=dout_temp(i-1);
dout<=dout_temp;
ifdout_temp(15)='1'then
dout_temp(15)<='0';
flag<='0';
endif;
endlooplop1;
elsifflag='0'then
lop2:
foriin15downto1loop
dout_temp(i-1)<=dout_temp(i);
dout<=dout_temp;
ifdout_temp(0)='0'then
dout_temp(0)<='1';
flag<='1';
endif;
endlooplop2;
endif;
endif;
elsifdin="0001"then
count<=count+1;
ifcount="1111"then
count<="0000";
note:
=note+1;
ifnote=100then
note:
=0;
x<=x+1;
ifx="11"then
x<="00";
endif;
endif;
endif;
ifx="00"then
casecountis
WHEN"0000"=>SELOUT<="0000";dout<="0000000000000000";
WHEN"0001"=>SELOUT<="0001";dout<="0000011100000000";
WHEN"0010"=>SELOUT<="0010";dout<="0001000000010000";
WHEN"0011"=>SELOUT<="0011";dout<="0001000000010000";
WHEN"0100"=>SELOUT<="0100";dout<="0001000000010000";
WHEN"0101"=>SELOUT<="0101";dout<="0001000000000000";
WHEN"0110"=>SELOUT<="0110";dout<="0000111111111100";
WHEN"0111"=>SELOUT<="0111";dout<="0000000000000000";
WHEN"1000"=>SELOUT<="1000";dout<="0000111111111110";
WHEN"1001"=>SELOUT<="1001";dout<="0000010000100000";
WHEN"1010"=>SELOUT<="1010";dout<="0000010000100000";
WHEN"1011"=>SELOUT<="1011";dout<="0000010000100000";
WHEN"1100"=>SELOUT<="1100";dout<="0000000000000000";
WHEN"1101"=>SELOUT<="1101";dout<="0000000000000000";
WHEN"1110"=>SELOUT<="1110";dout<="0000000000000000";
WHEN"1111"=>SELOUT<="1111";dout<="0000000000000000";
WHENOTHERS=>NULL;
endcase;
endif;
ifx="01"then
casecountis
WHEN"0000"=>SELOUT<="0000";dout<="0000000010000000";
WHEN"0001"=>SELOUT<="0001";dout<="0000000010000000";
WHEN"0010"=>SELOUT<="0010";dout<="0000001010000100";
WHEN"0011"=>SELOUT<="0011";dout<="0000001010001000";
WHEN"0100"=>SELOUT<="0100";dout<="0000001000111111";
WHEN"0101"=>SELOUT<="0101";dout<="0000001000000000";
WHEN"0110"=>SELOUT<="0110";dout<="0000001111000000";
WHEN"0111"=>SELOUT<="0111";dout<="1111110000000011";
WHEN"1000"=>SELOUT<="1000";dout<="0000010011111100";
WHEN"1001"=>SELOUT<="1001";dout<="0000010000001000";
WHEN"1010"=>SELOUT<="1010";dout<="0000010000010000";
WHEN"1011"=>SELOUT<="1011";dout<="0000010000100000";
WHEN"1100"=>SELOUT<="1100";dout<="0000000000000000";
WHEN"1101"=>SELOUT<="1101";dout<="0000000000000000";
WHEN"1110"=>SELOUT<="1110";dout<="0000000000000000";
WHEN"1111"=>SELOUT<="1111";dout<="0000000000000000";
WHENOTHERS=>NULL;
endcase;
endif;
ifx="10"then
casecountis
WHEN"0000"=>SELOUT<="0000";dout<="0000000000000000";
WHEN"0001"=>SELOUT<="0001";dout<="0000000000000000";
WHEN"0010"=>SELOUT<="0010";dout<="0000100000000000";
WHEN"0011"=>SELOUT<="0011";dout<="0001000000010000";
WHEN"0100"=>SELOUT<="0100";dout<="0000100000010000";
WHEN"0101"=>SELOUT<="0101";dout<="0000001111010010";
WHEN"0110"=>SELOUT<="0110";dout<="0000000000001001";
WHEN"0111"=>SELOUT<="0111";dout<="0000001111101000";
WHEN"1000"=>SELOUT<="1000";dout<="0000010000001000";
WHEN"1001"=>SELOUT<="1001";dout<="0000000000000000";
WHEN"1010"=>SELOUT<="1010";dout<="0011111111111000";
WHEN"1011"=>SELOUT<="1011";dout<="0001000010101111";
WHEN"1100"=>SELOUT<="1100";dout<="0000000010001000";
WHEN"1101"=>SELOUT<="1101";dout<="0000111111110000";
WHEN"1110"=>SELOUT<="1110";dout<="0001000100000000";
WHEN"1111"=>SELOUT<="1111";dout<="0010000100000000";
WHENOTHERS=>NULL;
endcase;
endif;
ifx="11"then
casecountis
WHEN"0000"=>SELOUT<="0000";dout<="0000000000000000";
WHEN"0001"=>SELOUT<="0001";dout<="0000000001000000";
WHEN"0010"=>SELOUT<="0010";dout<="0100000001000100";
WHEN"0011"=>SELOUT<="0011";dout<="0001100001000100";
WHEN"0100"=>SELOUT<="0100";dout<="0000001101000100";
WHEN"0101"=>SELOUT<="0101";dout<="0000000001111100";
WHEN"0110"=>SELOUT<="0110";dout<="0000001101000100";
WHEN"0111"=>SELOUT<="0111";dout<="0001100001000100";
WHEN"1000"=>SELOUT<="1000";dout<="0010000001000100";
WHEN"1001"=>SELOUT<="1001";dout<="0100000001000000";
WHEN"1010"=>SELOUT<="1010";dout<="1000000001000000";
WHEN"1011"=>SELOUT<="1011";dout<="0000000000000000";
WHEN"1100"=>SELOUT<="1100";dout<="0000000000000000";
WHEN"1101"=>SELOUT<="1101";dout<="0000000000000000";
WHEN"1110"=>SELOUT<="1110";dout<="0000000000000000";
WHEN"1111"=>SELOUT<="1111";dout<="0000000000000000";
WHENOTHERS=>NULL;
endcase;
endif;
elsifdin="0010"then
count<=count+1;
ifcount="1111"then
count<="0000";
endif;
casecountis
WHEN"0000"=>SELOUT<="0000";dout<="0000000000000000";
WHEN"0001"=>SELOUT<="0001";dout<="0011111111111100";
WHEN"0010"=>SELOUT<="0010";dout<="0010000000000100";
WHEN"0011"=>SELOUT<="0011";dout<="0010000000000100";
WHEN"0100"=>SELOUT<="0100";dout<="0010000000000100";
WHEN"0101"=>SELOUT<="0101";dout<="0010000000000100";
WHEN"0110"=>SELOUT<="0110";dout<="0010000000000100";
WHEN"0111"=>SELOUT<="0111";dout<="0010000000000100";
WHEN"1000"=>SELOUT<="1000";dout<="0010000000000100";
WHEN"1001"=>SELOUT<="1001";dout<="0010000000000100";
WHEN"1010"=>SELOUT<="1010";dout<="0010000000000100";
WHEN"1011"=>SELOUT<="1011";dout<="0010000000000100";
WHEN"1100"=>SELOUT<="1100";dout<="0010000000000100";
WHEN"1101"=>SELOUT<="1101";dout<="0010000000000100";
WHEN"1110"=>SELOUT<="1110";dout<="0011111111111100";
WHEN"1111"=>SELOUT<="1111";dout<="0000000000000000";
WHENOTHERS=>NULL;
endcase;
elsifdin="0011"then
count<=count+1;
ifcount="1111"then
count<="0000";
endif;
casecountis
WHEN"0000"=>SELOUT<="0000";dout<="0000000000000000";
WHEN"0001"=>SELOUT<="0001";dout<="0000000000000000";
WHEN"0010"=>SELOUT<="0010";dout<="0000000100000000";
WHEN"0011"=>SELOUT<="0011";dout<="0000001010000000";
WHEN"0100"=>SELOUT<="0100";dout<="0000010001000000";
WHEN"0101"=>SELOUT<="0101";dout<="0000100000100000";
WHEN"0110"=>SELOUT<="0110";dout<="0001000000010000";
WHEN"0111"=>SELOUT<="0111";dout<="0010000000001000";
WHEN"1000"=>SELOUT<="1000";dout<="0010000000001000";
WHEN"1001"=>SELOUT<="1001";dout<="0010000000001000";
WHEN"1010"=>SELOUT<="1010";dout<="0010000000001000";
WHEN"1011"=>SELOUT<="1011";dout<="0010000000001000";
WHEN"1100"=>SELOUT<="1100";dout<="0010000000001000";
WHEN"1101"=>SELOUT<="1101";dout<="0010000000001000";
WHEN"1110"=>SELOUT<="1110";dout<="0011111111111000";
WHEN"1111"=>SELOUT<="1111";dout<="0000000000000000";
WHENOTHERS=>NULL;
endcase;
elsifdin="0100"then