数字系统设计(洗衣机控制器)(12页).doc
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《数字系统设计(洗衣机控制器)(12页).doc》由会员分享,可在线阅读,更多相关《数字系统设计(洗衣机控制器)(12页).doc(12页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、-数字系统设计(洗衣机控制器)-第 12 页实验报告 COURSE PAPER数字系统设计(洗衣机控制器)学院 :机电工程与自动化学院 学号: 学生姓名: 打印日期: 评分: 评语:一、实验目的: (1)学习系统电路设计; (2)巩固软件环境下的编程设计; 二、实验内容: (1) 实现以下系统功能:洗衣机控制器。 l 设计一个电子定时器,控制洗衣机作如下运转:定时启动正转20秒暂停10秒反转20秒暂停10秒定时未到回到“正转20秒暂停10秒”,定时到则停止; l 若定时到,则停机发出音响信号; l 用两个数码管显示洗涤的预置时间(分钟数),按倒计时方式对洗涤过程作计时显示,直到时间到停机;洗涤
2、过程由“开始”信号开始; l 三只LED灯表示“正转”、“反转”、“暂停”三个状态。 三、实验要求; l 在PC机上完成相应的设计输入,编译,仿真,对结果进行分析; l 完成下载,在实验板上对程序进行验证。 四、 实验步骤;(1) 实验分析 a.预设时间和编码电路(settime):接受用户通过按钮预置的时间信息,编码 成八位之后转给减法计数器。 b.减法计数器电路(counter):接收编码之后的预置时间信息,向电机运转控制电路传递运行信号,并将预置时间信息和剩余时间信息发给数码管显示电路进行实时显示。 c.数码管显示电路(showtime):接收减法计数器电路传来的时间信息,进行实时译码显
3、示。 e.电机运转时序控制电路(analyse):接收运行起止信号,安排电机运行状态并编码输出。 f.译码器(move):接收电机运行状态信号,译码后实时控制电机的正传、反转和暂停。程序框图如下:(2) 程序编写a.预设时间和编码电路(settime):library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity timeset is port load:in std_logic; time_input:in std_logic_vector(3 downto 0); time_set:out s
4、td_logic_vector(7 downto 0)end timeset;architecture timeset of timeset is signal p1:std_logic_vector(7 downto 0); begin process(load) begin if(loadevent and load=1) then case time_input is when 0000=p1p1p1p1p1p1p1p1p1p1p1=00000000; end case; end if; end process; time_set=p1;end timeset;b.减法计数器电路(cou
5、nter):library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity sub is port clk,start:in std_logic; time_set:in std_logic_vector(7 downto 0); time_remain:buffer std_logic_vector(7 downto 0); time_over:buffer std_logicend sub;architecture sub of sub is begin process(clk) variabl
6、e time_second:integer range 0 to 59 ; begin if(clkevent and clk=1) then if(start=0) then if(time_remain(7 downto 0)=0) then time_remain=time_set; else time_remain(7 downto 4)=time_remain(3 downto 0); time_remain(3 downto 0)=time_set(3 downto 0); end if; time_second:=59; time_over=1; else if(time_ove
7、r=1) then if(time_second=0 and time_remain(7 downto 0)=0) then time_over=0; else if(time_second=0) then if(time_remain(3 downto 0)=0) then time_remain(7 downto 4)=time_remain(7 downto 4)-1; time_remain(3 downto 0)=1001; time_second:=59; else time_remain(7 downto 4)=time_remain(7 downto 4); time_rema
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数字 系统 设计 洗衣机 控制器 12
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内