日韩床上生活一级视频|能看毛片的操逼网站|色悠悠网站在线观看视频|国产免费观看A淫色免费|国产av久久久久久久|免费A级视频美女网站黄|国产毛片av日韩小黄片|热久久免费国产视频|中文字幕无码色色|成人在线视频99久久久

機(jī)電之家資源網(wǎng)
單片機(jī)首頁(yè)|單片機(jī)基礎(chǔ)|單片機(jī)應(yīng)用|單片機(jī)開(kāi)發(fā)|單片機(jī)文案|軟件資料下載|音響制作|電路圖下載 |嵌入式開(kāi)發(fā)
培訓(xùn)信息
贊助商
[轉(zhuǎn)載]LED顯示電腦電子鐘
[轉(zhuǎn)載]LED顯示電腦電子鐘
 更新時(shí)間:2008-8-17 16:44:39  點(diǎn)擊數(shù):9
【字體: 字體顏色

call rb1(0fdh,6);
end rbyt6;
wbyt6:procedure;
call wbyt1(8eh,0); /* write enable */
call wbyt1(0f0h,ab(0));
call wbyt1(0f2h,ab(1));
call wbyt1(0f4h,ab(2));
call wbyt1(0f6h,ab(3));
call wbyt1(0f8h,ab(4));
call wbyt1(0fah,ab(5));
call wbyt1(0fch,ab(6));
call wbyt1(8eh,80h); /* write disable */
end wbyt6;
rbyt8:procedure;/*時(shí)鐘多字節(jié)突發(fā)模式讀過(guò)程*/
declare (i,j) byte;
call clear;
rst=1;
call send1302(command);
io=1;
do j=1 to 8;
do i=0 to 7;
sclk=1;
call time(1);
sclk=0;
cy=io;
n=scr(n,1);
end;
a(j)=n;
end;
call clear;
a(0)=a(6);a(6)=A(7);
a(0)=a(0) and 0fh;
if a(0)>6 then a(0)=0;
CALL RBYT1;
if (a(1)=0 and a(2)=0 and a(3)=0) then
do;
do num=0 to 35;
call time(250);
end;
temp1=1;
end;
if temp1=1 then
do;
temp1=0;
ab(4)=ab(4)+1;
if ab(4)>99h then
do;
ab(4)=0;
ab(5)=ab(5)+1;
if ab(5)>99h then ab(5)=0;
end;
call wbyt6;
end;
end rbyt8;
display:procedure; /*jieya,yima,fasong*/
declare (i,n,m) byte;
n=a(0) and 0fh; /* send week */
data=week(n);
call send595;
n=a(4); /* send date */
n=n and 0fh;
data=aco(n);
call send595;
n=a(4);
n=shr(n,4);
data=aco(n);
call send595;
do i=1 to 3; /* send second,minute,hour */
n=a(i);
n=n and 0fh;
data=aco(n);
call send595;
n=a(i);
n=shr(n,4);
data=aco(n);
call send595;
end;
do i=5 to 6; /* send month,year */
n=a(i);
n=n and 0fh;
data=aco(n);
call send595;
n=a(i);
n=shr(n,4);
data=aco(n);
call send595;
end;
n=a(8); /* send 19 or 20 */
n=n and 0fh;
data=aco(n);
call send595;
n=a(8);
n=shr(n,4);
data=aco(n);
call send595;
do m=0 to 5;
n=ab(m);
n=n and 0fh;
data=aco(n);
call send595_1;
n=ab(m);
n=shr(n,4);
data=aco(n);
call send595_1;
end;
ale=0;
ale=1;
end display;
beginset:procedure;
a(0)=06h;a(1)=58h;a(2)=59h;a(3)=23h;
a(4)=30h;a(5)=06h;a(6)=97h;a(7)=00;
a(8)=19h; /* set date/time (1997,7,1,8:00:00,week 3) */
call wbyt1(8eh,0); /* write enable*/
call wbyt1(80h,00h);/* start colock */
call wbyt1(0beh,0abh);/*兩個(gè)二極管與8K電阻串聯(lián)充電*/
command=0beh; /* write colock/date */
call wbyt8;
call wbyt1(0c0h,a(8));
call wbyt1(8eh,80h); /* set write protect bit */
end beginset;
key:procedure;
declare (i,time1,k1,tem) byte;
call time(100);
k1=7;time1=30;
if mk=0 then
do;
do while time1>0;
week: if k1=0 then
do;
do i=0 to 5;
/* call hz(a(0)); */
end;
do i=0 to 3;
/* call hz0; */
end;
end;
tem=a(k1);
if k1=7 then tem=a(8);
a(k1)=0aah;
if k1=7 then a(8)=0aah;
call display;
call time(254);
call time (254);
a(k1)=tem;
if k1=7 then a(8)=tem;
call display;
call time(254);
call time(254);
call time(254);
time1=time1-1;
if mk=0 then
do;call time(100); /*MOD KEY PROCESS*/
TIME1=30;
IF MK=0 THEN
DO;
k1=k1-1;
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;

  • 上一篇: 基于89C52單片機(jī)的具有通訊口的智能溫控表
  • 下一篇: [轉(zhuǎn)載]基于C8051F020的CF卡文件存儲(chǔ)
  • 發(fā)表評(píng)論   告訴好友   打印此文  收藏此頁(yè)  關(guān)閉窗口  返回頂部
    熱點(diǎn)文章
     
    推薦文章
     
    相關(guān)文章
    網(wǎng)友評(píng)論:(只顯示最新5條。)
    關(guān)于我們 | 聯(lián)系我們 | 廣告合作 | 付款方式 | 使用幫助 | 機(jī)電之家 | 會(huì)員助手 | 免費(fèi)鏈接

    點(diǎn)擊這里給我發(fā)消息66821730(技術(shù)支持)點(diǎn)擊這里給我發(fā)消息66821730(廣告投放) 點(diǎn)擊這里給我發(fā)消息41031197(編輯) 點(diǎn)擊這里給我發(fā)消息58733127(審核)
    本站提供的機(jī)電設(shè)備,機(jī)電供求等信息由機(jī)電企業(yè)自行提供,該企業(yè)負(fù)責(zé)信息內(nèi)容的真實(shí)性、準(zhǔn)確性和合法性。
    機(jī)電之家對(duì)此不承擔(dān)任何保證責(zé)任,有侵犯您利益的地方請(qǐng)聯(lián)系機(jī)電之家,機(jī)電之家將及時(shí)作出處理。
    Copyright 2007 機(jī)電之家 Inc All Rights Reserved.機(jī)電之家-由機(jī)電一體化網(wǎng)更名-聲明
    電話(huà):0571-87774297 傳真:0571-87774298
    杭州濱興科技有限公司提供技術(shù)支持

    主辦:杭州市高新區(qū)(濱江)機(jī)電一體化學(xué)會(huì)
    中國(guó)行業(yè)電子商務(wù)100強(qiáng)網(wǎng)站

    網(wǎng)站經(jīng)營(yíng)許可證:浙B2-20080178-1