16X16点阵电子技术课程设计报告

更新时间:2023-05-20 17:59:01 阅读量: 实用文档 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

16X16点阵

北 华 航 天 工 业 学 院

《 电子技术 》

课程设计报告

报告题目: 16X16点阵控制接口设计 作者所在系部: 作者所在专业: 作者所在班级: B09212 作 者 姓 名 : 张彪 作 者 学 号 : 指导教师姓名:

完 成 时 间 :

16X16点阵

课程设计任务书

16X16点阵

内 容 摘 要

LED显示屏广泛应用于车站、码头、机场、医院、市场和其他公共场所。 LED点阵显示是由多个独立的LED发光二极管封装而成。LED点阵显示屏可以显示数字或符号等。设计方案包括系统的硬件设计,软件流程图设计和VHDL语言的设计。设计采用动态扫描的显示方法。

LED列有4—16译码器控制。

关键词:LED 、 VHDL语言 、 4—16译码器

16X16点阵

目 录

一、 概 述 1

二、方案设计与论证 2

三、总原理图 2

四、元器件清单 4

五、程序 6

六、收获与体会 6

七、参考文献 6

16X16点阵

一 、概述

在实验仪中,16X16点阵的列驱动电路已经做好,其列选信号送到4—16译码电路,译码电路的输出通过8只75451驱动点阵管的16条共阴极列线;DIN[3..0]为显示花样模式选择,高电平有效;CLK为时钟输入端。

二 、方案设计与论证

用LED显示屏显示信息,不论显示文字还是图形,都是控制与组成这些图形或文字的各个点所在位置相应的LED器件发光。事先把需要显示的图案转换成点阵图形,在按照显示控制的要求以一定的格式形成显示数据。对于只控制通断的的图形显示屏来说,每个LED发光器件占据数据中的1位。

三 、总原理图

四 、原件清单

16X16点阵

LED发光二级管 256个 4—16译码器 1个 EPF10K10LC84-4芯片 1个 分频器 1个 拨码开关 3个 按键开关 1个 导线 导线

五 、程序

library ieee;

use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; use ieee.numeric_std; entity keshe is

port(

clk,clr : in std_logic;

din : in std_logic_vector(3 downto 0); dout : out std_logic_vector(15 downto 0); selout : out std_logic_vector(3 downto 0) );

end keshe;

architecture behave of keshe is

signal din_temp:std_logic_vector(3 downto 0); signal sel_temp :std_logic_vector(3 downto 0); signal dout_temp:std_logic_vector(15 downto 0); signal flag:std_logic;

16X16点阵

signal x: std_logic_vector(1 downto 0);

begin

process (clk ,din,clr)

variable note:integer :=0; variable num:integer :=0; begin if clr='1' then

sel_temp<=(others=>'0');

dout_temp<=(others=>'0');

flag<='1';

dout_temp<="0000000000000001"; elsif clk'event and clk='1' then

if din="0000" then

sel_temp<=sel_temp+1;

sel_temp<=sel_temp+1;

if sel_temp="1111" then sel_temp<="0000"; end if;

selout<=sel_temp; num:=num+1;

if num=160 then

num:=0;

if flag='1' then lop1:

for i in 1 to 15 loop

dout_temp(i)<=dout_temp(i-1); dout<=dout_temp; if dout_temp(15)='1' then

dout_temp(15)<='0';

16X16点阵

end if;

end loop lop1;

elsif flag='0' then lop2:

for i in 15 downto 1 loop

dout_temp(i-1)<=dout_temp(i); dout<=dout_temp; if dout_temp(0)='0' then

dout_temp(0)<='1'; flag<='1';

end if;

end loop lop2;

end if;

end if;

elsif din="0001" then

count<=count+1;

if count="1111" then

count<="0000"; note:=note+1; if note=100 then

note:=0; x<=x+1; if x="11" then

x<="00";

end if;

end if;

end if;

if x="00" then case count is

16X16点阵

WHEN <="0000000000000000";

WHEN

<="0000011100000000";

WHEN

<="0001000000010000";

WHEN

<="0001000000010000";

WHEN

<="0001000000010000";

WHEN

<="0001000000000000";

WHEN

<="0000111111111100";

WHEN

<="0000000000000000";

WHEN

<="0000111111111110";

WHEN

<="0000010000100000";

WHEN

<="0000010000100000";

WHEN

<="0000010000100000";

WHEN

<="0000000000000000";

WHEN

<="0000000000000000";

WHEN

<="0000000000000000";

"0000"=>SELOUT<="0000";dout

