色婷婷AⅤ一区二区三区|亚洲精品第一国产综合亚AV|久久精品官方网视频|日本28视频香蕉

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > 8*8點陣顯示程序(匯編)

          8*8點陣顯示程序(匯編)

          作者: 時間:2016-11-18 來源:網(wǎng)絡(luò) 收藏

          //8*8點陣LED顯示,用單片機AT89C51 驅(qū)動8*8點陣LED顯示屏
          //輪流顯示0-9的數(shù)字,顯示的方式采用自右向左拉幕式顯示

          本文引用地址:http://cafeforensic.com/article/201611/315816.htm

          //源程序和proteus仿真我一打包,地址:http://proteus.5d6d.com/thread-9031-1-1.html

          R_CNTEQU31H
          NUMBEQU32H
          TCOUNTEQU33H
          ORG0000H
          LJMPSTART
          ORG0BH ;定時器中斷入口地址
          LJMPINT_T0

          ORG0030H
          START:MOVR0,#00H ;顯示的幕次(即每一幕顯示的:行碼起始序號)值0
          MOVR_CNT,#00H;列碼序列號置0
          MOVTCOUNT,#00H ;行碼序列號置0
          MOVTMOD,#01H
          MOVTH0,#(65536-5000)/256
          MOVTL0,#(65536-5000)MOD 256
          SETB TR0
          MOVIE,#82H
          SJMP$

          //定時器中斷處理函數(shù)
          INT_T0:MOVTH0,#(65536-5000)/256
          MOVTL0,#(65536-5000)MOD 256
          MOVDPTR,#TAB ;取列碼表 首地址
          MOVA,R_CNT
          MOVCA,@A+DPTR
          MOVP3,A
          MOVDPTR,#NUB ;取行碼表 首地址
          MOVA,NUMB
          MOVCA,@A+DPTR
          MOVP0,A ;輸出行號

          INCNUMB
          NEXT1: INCR_CNT
          MOVA,R_CNT
          CJNEA,#8,NEXT2
          MOVR_CNT,#0
          MOVNUMB,R0
          NEXT2: INCTCOUNT
          MOVA,TCOUNT
          CJNEA,#40,NEXT4 ;每個數(shù)字顯示200ms
          MOVTCOUNT,#00H
          INC R0 ;上一幕顯示行碼的起始序列號+1
          CJNER0,#88,NEXT3
          MOVR0,#00H

          NEXT3:MOVNUMB,R0 ;送新一幕顯示行碼的起始序列號
          NEXT4:RETI

          TAB: DB 0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,7FH;列值

          NUB: DB 00H,00H,00H,00H,00H,00H,00H,00H;空
          DB 00H,00H,3EH,41H,41H,41H,3EH,00H;0
          DB 00H,00H,00H,00H,21H,7FH,01H,00H;1
          DB 00H,00H,27H,45H,45H,45H,39H,00H;2
          DB 00H,00H,22H,49H,49H,49H,36H,00H;3
          DB 00H,00H,0CH,14H,24H,7FH,04H,00H;4
          DB 00H,00H,72H,51H,51H,51H,4EH,00H;5
          DB 00H,00H,3EH,49H,49H,49H,26H,00H;6
          DB 00H,00H,40H,40H,40H,4FH,70H,00H;7
          DB 00H,00H,36H,49H,49H,49H,36H,00H;8
          DB 00H,00H,32H,49H,49H,49H,3EH,00H;9
          DB 00H,00H,00H,00H,00H,00H,00H,00H;空

          END



          關(guān)鍵詞: 8*8點陣顯示程序匯

          評論


          相關(guān)推薦

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

          關(guān)閉