整理LCD计数显示程序Word下载.docx

上传人:b****3 文档编号:15072235 上传时间:2022-10-27 格式:DOCX 页数:15 大小:17.96KB
下载 相关 举报
整理LCD计数显示程序Word下载.docx_第1页
第1页 / 共15页
整理LCD计数显示程序Word下载.docx_第2页
第2页 / 共15页
整理LCD计数显示程序Word下载.docx_第3页
第3页 / 共15页
整理LCD计数显示程序Word下载.docx_第4页
第4页 / 共15页
整理LCD计数显示程序Word下载.docx_第5页
第5页 / 共15页
点击查看更多>>
下载资源
资源描述

整理LCD计数显示程序Word下载.docx

《整理LCD计数显示程序Word下载.docx》由会员分享,可在线阅读,更多相关《整理LCD计数显示程序Word下载.docx(15页珍藏版)》请在冰豆网上搜索。

整理LCD计数显示程序Word下载.docx

lcd_rw:

outstd_logic);

endcounter;

architectureBehavioralofcounteris

componentcounter60is

resetn:

outstd_logic_vector(7downto0));

endcomponent;

componentdecoderis

Port(din:

instd_logic_vector(3downto0);

dout:

outstd_logic_vector(8downto0));

componentlcd_interfaceis

port(

clk:

dout_s10:

instd_logic_vector(8downto0);

dout_s1:

lcd_data:

outstd_logic_vector(7downto0);

outstd_logic

);

signalddout_s10:

std_logic_vector(8downto0);

signalddout_s1:

signalddout:

std_logic_vector(7downto0);

begin

u1:

counter60portmap(clk,resetn,ddout);

u2:

decoderportmap(ddout(7downto4),ddout_s10);

u3:

decoderportmap(ddout(3downto0),ddout_s1);

u4:

lcd_interfaceportmap(clk,resetn,ddout_s10,ddout_s1,dout,lcd_en,lcd_rs,lcd_rw);

endBehavioral;

--------------------------------------------------------------------------------

--Company:

--Engineer:

--

--CreateDate:

13:

36:

1003/30/06

--DesignName:

--ModuleName:

count60-Behavioral

--ProjectName:

--TargetDevice:

--Toolversions:

--Description:

--Dependencies:

--

--Revision:

--Revision0.01-FileCreated

--AdditionalComments:

entitycounter60is

endcounter60;

architectureBehavioralofcounter60is

signalcount:

std_logic_vector(7downto0);

signalcount_div:

std_logic_vector(25downto0);

dout<

=count;

process(clk)

begin

if(clk'

eventandclk='

1'

)then

if(resetn='

0'

count_div<

=(others=>

'

);

elseif(count_div(25)='

)then

count_div<

'

);

else

=count_div+1;

endif;

endprocess;

process(clk,resetn)

ifresetn='

then

count<

elsifrising_edge(clk)then

if(count_div(25)='

ifcount(3downto0)="

1001"

count(3downto0)<

="

0000"

;

count(7downto4)<

=count(7downto4)+1;

else

=count(3downto0)+1;

ifcount="

01011001"

count<

00000000"

endif;

25:

3703/30/06

decoder-Behavioral

entitydecoderis

Port(din:

--四位二进制码输入

dout:

--输出LED七段码

enddecoder;

architectureBehavioralofdecoderis

process(din)

casedinis

when"

=>

dout<

100110000"

--30

0001"

100110001"

--31

0010"

100110010"

--32

0011"

100110011"

--33

0100"

100110100"

--34

0101"

100110101"

--35

0110"

100110110"

--36

0111"

100110111"

--37

1000"

100111000"

--38

100111001"

--39

whenothers=>

100100000"

;

endcase;

endprocess;

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_arith.all;

useieee.std_logic_unsigned.all;

entitylcd_interfaceis

endlcd_interface;

architecturelcd_interface_archoflcd_interfaceis

signallcd_we_n:

std_logic;

signallcd_en_int:

signal

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

当前位置:首页 > 工程科技

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

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