目录
设计功求 3
方案分析选择系统框图 4
模块功分析 6
仿真\载结果 9
验 10
操作指南 11
相关代码 12
设计功求
设计务
数字钟仅通数字直观显示日历时间音乐语言报时定时发出种声光电信号启动种设备实现实时控制时间序控制作息时间动铃家电设备动定时启动停止生产程序控制等途广课题求
1设计具时分秒计时6位数字显示时钟电路
2具快速校准时分校时功
3具仿电台动整点报时功者发出整点数目相等音响声
4具定扩展功
二设计求
1分析设计务拟定种设计方案根时制作条件选择中种方案绘制系统框图设计流程
2设计部分单元电路编写VHDL描述程序计算元器件参数确定元器件型号数量提出元件清单
3安装调试硬件电路制作CPLDFPGA基础专集成芯片ASIC
4制作电路进行功测试分析项技术指标VHDL描述进行功仿真ASIC作硬件测试脱机运行
5总结设计环节资料整理印出设计报告(含原理电路仿真波形)交验演示设计制作电路装置
方案分析选择系统框图
方案分析选择
1开发板选择编写VHDL描述程序结合AltiumDesigner中提供元件绘制原理图载开发板
2开发板资源包括LCD显示屏蜂鸣器键盘拨盘开关种频率方波信号种外接口LED灯等
根板资源需实现功选择板资源实现功
LCD显示屏显示时分秒计时
蜂鸣器整点报时闹铃功
拨盘开关时间设定闹铃设定声音开关
方波信号分频作时钟信号输入蜂鸣器发声
系统原理框图
整点报时模块
声音模块
蜂鸣器
存储器模块
控制模块
拨盘开关
信号发生器
时钟显示模块
LCD显示屏
计时模块
硬件原理图
模块功分析
计时模块
计时模块具时分秒计时功收时钟信号秒位计算加位加满时重新置零位进时输出端口会秒位秒十位分位分十位时位时十位8位数字信号输出模块
显示模块
LCD显示模块需显示代码位置代码输入控制模块脉会相应位置显示相应字符显示没滞较高脉频率显示时分秒6位数字需写LCD扫描输出模块时刻显示变化时间 LCD扫描输出需计时模块输出8位BCD码加48转化ASC2码时分秒间加入号区分
存储器模块
存储器模块址信号计时模块分位分十位时位时十位效位写入信号拨盘开关sw4控制输出信号声音模块写入开关拨盘开关sw3控制需闹铃时间写入会读出声音模块发声
整点报时模块
整点报时模块输入取图关键数数1时时整点报时时间声音模块发声
声音模块
声音模块包括音调选择开关整点报时闹铃模块实现求功
仿真\载结果
计时模块仿真图
载结果
第次载时候方知道没接线没改名字造成编译正常法载结果通摸索请教终实现载载发现许意想错误长时间弄清楚解决掉终实现预定功
验
电子技术课程设计前先做单片机课程设计做单片机课程设计时候边着板子边断载测试点点完善程序做电子技术课程设计时板子身边寝室写程序法验证方浪费时间直实验室两天时间问题解决掉明白做种设计必须断实践测试知道足里知道设计什完善方做什事果手边实验条件做什事学什东西事半功倍
验重果开始什没做种样问题会接踵知道解决验快知道究竟什方出现问题开始阶段果老师定幸运事情够告诉需知道什够告诉发现错误样节省摸索时间
点知道规果连语言规软件规知道设计呢摸索想摸索规会花太时间果开始阶段够基础书需记住印象碰问题时候知道里找解决方法容易学课程
总结起电子技术课程设计学果3点条件较简单入门
1关语言规软件操作书熟悉基础
2做实验实验中获丰富验
3请教
操作指南
设计拨盘开关作控制输入
sw0LCD灯开关关开
sw1闹铃开关关开
sw2整点报时开关 关开
sw3闹铃写入开关关RAM写入模式时利sw4设定闹铃
sw4闹铃设定开关sw3写入时效取消闹铃设定闹铃
sw5时调整关开始时调整时分秒均置零时秒1速度增加
sw6分十位调整 关开始分十位调整时分位秒均置零分十位秒1速度增加
sw7分十位调整 关开始分位调整时秒均置零分位秒1速度增加
提醒调整时间时应序调整时分十位分位
相关代码
整点报时音调选择模块
chosevhd
library ieee
use ieeestd_logic_1164all
use ieeestd_logic_arithall
use ieeestd_logic_unsignedall
entity chose is
port
(
enchoseinclkin1clkin2
in std_logic
clkout
out std_logic
)
end chose
architecture change of chose is
begin
process(clkin1clkin2enchosein)
begin
if en'1'
then
if chosein'1'
then
clkout
clkout
else
clkout<'1'
end if
end process
end change
计时模块
countervhd
library ieee
use ieeestd_logic_1164all
use ieeestd_logic_arithall
use ieeestd_logic_unsignedall
entity counter is
port
(
clkchangemintchangeminochangeh
in std_logic
sostminominthoht
buffer std_logic_vector(7 downto 0)
)
end counter
architecture add of counter is
begin
process(clksostminominthohtchangemintchangeminochangeh)
begin
if rising_edge(clk)
then
so
then
st
if (stx05 and sox09) or changemino'1'
then
mino
if (minox09 and stx05 and sox09) or changemint'1'or (changemino'1' and minox09)
then
mint
if (mintx05 and minox09 and stx05 and sox09) or changeh'1' or (changemint'1' and mintx05) or (changemino'1' and minox09 and mintx5)
then
ho
if( hox09 and mintx05 and minox09 and stx05 and sox09) or (changeh'1' and hox09)
then
ht
if(htx02 and hox03 and mintx05 and minox09 and stx05 and sox09) or (changeh'1' and htx02 and hox03)
then
ht
end if
end process
end add
声音开关模块
onoffvhd
library ieee
use ieeestd_logic_1164all
use ieeestd_logic_arithall
use ieeestd_logic_unsignedall
entity onoff is
port
(
enclkin
in std_logic
clkout
out std_logic
)
end onoff
architecture en of onoff is
begin
process(clkinen)
begin
if en'1'
then
clkout
clkout<'1'
end if
end process
end en
闹铃音乐模块
ringvhd
library ieee
use ieeestd_logic_1164all
use ieeestd_logic_arithall
use ieeestd_logic_unsignedall
entity ring is
port
(
clkin1clkin2clkin3clkin4clken
in std_logic
clkout
out std_logic
)
end ring
architecture change of ring is
signal num integer
begin
process(clknumclkin1clkin2clkin3clkin4en)
begin
if en'1'
then
if rising_edge(clk)
then
num
if num9
then
num<0
end if
if num1
then
clkout
then
clkout
then
clkout
then
clkout
then
clkout
then
clkout
then
clkout
then
clkout
else
clkout<'1'
end if
end process
end change
显示扫屏模块
showvhd
library ieee
use ieeestd_logic_1164all
use ieeestd_logic_arithall
use ieeestd_logic_unsignedall
entity show is
port
(
clk
in std_logic
data1data2data3data4data5data6
in std_logic_vector(7 downto 0)
add
out std_logic_vector(3 downto 0)
dataout
out std_logic_vector(7 downto 0)
)
end show
architecture change of show is
signal num integer
begin
process(clkdata1data2data3data4data5data6num)
begin
if rising_edge(clk)
then
num
then
num<0
end if
end if
if num0
then
add
then
add
then
add
then
add
then
add
then
add
then
add
then
add
end process
end change
整点报时声音模块
soundvhd
library ieee
use ieeestd_logic_1164all
use ieeestd_logic_arithall
use ieeestd_logic_unsignedall
entity sound is
port
(
timein
in std_logic_vector(7 downto 0)
enout
out std_logic
)
end sound
architecture en of sound is
begin
process(timein)
begin
if timeinxff
then
enout<'1'
else
enout<'0'
end if
end process
end en
文档香网(httpswwwxiangdangnet)户传
《香当网》用户分享的内容,不代表《香当网》观点或立场,请自行判断内容的真实性和可靠性!
该内容是文档的文本内容,更好的格式请下载文档