新聞中心

EEPW首頁 > 光電顯示 > 設(shè)計(jì)應(yīng)用 > LED點(diǎn)陣顯示實(shí)驗(yàn)

LED點(diǎn)陣顯示實(shí)驗(yàn)

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

****************************************************

END

(二)HZ51兩個(gè)示例程序。和Hz16字符的簡單。

*********示例程序***********************

**該程序hz16字符**

**為了簡單起見,程序只顯示一個(gè)字符**

**該程序針對T598機(jī)的模塊14**

****************************************************

CSEQU8000H

CSR1EQUCSLED;行1273

CSR2EQUCSLED+1H;行2273

CSC1EQUCSLED+2H;列1374

CSC2EQUCSLED+3H;列2374

ORG0000H

MOVSP,#60H

INIT:MOVA,#0H;關(guān)閉LED顯示

MOVDPTR,#CSR1

MOVX@DPTR,A

MOVDPTR,#CSR2

MOVX@DPTR,A

MOVA,#0FFH;關(guān)閉LED顯示

MOVDPTR,#CSC1

MOVX@DPTR,A

MOVDPTR,#CSC2

MOVX@DPTR,A

D:MOVR5,#00H

MOVR4,#01H

DISP:

MOVA,R5

RLACC

MOVDPTR,#HZAI

MOVCA,@A+DPTR

CPLACC

MOVDPTR,#CSC2

MOVX@DPTR,A

MOVA,R5

RLACC

INCACC

MOVDPTR,#HZAI

MOVCA,@A+DPTR

CPLACC

MOVDPTR,#CSC1

MOVX@DPTR,A

MOVDPTR,#CSR1

MOVA,R4

MOVX@DPTR,A

RLACC

MOVR4,ACC

INCR5

LCALLDELAY

CJNER5,#8H,DISP

MOVA,#0H

MOVX@DPTR,A

MOVR5,#08H

MOVR4,#01H

DISP2:

MOVA,R5

RLACC

MOVDPTR,#HZAI

MOVCA,@A+DPTR

CPLACC

MOVDPTR,#CSC2

MOVX@DPTR,A

MOVA,R5

RLACC

INCACC

MOVDPTR,#HZAI

MOVCA,@A+DPTR

CPLACC

MOVDPTR,#CSC1

MOVX@DPTR,A

MOVDPTR,#CSR2

MOVA,R4

MOVX@DPTR,A

RLACC

MOVR4,ACC

INCR5

LCALLDELAY

CJNER5,#10H,DISP2

MOVA,#0H

MOVX@DPTR,A

SJMPD

********延時(shí)子程序,協(xié)調(diào)字符顯示速度*************

DELAY:MOVR7,#1H

DL1:MOVR6,#00H

DL2:DJNZR6,DL2

DJNZR7,DL1

RET

********字符字庫***************

HZ16字符編碼排列

01

23

|

|

2829

3031

高位D7--D0

HZAI:DB00H,78H,3FH,80H,11H,10H,09H,20H

DB7FH,0FEH,42H,02H,82H,04H,7FH,0F8H

DB04H,00H,07H,0F0H,0AH,20H,09H,40H

DB10H,80H,11H,60H,22H,1CH,0CH,08H

HZDI:DB00H,80H,40H,80H,20H,88H,2FH,0FCH

DB08H,88H,08H,88H,0E8H,88H,2FH,0F8H

DB28H,88H,28H,88H,28H,88H,2FH,0F8H

DB28H,08H,50H,06H,8FH,0FCH,00H,00H

HZKE:DB01H,00H,01H,04H,0FFH,0FEH,01H,00H

DB01H,10H,1FH,0F8H,10H,10H,10H,10H

DB10H,10H,1FH,0F0H,14H,50H,04H,40H

DB04H,40H,08H,42H,10H,42H,60H,3EH

****************************************************

END


上一頁 1 2 下一頁

評(píng)論


相關(guān)推薦

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

關(guān)閉