《EDA-洗衣机控制器设计.doc》由会员分享,可在线阅读,更多相关《EDA-洗衣机控制器设计.doc(12页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、沈阳理工大学课 程 EDA设计 题 目 洗衣机控制器设计 院 系 装备工程学院 专业班级 探测制导与控制技术 学生姓名 杜继石 学生学号 0811020219 指导教师 钱博 2010年 12 月21日果效预设零作工定达,显的生数并时显码,性规定按 据相输定照后完结调验束结时知工上直来, 停,低变持作高变的钟随开转 平电 维高来沿上时功( 低变0持高能功 达沿一时当始洗高 、 间涤 按接真下图分结仿 ) = 0 ;0 = 0= ;= = 0 0 ( 0( ) ( ;) _ : _ ( _ _ 码 ; ; _ : _ ;0 = ( _ ( - ( _ ( - ( = ( ( = ( =0 _ -
2、 ( 0 0) ( _ ( 00 _ ; _0= _ = : _ 0= 0 : ) : )0 ( ) _ : . . _ 电码时 0 ; ;= 0= ( 0;= ;: )( 0 = _ : : _ :_ ) : _ ( . _ . _ _ 电 )( )( )( ) ;) = = 0=0 =0 0 0 000 0 =0 ) _ ) _ :, ,) ( _ _ _ 显显显管码程模应块 示路成组、管、码间时电序器法:成分有路电电设过试步未时 停时0000启框计 停到 暂 反0暂0转动块块用别成组制启转、设进控机及控、扫制示时、模、式运控流直间现实件的 数间层顶功个层,层计,进语件 的用编芯对状和停、
3、制控正度机设态作显并作的衣水、进洗控制盘接 。部了成外 一的时主设控原原基思计态状三“”正示 始始始开涤机间直示作涤式计,数分预涤管码号信音则,定止则定”0转到回 停 转0停 转时转如机制时电计求音提时,则定秒暂转到未秒 暂 秒 0动时完间在衣间作机定态停、机洗器机个一容 月 0 师 0 0 杜 术制导 级 学 计制 计设 导 0 学生 石 姓 术控制测 业专 院学装 系 计器机 目 题 大工理工 目机 业 生 0 制 0 师 一个、态作在完动 暂到暂则提音制机 转 定定则号涤数计示涤始 正状计原控一 部。制洗的并态正制停芯的语计层顶数 间直运模示控进、组用块00 计启0停 时设电成法时、组示
4、 模显显 ( ), _ 0 0 00 = 00 () ) ) _ _ ( : ) _ : = 0 ) ; 0: 码 _. ( ) 0 _ : _= 0( 0 0 = ( _ - (_ ( 0 ; _ ( _ ) ) ( 0;= = temp; 0000= 1111110; 0001= 0110000 0010= 1101101 0011= 1111001 0100= 0110011 0101= 1011011 0110= 1011111 0111= 1110000 1000= 1111111 1001= 1111011 End table;a=temp(6);b=temp(5);c=temp(
5、4);d=temp(3);e=temp(2);f=temp(1);g=temp(0);end rtl时序电路Library ieee;Use ieee.std_logic_1164.all;Use ieee.std_logic_unsigned.allEntity shixu isPort(cp,en,rd:in std_logic;Q1,q2:out std_logic);End shixu;Architecture rtl of shixu isBeginProcess(cp)Variable wash_time:integer range 0 to 19;Variable wash_ti
6、me:integer range 0 to 9;Variable state:std_logic;Variable wash_time:integer :=21;Variable wash_time:integer :=9;BeginIf(en=0)wash_time:=19;wait_time:=9;state:=0;End if;if(en=0)then wash_time:=21;Q1=0;Q20)Then wash_time:=20;state:=not state;End if; end if; end if;If(wash_time=0)then Q1=0;Q2=0;else if
7、 (state=0)Then Q1=1;Q2=0; else Q1=0;Q2=1;End if; end if;Else Q10 and start=1)then time_second:=time_second-1;else time_second:=59; end if;if(start=0)then time_remain0) then time_remain(3 downto 0)=time_remain(3 downto 0)-start; time_remain(3 downto 0)0)then time_remain(7 downto 4) =time_remain(7 dow
8、nto 4)-start; time_remain(7 downto 4)=time_remain(7 downto 4)-1; time_remain(3 downto 0)=1001;time_second:=59;end if; end if;else if (time_second=0 and time_second=1) if(time_remain=0)then time_is_up=0;else time_is_up=1; time_second:=time_second-1;end if;end if;end if;end if;end process; end rtl;译码器
9、library ieee;use ieee.std_logic_1164.all;entity decoder is port( Q1,Q2: in std_logic; REV,RUN,PAUSE: out std_logic );end decoder;architecture rtl of decoder issignal choose:std_logic_vector(1 downto 0);beginchoose(1)=q1;choose(0)REV=0;RUN=0;PAUSEREV=0;RUN=1;PAUSEREV=1;RUN=0;PAUSEREV=0;RUN=0;PAUSE=0;
10、end case;end process;REV=Q2;RUN=Q1;PAUSE=not(Q1 OR Q2);end rtl;3、仿真及仿真结果分析仿真信号图如下:仿真图洗衣机接通电源,按load设置洗涤时间按start、rd置为高电平洗衣机开始工作,当时钟第一个上升沿到达时run(正转功能)为高电平维持20s以后变为低电平而pause(暂停功能)随着时钟上升沿的到来变为高电平维持10s变为低电平,然后rev(反转功能)开始随着时钟上升沿的到来变为高电平工作维持20s后变为低电平,再停止pause置高,接下来电路一直重复上述工作,知道定时器计数结束。4、实验调试结果电路设计完成以后,按照预定设计,输入相应数据,三只LED灯按照设定时间规律间断性亮起,数码管也显示输入时间并按减数计时产生相应的数字显示,直到到达预定时间停止工作显示零,实验设计达到预期效果。