设计基于VHDL的简易全自动控制洗衣机.doc_第1页
设计基于VHDL的简易全自动控制洗衣机.doc_第2页
设计基于VHDL的简易全自动控制洗衣机.doc_第3页
设计基于VHDL的简易全自动控制洗衣机.doc_第4页
设计基于VHDL的简易全自动控制洗衣机.doc_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

华东理工大学2009 -2010 学年第2学期电子综合设计dea课程设计作业 2010.6 班级:xxxx 学号: xxx 姓名:xxxx开课学院:信息学院 任课老师: xxxx 成绩: 题目:1、简易全自动洗衣机控制器设计 2、通信系统信道编码器设计作业要求:电子系统设计eda课程是电子信息工程、自动控制、计算机科学与工程等专业的技术课之一,具有很强的工程实践性。课程学习要求学生:掌握现代硬件数字电路的软件化设计的基本方法、掌握应用vhdl及eda工具开发设计数字系统的基本方法以及对现代电子系统设计技术有一定的了解 设计报告要求:1、按照设计题目要求构建设计框图 2、用eda设计软件按照设计题目要求进行原型设计并给出仿真结果 3、对仿真结果进行一定的讨论 4、原程序和仿真波形等附录。教师评语: 教师签名: 年 月 日电子综合设计eda综合设计题设计一简易全自动洗衣机控制器。该控制器由两大状态a和b组成,每个状态分三个子状态,每个状态分别由选择a和选择b控制。其中a为步进选择按纽,每步跳转一个子状态、b也为步进选择按纽,但每步选择b中的所有组合中的一种。当启动时,时间序列控制器按已选的b类子状态顺序执行。过程启动由启动/暂停键控制(暂停键在过程启动后任意时间可暂停/恢复过程)过程启动后机盖开启应均能暂停过程,复盖间停30秒后重新继续原过程。a:强洗 标准 弱洗b:洗涤 漂洗 甩干 (洗涤,漂洗时电机分别正转、反转)强洗:(共36分钟) 洗涤 18分漂洗 14分甩干 4分(洗涤时电机分别正转4分、反转4分,正反转间停30秒;漂洗时电机分别正转3分、反转3分,正反转间停30秒;甩干时电机分别正转1.5分,间停30秒)标准:(共26分钟) 洗涤 14分漂洗 8 分甩干 4分(洗涤时电机分别正转3分、反转3分,正反转间停30秒;漂洗时电机分别正转1.5分、反转1.5分,正反转间停30秒;甩干时电机分别正转1.5分,间停30秒)弱洗(共20分钟) 洗涤 10分漂洗 6分甩干 4分(洗涤时电机分别正转2分、反转2分,正反转间停30秒;漂洗时电机分别正转1分、反转1分,正反转间停30秒;甩干时电机分别正转1.5分,间停30秒)设定秒脉冲已给定,指示为led,整过程完成后,蜂鸣器响30秒。整个设计为正逻辑。一、程序如下:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity xiyiji is port(count_n,count_m,start,cook,clk:in std_logic; look:out std_logic; dout :out std_logic_vector(1 downto 0);end xiyiji;architecture behav of xiyiji issignal dt1,dt2:std_logic_vector(1 downto 0);signal dicsount,tem:std_logic_vector(3 downto 0);signal dcp:std_logic_vector(3 downto 0);signal ct:std_logic_vector(5 downto 0);signal ct1,ct2:std_logic_vector(3 downto 0);signal sg,cmks:std_logic;begin process(count_n,sg) beginif sg=1 thendt1=00;elsif count_nevent and count_n=1 thenif dt1=3 thendt1=01;elsedt1=dt1+1;end if;end if;end process;process(count_m,sg)beginif sg=1 thendt2=00;elsif count_mevent and count_m=1 thenif dt2=3 thendt2=01;elsedt2=dt2+1;end if;end if;end process; process(start)beginif sg=1 thencmks=0;elsif startevent and start=1 then dicsount=dt1&dt2;cmks=cmks xor 1;end if;end process; process(clk,start,cook)beginif start=1 and dcp=0000 thendcp=dicsount;elsif clkevent and clk=1 thenif cook=1 thendout0000 thendout=00;elsif sg=1 thenif ct10001 thenct1=0000;sgif ct35 thenct=ct+1;if ct18 thendout=01;ct1=ct1+1;elsif ct1=8 thendout=00;ct1=ct1+1;elsif ct28 thendout=10;ct2=ct2+1;elsif ct2=8 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=0110;ct=000000;ct1=0000;ct2=0000;doutif ct27 thenct=ct+1;if ct16 thendout=01;ct1=ct1+1;elsif ct1=6 thendout=00;ct1=ct1+1;elsif ct26 thendout=10;ct2=ct2+1;elsif ct2=6 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=0111;ct=000000;ct1=0000;ct2=0000;doutif ct8 thenct=ct+1;if ct13 thendout=01;ct1=ct1+1;elsif ct1=3 thendout=00;ct1=ct1+1;elsif ct23 thendout=10;ct2=ct2+1;elsif ct2=3 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=0000;ct=000000;ct1=0000;ct2=0000;sgif ct27 thenct=ct+1;if ct16 thendout=01;ct1=ct1+1;elsif ct1=6 thendout=00;ct1=ct1+1;elsif ct26 thendout=10;ct2=ct2+1;elsif ct2=6 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=1010;ct=000000;ct1=0000;ct2=0000;doutif ct15 thenct=ct+1;if ct13 thendout=01;ct1=ct1+1;elsif ct1=3 thendout=00;ct1=ct1+1;elsif ct23 thendout=10;ct2=ct2+1;elsif ct2=3 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=1011;ct=000000;ct1=0000;ct2=0000;doutif ct8 thenct=ct+1;if ct13 thendout=01;ct1=ct1+1;elsif ct1=3 thendout=00;ct1=ct1+1;elsif ct23 thendout=10;ct2=ct2+1;elsif ct2=3 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=0000;ct=000000;ct1=0000;ct2=0000;sgif ct19 thenct=ct+1;if ct14 thendout=01;ct1=ct1+1;elsif ct1=4 thendout=00;ct1=ct1+1;elsif ct24 thendout=10;ct2=ct2+1;elsif ct2=4 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=1110;ct=000000;ct1=0000;ct2=0000;doutif ct11 thenct=ct+1;if ct12 thendout=01;ct1=ct1+1;elsif ct1=2 thendout=00;ct1=ct1+1;elsif ct22 thendout=10;ct2=ct2+1;elsif ct2=2 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=1111;ct=000000;ct1=0000;ct2=0000;doutif ct8 thenct=ct+1;if ct13 thendout=01;ct1=ct1+1;elsif ct1=3 thendout=00;ct1=ct1+1;elsif ct23 thendout=10;ct2=ct2+1;elsif ct2=3 thendout=00;ct1=0000;ct2=0000;end if;elsedcp=0000;ct=000000;ct1=0000;ct2=0000;sgdout=00;end case;end if;end if;end process;look=sg; end behav;二、仿真波形如下强洗全部过程强洗 漂洗、甩干强洗(甩干)标准全部过程标准(漂洗、甩干)标准(甩干)弱洗全过程弱洗(漂洗、甩干)九、弱洗(甩干)强开盖子:一、强洗强开盖一、 标准强开盖二、 弱洗强开盖暂停和启动一、 强洗暂停二、 强洗重新启动三、 标准暂停四、 标准重新启动五、 弱洗暂停六、 弱洗重新启动两次洗衣一、 两次强洗两次标准(漂洗、甩干)二、 两次弱甩干三、设计思想讨论设计时参考了已有程序,此芯片有五个输入和三个输出,输入count_m和输入count_n是状态控制键,输入start是输入启动和暂停键,以及一个时钟clk。输出是洗衣结束铃声端口和电机驱动端口。在设计中,为便于调试和观察将时钟周期假设为30s。本次设计大致可以分成两个模块来看待,控制端和工作端。控制部分使用了三个进程来处理,进程一控制状态count_m,进程二控制状态count_n,进程三控制开始和暂停。工作部分使用了一个进程来处理,在该进程中主要处理强制开盖,洗衣的各个状态,以及洗衣结束后的铃声。控制端count_m中,sg是工作结束标志信号,信号ts控制洗衣机的暂停和重新启动,dt是状态的中间变量。cookk为强开洗衣机盖子信号端,dcp输入状态中间信号。洗衣机正常工作过程:洗衣机总共有九种工作状态,这九种状态可以分成三大部分,强洗,标准,弱洗,此三种状态的洗衣过程类似,因此以强洗来解释说明。洗涤完成后,将信号tp变换到漂洗状态,然后变换到甩干,甩干结束后

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论