新聞中心

        EEPW首頁(yè) > 消費(fèi)電子 > 設(shè)計(jì)應(yīng)用 > LED顯示電腦電子鐘電路及控制程序

        LED顯示電腦電子鐘電路及控制程序

        作者: 時(shí)間:2012-03-01 來源:網(wǎng)絡(luò) 收藏


        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;

        本文引用地址:http://www.104case.com/article/165853.htm

        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;

        DIY機(jī)械鍵盤相關(guān)社區(qū):機(jī)械鍵盤DIY




        評(píng)論


        相關(guān)推薦

        技術(shù)專區(qū)

        關(guān)閉
        主站蜘蛛池模板: 白山市| 扶绥县| 辛集市| 北宁市| 泸水县| 石家庄市| 固始县| 富民县| 高要市| 鲁山县| 河西区| 酒泉市| 桂东县| 十堰市| 新平| 广西| 上饶市| 布尔津县| 商城县| 吴堡县| 凉城县| 绥阳县| 丰镇市| 开封县| 苗栗市| 崇礼县| 聊城市| 龙门县| 永川市| 巩留县| 若羌县| 金平| 永宁县| 新和县| 张家口市| 永靖县| 潞西市| 汨罗市| 湛江市| 太湖县| 隆化县|