單片機(jī)應(yīng)用實(shí)例:LED顯示電腦電子鐘
DO WHILE K1=0FFH;
K1=7;
END;
END;
end;
IF SK=0 THEN
DO;CALL TIME(100); /*SET KEY PROCESS*/
TIME1=30;
IF SK=0 THEN
DO;
tem=tem+1;
tem=dec(tem);
DO CASE K1;
DO WHILE tem=7;/*week*/
tem=0;
END;
DO WHILE tem=60H;/*scond*/
tem=0;
END;
DO WHILE tem=60H;/*minute*/
tem=0;
END;
DO WHILE tem=24H;/*hour*/
tem=0;
END;
DO WHILE tem=32H;/*date*/
tem=1;
END;
DO WHILE tem=13H;/*month*/
tem=1;
END;
DO while tem=100h; /* YEAR */
tem=00;
END;
DO WHILE TEM>=21H;
tem=19H;
END;
END;
A(K1)=tem;
if k1=7 then a(8)=tem;
END;
END;
END;
END;
end key;
main$program:
mk=1;sk=1;temp1=0;num=0;p32=1;
if sk=0 then call beginset;
clk=0;da=0;ale=1;
loop:
do while mk=1 ;
if a(0)>6 then a(0)=0;
command=0bfh;
call rbyt8;
call display;
do while mk=0;
call key;
call wbyt1(8eh,0);
command=0beh;
call wbyt8;
call wbyt1(0C0H,A(8));
call wbyt1(8eh,80h);
end;
end;
goto loop;
end start;
單片機(jī)相關(guān)文章:單片機(jī)教程
單片機(jī)相關(guān)文章:單片機(jī)視頻教程
單片機(jī)相關(guān)文章:單片機(jī)工作原理
評(píng)論