保存桌面快捷方式 - - 设为首页 - 手机版
凹丫丫旗下网站:四字成语大全 - 故事大全 - 范文大全
您现在的位置: 范文大全 >> 理工论文 >> 电子通信论文 >> 正文

一种新型的电子点菜系统


·(初始化语句)

dressout<="01100100"; ——从存储器中读取密码

savedata<=datain;

if(key_valid=`1`and judgecheck=`0`) then

——准备校对密码

if(judgestate="000" and savedata(27 downto 24)

=butt_code)then ——确认是初状态

judgestate:="001"; ——校对成功则进入

end if; ——下一个状态

if(judgestate="001" and savedata(23 downto 20)

=butt_code)then

judgestate:="010";

downto 8)=butt_code)then

·(循环校对)

elsif(judgestate="110"and savedata(3 downto 0)/

=butt_code)then

judgestate:="000";

end if;

if(butt_code="1011" and judgestate="111")then——校对成功

judgecheck:=`1`; ——赋校对成功值

ledout<="011"; ——点亮绿灯

judgestate:="000"; ——恢复初值

elsif(butt_code="1011" and judgestate/="111")then

——如果密码错误

judgestate:="000"; ——恢复初值

ledout<="110"; ——点亮红灯

end if;

elsif(key_valid=`1` and judgecheck=`1`)then

——密码输入正确,执行以下功能

if(butt_code="1001")then ——如果想要改变密码

ledout<="101";

reset<=`1`;

j:=0;

end if;

if(reset=`1` and butt_code/="1001")then

if(staterecode="00" and j=0 and butt_code/="

1011")the ——最初状态

savedata

《一种新型的电子点菜系统(第3页)》
本文链接地址:http://www.oyaya.net/fanwen/view/177195.html

★温馨提示:你可以返回到 电子通信论文 也可以利用本站页顶的站内搜索功能查找你想要的文章。