下载此文档

LED显示的电子钟设计.doc


文档分类:通信/电子 | 页数:约18页 举报非法文档有奖
1/18
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/18 下载此文档
文档列表 文档介绍
电子钟设计功能实现: 此电子钟实现了正常跑表时钟,闹钟,秒表,调节 LED 灯亮度的功能。此电子钟使用键 1 来控制模式选择。正常跑表时钟为默认模式。当按下键 1时, 接收到的高脉冲后模式跳转为闹钟时间模式,当再次按下键 1 时转到秒表模式。在正常跑表时钟模式中, 通过键 5 来控制时间调节, 当按下键 5 后用键 7 来调节时进位, 用键 4 来调节分进位。而在闹钟模式下, 同样采用键 5 来控制调节闹铃时间, 其中键 7 用来调节时进位,键 4 用来调节分进位。当正常跑表时钟的时间与闹钟模式下设置的时间相同时,蜂鸣器就会发出声响。在秒表模式下,键4 为控制键, 按下键 4 后秒表开始计时。在计时过程中,键8 为暂停键,键 5 为清零键。最后刷新 LED 功能,键 8 为控制键,按下键 8 后,通过键 7 来调节亮度。代码: 顶层文件 library ieee; use ; use ; entity electronic_clock is port( clk : in std_logic; k_minute,k_hour,k,k_8,input:in std_logic; --- -k_minute 为键 4, k_hour 为键 7,k 为键 5, k_8 为键 8, input 为键 1 voice:out std_logic; sg11:out std_logic_vector(6 downto 0); bt11:out std_logic_vector(7 downto 0)); end electronic_clock; architecture one of electronic_clock ponent clock ---- 正常跑表时间模式 port(clk,k_minute,k_hour,k:in std_logic; hour1,hour2,minute1,minute2,second1,second2:out std_logic_vector(3 downto 0)); ponent; component alarm --- 闹钟模式 port(clk,k,k_minute,k_hour:in std_logic; hour_1,hour_2,minute_1,minute_2,second_1,second_2:out std_logic_vector(3 downto 0)); ponent; component pao --- 秒表模式 port(clk:in std_logic; clk1: in std_logic; clk2:in std_logic; clk3:in std_logic; pao1,pao2,second_p1,second_p2:out std_logic_vector(3 downto 0)); ponent; component sound ----- 闹钟中的蜂鸣器 port(clk:in std_logic; s_in1:in std_logic_vector(3 downto 0); s_in2:in std_logic_vector(3 downto 0); s_in3:in std_logic_vector(3 downto 0); s_in4:in std_logic_vector(3 downto 0); s_in11:in std_logic_vector(3 downto 0); s_in12:in std_logic_vector(3 downto 0); s_in13:in std_logic_vector(3 downto 0); s_in14:in std_logic_vector(3 downto 0); s_out:out std_logic); ponent; component mux31a --- 控制选择输出 port( k_in:in std_logic; k_out:out std_logic_vector(1 downto 0); q1_out,q2_out:out std_logic); ponent; component fenpin --- 分频 port( clk_10000000:in STD_LOGIC; clk_100,clk_1,clk_10000:out STD_LOGIC); ponent; component xuanze --- 选择输出 port( q:in std_logic_vector(1 downto 0); second1:in std_logic_vector(3 downto 0); s

LED显示的电子钟设计 来自淘豆网m.daumloan.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数18
  • 收藏数0 收藏
  • 顶次数0
  • 上传人6188
  • 文件大小0 KB
  • 时间2016-05-11