bsp; ACC
MOV A,#01H ; 清除显示器
CALL COMMAND_GLCD
POP ACC
RET
;=======================================================
;延时子程序
;=======================================================
DELAY: PUSH TIMER1 ; 延时TIMER1*1 ms for 12MHz
PUSH TIMER0
DELAY1: MOV TIMER0,#250 ;时间为4*1μS
DELAY2: NOP ; 1个周期
NOP ; 1个周期
DJNZ TIMER0,DELAY2 ; 2个周期
DJNZ TIMER1,DELAY1
POP TIMER0
POP TIMER1
RET
NOP
;------------------------------------------
;延时 1 ms
;------------------------------------------
DELAY01: NOP
PUSH TIMER1
MOV TIMER1,#01H
LCALL DELAY
POP TIMER1
RET
NOP
;------------------------------------------
;延时500ms
;------------------------------------------
DELAY500: