基于vhdl语言的简易洗衣机控制器内容摘要:

0)=0) then time_over=39。 039。 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_remain(3 downto 0)=time_remain(3 downto 0)1。 time_second:=59。 end if。 else time_second:=time_second1。 end if。 end if。 . . end if。 end if。 end if。 end process。 end counter。 数码管显示模块( showtime) 数码管显示模块 showtime 如图 5 所示,本模块 clk 为系统时序脉冲信号 ,time_remain 接收减法计数器电路传来的时间信息,进行实时译码显示,a,b,c,d,e,f,g 分别对应数码管的七段, minute 和 second 分别位选两个数码管,显示十位和个位。 图 5 数码管显示模块 仿真图 图 6 数码管显示模块 仿真图 . . 数码管显示模块源程序 library ieee。 use。 use。 entity showtime is port ( time_remain:in std_logic_vector(7 downto 0)。 clk:in std_logic。 minute,second:out std_logic。 a,b,c,d,e,f,g:out std_logic )。 end showtime。 architecture showtime of showtime is signal temp:std_logic_vector(6 downto 0)。 signal bcd:std_logic_vector(3 downto 0)。 signal choose:std_logic。 begin process(clk) begin if(clk39。 event and clk=39。 139。 ) then choose=not choose。 if(choose=39。 139。 ) then minute=39。 039。 second=39。 139。 bcd= time_remain(7 downto 4)。 else minute=39。 139。 second=39。 039。 bcd= time_remain(3 downto 0)。 end if。 end if。 end process。 process(bcd) begin case bcd is when 0000=temp=1111110。 when 0001=temp=0110000。 . . when 0010=temp=1101101。 when 0011=temp=1111001。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。