[B original] My first 51 development board work - B1

xiaoxiao2021-03-30  202

Chnum EQU 13h ORG 0000h AJMP START

; START ProgramStart: MOV R0, #Chnumdisplay: MOV P1, # 0ffh LCALL DLSHORT MOV DPTR, #TAB MOV A, #CHNUM SUBB A, R0 MOVC A, @ A DPTR MOV P1, A LCALL DLLONG

Djnz R0, Display LCall Dllong Ajmp Start

Short delaydlshort: MOV R6, # 0ffHDL1: MOV R7, # 0ffHDL2: DJNZ R7, DL2 DJNZ R6, DL1 RET

Long delaydllong: MOV R5, # 0ahddl0: MOV R6, # 0ffHDDL1: MOV R7, # 0ffHDDL2: DJNZ R7, DDL2 DJNZ R6, DDL1 DJNZ R5, DDL0 RET

Display DataTab: DB 92H, 89H, 0A1H, 0A1H, 91H, 0BDH, 0CBH, 88H, 89H, 0C2H, 91H, 88H, 89H, 80H, 0C2H, 0A1H, 0A0H, 0A0H, 92hend

For sunny! ^ _ ^

转载请注明原文地址:https://www.9cbs.com/read-130606.html

New Post(0)