电子技术课程设计
多功能数字钟
学院:
专业、班级:
姓名:
学号:
指导老师:
2008年12月
目录
1、设计任务与要求…………………………………………2
2、总体框图…………………………………………………2
3、选择器件…………………………………………………2
4、功能模块…………………………………………………3
(1)时钟记数模块…………………………………………3
(2)整点报时驱动信号产生模块…………………………6
(3)八段共阴扫描数码管的片选驱动信号输出模块……7
(4)驱动八段字形译码输出模块…………………………9
5、总体设计电路图…………………………………………10
(1)仿真图…………………………………………………10
(2)电路图…………………………………………………11
(3)管脚图…………………………………………………11
6、设计心得体会……………………………………………12
一、设计任务与要求
1、具有时、分、秒记数显示功能,以24小时循环计时。
2、要求数字钟具有清零、调节小时、分钟功能。
3、具有整点报时,整点报时的同时LED灯花样显示。
二、总体框图
多功能数字钟总体框图如下图所示。它由时钟记数模块(包括hour、minute、second三个小模块)、驱动8位八段共阴扫描数码管的片选驱动信号输出模块(seltime)、驱动八段字形译码输出模块(deled)、整点报时驱动信号产生模块(alart)。
系统总体框图
选择器件
网络线若干/人、共阴八段数码管6个、蜂鸣器、hour(24进制记数器)、minute(60进制记数器)、second(60进制记数器)、alert(整点报时驱动信号产生模块)、seltime(驱动8位八段共阴扫描数码管的片选驱动信号输出模块)、deled(驱动八段字形译码输出模块)。
四、功能模块
多功能数字钟中的时钟记数模块、驱动8位八段共阴扫描数码管的片选驱动信号输出模块、驱动八段字形译码输出模块、整点报时驱动信号产生模块。(1) 时钟记数模块:
<>该模块的功能是:在时钟信号(CLK)的作用下可以生成波形;在清零信号(RESET)作用下,即可清零。
VHDL程序如下:
LIBRARY ieee;
use ;
use ;
entity hour is
port(clk,reset:in std_logic;
daout:out std_logic_vector(5 downto 0));
end entity hour;
architecture fun of hour is
signal count:std_logic_vector(5 downto 0);
begin
daout<=count;
process(clk,reset)
begin
if(reset='0') then
count<="000000";
elsif(clk' event and clk='1') then
if(count(3 downto 0)="1001") then
if(count<16#24#) then
count<=count+7;
else count<="000000";
end if;
elsif(count<16#23#) then
count<=count+1;
else count<="000000";
end if;
end if;
end process;
end fun;
<>
VHDL程序如下:
LIBRARY ieee;
use ;
use ;
entity minute is
port(clk,clk1,reset,sethour:in std_logic;
enhour:out std_logic
daout:out std_logic_vector(6 downto 0));
end entity minute;
architecture fun of minute is
signal count:std_logic_vector(6 downto 0);
begin
daout<=count;
process(clk,reset,sethour)
begin
if(rese
多功能数字钟48468 来自淘豆网m.daumloan.com转载请标明出处.