"0001"=>SELOUT<="0001";dout

"0010"=>SELOUT<="0010";dout

"0011"=>SELOUT<="0011";dout

"0100"=>SELOUT<="0100";dout

"0101"=>SELOUT<="0101";dout

"0110"=>SELOUT<="0110";dout

"0111"=>SELOUT<="0111";dout

"1000"=>SELOUT<="1000";dout

"1001"=>SELOUT<="1001";dout

"1010"=>SELOUT<="1010";dout

"1011"=>SELOUT<="1011";dout

"1100"=>SELOUT<="1100";dout

"1101"=>SELOUT<="1101";dout

"1110"=>SELOUT<="1110";dout

16X16点阵

WHEN "1111"=>SELOUT<="1111";dout

<="0000000000000000";

WHEN OTHERS=>NULL; end case; end if;

if x="01" then

case count is

WHEN

<="0000000010000000";

WHEN

<="0000000010000000";

WHEN

<="0000001010000100";

WHEN

<="0000001010001000";

WHEN

<="0000001000111111";

WHEN

<="0000001000000000";

WHEN

<="0000001111000000";

WHEN

<="1111110000000011";

WHEN

<="0000010011111100";

WHEN

<="0000010000001000";

WHEN

<="0000010000010000";

WHEN

"0000"=>SELOUT<="0000";dout

"0001"=>SELOUT<="0001";dout

"0010"=>SELOUT<="0010";dout

"0011"=>SELOUT<="0011";dout

"0100"=>SELOUT<="0100";dout

"0101"=>SELOUT<="0101";dout

"0110"=>SELOUT<="0110";dout

"0111"=>SELOUT<="0111";dout

"1000"=>SELOUT<="1000";dout "1001"=>SELOUT<="1001";dout

"1010"=>SELOUT<="1010";dout

"1011"=>SELOUT<="1011";dout

16X16点阵

<="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";

WHEN OTHERS=>NULL; end case; end if;

if x="10" then

case count is

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";

16X16点阵

WHEN <="0000010000001000";

WHEN

<="0000000000000000";

WHEN

<="0011111111111000";

WHEN

<="0001000010101111";

WHEN

<="0000000010001000";

WHEN

<="0000111111110000";

WHEN

<="0001000100000000";

WHEN

<="0010000100000000";

WHEN OTHERS=>NULL; end case; end if;

if x="11" then

case count is

WHEN

<="0000000000000000";

WHEN

<="0000000001000000";

WHEN

<="0100000001000100";

WHEN

<="0001100001000100";

WHEN

"1000"=>SELOUT<="1000";dout

"1001"=>SELOUT<="1001";dout

"1010"=>SELOUT<="1010";dout

"1011"=>SELOUT<="1011";dout

"1100"=>SELOUT<="1100";dout

"1101"=>SELOUT<="1101";dout

"1110"=>SELOUT<="1110";dout

"1111"=>SELOUT<="1111";dout

"0000"=>SELOUT<="0000";dout

"0001"=>SELOUT<="0001";dout

"0010"=>SELOUT<="0010";dout

"0011"=>SELOUT<="0011";dout

"0100"=>SELOUT<="0100";dout

16X16点阵

<="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";

WHEN OTHERS=>NULL;

end case;

end if;

elsif din="0010" then

count<=count+1;

if count="1111" then

count<="0000";

16X16点阵

end if;

case count is

WHEN

<="0000000000000000";

WHEN

<="0011111111111100";

WHEN

<="0010000000000100";

WHEN

<="0010000000000100";

WHEN

<="0010000000000100";

WHEN

<="0010000000000100";

WHEN

<="0010000000000100";

WHEN

<="0010000000000100";

WHEN

<="0010000000000100";

WHEN

<="0010000000000100";

WHEN

<="0010000000000100";

WHEN

<="0010000000000100";

WHEN

<="0010000000000100";

WHEN

<="0010000000000100";

"0000"=>SELOUT<="0000";dout

"0001"=>SELOUT<="0001";dout

"0010"=>SELOUT<="0010";dout

"0011"=>SELOUT<="0011";dout

"0100"=>SELOUT<="0100";dout

"0101"=>SELOUT<="0101";dout

"0110"=>SELOUT<="0110";dout

"0111"=>SELOUT<="0111";dout

"1000"=>SELOUT<="1000";dout

"1001"=>SELOUT<="1001";dout

"1010"=>SELOUT<="1010";dout

"1011"=>SELOUT<="1011";dout

"1100"=>SELOUT<="1100";dout

