基于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。基于vhdl语言的简易洗衣机控制器
相关推荐
ADC0809 的输入要求是电压量 , 所以在 AD590 的负极接出一个 1kΩ 的电阻 R 和一个 100Ω 的可调电阻 W, 将电流量变为电压量送入ADC0809。 通过调节可调电阻 , 便可在输出端 VT 获得与绝对温度成正比的电压量 , 即 10 mV/K。 图 31 AD590 应用电路图 AD590 +5V VT 10mv/K 100ΩW 1000Ω R 何凡
指令 (3) 发送存储器指令 单片机系统 STC89C52RC 性能 STC89C52RC 是 我国宏晶 公司生产的低电压, 高性能 CMOS8 位微控制器,具有 8K 在系统可编程 Flash 存储器。 在单芯片上,拥有灵巧 的 8 位 CPU 和在系统可编程 Flash,使得 STC89C52 为众多嵌入式控制应用系统提供高灵活、超有效的解决方案。 具有以下标准功能: 8k 字节 Flash
此图 AT89C2051 内部结构图 12 外 ,从 AT89C2051 内部结构图也可看出 ,其内部结构与 8051 内部结构基本一致(除模拟比较器外) ,引脚 RST、 XTAL XTAL2 的特性和外部连接电路也完全与 51 系列单片机相应引脚一致 ,但 P1 口、 P3 口有其独特之处。 AT89C2051的引脚说明 AT89C2051 是一个有 20 个引脚的芯片 ,与 8051
脚接地, XTAL2 引脚接外部振荡器信号。 3. 控制引脚 控制引脚共有 4个,分别是 RST/ VPD、 ALE/ PR0G、 PSEN、 EA/ Vpp。 复位引脚 RST/ VPD 是第 9 脚,需要外接复位电路,在此引脚上出现两个机器周期的高电平就会使单片机复位。 一般来说复位电路是在此引脚和 Vss 引脚之间加一个 10k 欧姆的电阻,在和 Vcc 引脚之间加 — 个 10pF
15 int new_fd,sockfd1。 struct sockaddr_in client_addr。 sockfd1=*((int *)fd)。 int sin_size=sizeof(struct sockaddr_in)。 //循环接收连接 while(1){ new_fd=my_accept(sockfd1,(struct sockaddr *)amp。 client_addr
液晶模块内部的控制器共有 11 条控制指令,丰富的指令可以完成液晶的时序控制、工作方式设置和数据显示等。 采用的 LCD1602 液晶模块是标准 16 针插座,接口电路如图 26 所示,及各引脚说明如表 26 所示。 11 61 51 41 31 21 11 098675432V S SER / WR SV LV D DD 2D 1D 0D 7D 6D 5D 4D 3B L KB L A1 6