• <li id="00i08"><input id="00i08"></input></li>
  • <sup id="00i08"><tbody id="00i08"></tbody></sup>
    <abbr id="00i08"></abbr>
  • 新聞中心

    EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > 單片機拉幕式數(shù)碼顯示技術

    單片機拉幕式數(shù)碼顯示技術

    作者: 時間:2013-04-02 來源:網(wǎng)絡 收藏

    NEX6: CJNE A,#07H,NEX7

    MOV 36H,#8

    MOV 35H,#8

    MOV 34H,#8

    MOV 33H,#8

    MOV 32H,#8

    MOV 31H,#8

    MOV 30H,#8

    LJMP DONE

    NEX7: CJNE A,#08H,NEX8

    MOV 37H,#8

    MOV 36H,#8

    MOV 35H,#8

    MOV 34H,#8

    MOV 33H,#8

    MOV 32H,#8

    MOV 31H,#8

    MOV 30H,#8

    LJMP DONE

    NEX8: CJNE A,#00H,DONE

    MOV 37H,#10

    MOV 36H,#10

    MOV 35H,#10

    MOV 34H,#10

    MOV 33H,#10

    MOV 32H,#10

    MOV 31H,#10

    MOV 30H,#10

    LL: LJMP DONE

    DONE: RETI

    TABLE: DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FH,00H

    END

    7. C語言源程序

    #include AT89X51.H>

    unsigned char code dispcode[]={0x3f,0x06,0x5b,0x4f,

    0x66,0x6d,0x7d,0x07,

    0x7f,0x6f,0x77,0x7c,

    0x39,0x5e,0x79,0x71,0x00};

    unsigned char dispbitcode[]={0xf8,0xf9,0xfa,0xfb,

    0xfc,0xfd,0xfe,0xff};

    unsigned char dispbuf[8]={16,16,16,16,16,16,16,16};

    unsigned char dispbitcnt;

    unsigned int t02scnt;

    unsigned char t5mscnt;

    unsigned char u;

    unsigned char i;

    void main(void)

    {

    TMOD=0x02;

    TH0=0x06;

    TL0=0x06;

    TR0=1;

    ET0=1;

    EA=1;

    while(1);

    }

    void t0(void) interrupt 1 using 0

    {

    t5mscnt++;

    if(t5mscnt==4)

    {

    t5mscnt=0;

    P0=dispcode[dispbuf[dispbitcnt]];

    P1=dispbitcode[dispbitcnt];

    dispbitcnt++;

    if(dispbitcnt==8)

    {

    dispbitcnt=0;

    }

    }

    t02scnt++;

    if(t02scnt==1600)

    {

    t02scnt=0;

    u++;

    if(u==9)

    {

    u=0;

    }

    for(i=0;i8;i++)

    {

    dispbuf[i]=16;

    }

    for(i=0;iu;i++)

    {

    dispbuf[i]=8;

    }

    }

    }


    上一頁 1 2 3 下一頁

    評論


    相關推薦

    技術專區(qū)

    關閉
    主站蜘蛛池模板: 府谷县| 达州市| 肥城市| 宿州市| 常州市| 井陉县| 鸡东县| 津南区| 海门市| 封丘县| 富顺县| 铜山县| 双鸭山市| 高密市| 九寨沟县| 年辖:市辖区| 昌图县| 东乌珠穆沁旗| 清水河县| 大城县| 营山县| 社会| 博乐市| 和平县| 双峰县| 神农架林区| 离岛区| 丰宁| 溆浦县| 芦溪县| 平原县| 浙江省| 宝兴县| 富源县| 松江区| 晋宁县| 洛川县| 崇文区| 锡林浩特市| 阿拉尔市| 大连市|