"1101"=>SELOUT<="1101";dout

16X16点阵

<="0011111111111100";

WHEN

"1111"=>SELOUT<="1111";dout

<="0000000000000000";

WHEN OTHERS=>NULL;

end case;

elsif din="0011" then

count<=count+1;

if count="1111" then

count<="0000"; end if;

case count is

WHEN

<="0000000000000000";

WHEN

<="0000000000000000";

WHEN

<="0000000100000000";

WHEN

<="0000001010000000";

WHEN

<="0000010001000000";

WHEN

<="0000100000100000";

WHEN

<="0001000000010000";

WHEN

<="0010000000001000";

WHEN

<="0010000000001000";

"0000"=>SELOUT<="0000";dout

"0001"=>SELOUT<="0001";dout

"0010"=>SELOUT<="0010";dout

"0011"=>SELOUT<="0011";dout

"0100"=>SELOUT<="0100";dout

"0101"=>SELOUT<="0101";dout

"0110"=>SELOUT<="0110";dout

"0111"=>SELOUT<="0111";dout

"1000"=>SELOUT<="1000";dout

16X16点阵

<="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";

WHEN OTHERS=>NULL;

end case;

elsif din="0100" then

count<=count+1;

if count="1111" then

count<="0000";

end if;

case count is

"0000"=>SELOUT<="0000";dout

WHEN

<="0000000000000000";

WHEN

"0001"=>SELOUT<="0001";dout

<="0000000000000000";

WHEN

"0010"=>SELOUT<="0010";dout

<="0000000100000000";

WHEN

"0011"=>SELOUT<="0011";dout

<="0000000100000000";

16X16点阵

<="0000000100000000";

WHEN

"0101"=>SELOUT<="0101";dout

<="0000000100000000";

WHEN

"0110"=>SELOUT<="0110";dout

<="1111111111111111";

WHEN

"0111"=>SELOUT<="0111";dout

<="0000000100000000";

WHEN

"1000"=>SELOUT<="1000";dout

<="0000000100000000";

WHEN

"1001"=>SELOUT<="1001";dout

<="0000000100000000";

WHEN

"1010"=>SELOUT<="1010";dout

<="0000000100000000";

WHEN

"1011"=>SELOUT<="1011";dout

<="0000000100000000";

WHEN

"1100"=>SELOUT<="1100";dout

<="0000000100000000";

WHEN

"1101"=>SELOUT<="1101";dout

<="0000000100000000";

WHEN

"1110"=>SELOUT<="1110";dout

<="0000000100000000";

WHEN

"1111"=>SELOUT<="1111";dout

<="0000000100000000";

WHEN OTHERS=>NULL;

end case;

elsif din="0101" then

count<=count+1;

if count="1111" then

count<="0000";

16X16点阵

end if;

case count is

WHEN

<="0000000000000000";

WHEN

<="0000000000000000";

WHEN

<="0000000000000000";

WHEN

<="0000001111000000";

WHEN

<="0000110000110000";

WHEN

<="0001100000011000";

WHEN

<="0011000000001100";

WHEN

<="0110000000001100";

WHEN

<="1100000000000110";

WHEN

<="0110000000001100";

WHEN

<="0011000000011000";

WHEN

<="0001100000110000";

WHEN

<="0000011111000000";

WHEN

<="0000000000000000";

"0000"=>SELOUT<="0000";dout

"0001"=>SELOUT<="0001";dout

"0010"=>SELOUT<="0010";dout

"0011"=>SELOUT<="0011";dout

"0100"=>SELOUT<="0100";dout

"0101"=>SELOUT<="0101";dout

"0110"=>SELOUT<="0110";dout

"0111"=>SELOUT<="0111";dout

"1000"=>SELOUT<="1000";dout

"1001"=>SELOUT<="1001";dout

"1010"=>SELOUT<="1010";dout

"1011"=>SELOUT<="1011";dout

"1100"=>SELOUT<="1100";dout

"1101"=>SELOUT<="1101";dout

16X16点阵

WHEN "1110"=>SELOUT<="1110";dout

<="0000000000000000";

WHEN

"1111"=>SELOUT<="1111";dout

<="0000000000000000";

WHEN OTHERS=>NULL;

end case; end if; end if;

end process;

end behave;

六 、收获与体会

通过这次课设,我不仅更加熟悉了VHDL语言的用运,还学到了很多知识。

16X16点阵

七 、参考文献 《EDA技术与实验》

本文来源:https://www.bwwdw.com/article/ym44.html

Top