皖西学院2014届本科毕业设计(论文)
MOV MONTH, #01H TO_MO11: LCALL DISPLAY2 RET
TO_DA1: MOV A, DAY ADD A, #01H DA A
MOV DAY, A
CJNE A, #32H, TO_DA11 MOV DAY, #01H TO_DA11:LCALL DISPLAY2 RET
TO_WK1:MOV A, WEEK ADD A, #01H DA A
MOV WEEK, A
CJNE A, #08H, TO_WK11 MOV WEEK, #01H TO_WK11: LCALL DISPLAY2 RET
TO_H1: MOV A, HOUR ADD A, #01H DA A
MOV HOUR, A
CJNE A, #24H, TO_H11 MOV HOUR, #00H TO_H11: LCALL DISPLAY2 RET
TO_M1: MOV A, MIN ADD A, #01H DA A
MOV MIN, A
CJNE A, #60H, TO_M1a MOV MIN, #00H TO_M1a: LCALL DISPLAY2 RET
TO_S1: MOV A, SEC ADD A, #01H DA A
MOV SEC, A
27
基于单片机的电器遥控器设计
CJNE A, #60H, TO_S1a MOV SEC, #00H TO_S1a: LCALL DISPLAY2 RET
SUB_ONE: MOV A, KEY_CNT
JB ACC.0, TO_YR2 JB ACC.1, TO_MO2 JB ACC.2, TO_DA2 JB ACC.3, TO_WK2 JB ACC.4, TO_H2 JB ACC.5, TO_M2 JB ACC.6, TO_S2 JB ACC.7, x2
x2: mov key_cnt, #80h RET
TO_YR2:MOV A, YEAR ADD A, #99H DA A
MOV YEAR, A LCALL DISPLAY2 RET
TO_MO2: MOV A, MONTH ADD A, #99H DA A
MOV MONTH, A
CJNE A, #00H, TO_MO22 MOV MONTH, #12H TO_MO22: LCALL DISPLAY2 RET
TO_DA2: MOV A, DAY ADD A, #99H DA A
MOV DAY, A
CJNE A, #00H, TO_DA22 MOV DAY, #31H TO_DA22: LCALL DISPLAY2 RET
TO_WK2:MOV A, WEEK ADD A, #99H
皖西学院2014届本科毕业设计(论文)
DA A
ANL A, #0FH MOV WEEK, A
CJNE A, #00H, TO_WK22 MOV WEEK, #07H TO_WK22: LCALL DISPLAY2 RET
TO_H2: MOV A, HOUR ADD A, #99H DA A
MOV HOUR, A
CJNE A, #99H, TO_H22 MOV HOUR, #23H TO_H22: LCALL DISPLAY2 RET
TO_M2: MOV A, MIN ADD A, #99H DA A
MOV MIN, A
CJNE A, #99H, TO_M2a MOV MIN, #59H TO_M2a: LCALL DISPLAY2 RET
TO_S2: MOV A, SEC ADD A, #99H DA A
MOV SEC, A
CJNE A, #99H, TO_S2a MOV SEC, #59H TO_S2a: LCALL DISPLAY2 RET
SETUP: CLR KEY_BUSY
SETUP1: MOV KEY_CNT, #80H LCALL SET1302 LCALL GET1302 LCALL DISPLAY2 LJMP RUN2 RET
INITIAL:MOV COM,#3CH
29
基于单片机的电器遥控器设计
LCALL LCD_W_CMD MOV COM,#0FH LCALL LCD_W_CMD MOV COM,#01H LCALL LCD_W_CMD MOV COM,#06H LCALL LCD_W_CMD MOV COM,#80H LCALL LCD_W_CMD RET
SET1302:MOV A,#8EH MOV B,#00H LCALL CLOCK_WR MOV A,#8CH MOV B,YEAR LCALL CLOCK_WR MOV A,#88H MOV B,MONTH LCALL CLOCK_WR MOV A,#86H MOV B,DAY LCALL CLOCK_WR MOV A,#8ah MOV B,week LCALL CLOCK_WR MOV A,#84H MOV B,HOUR LCALL CLOCK_WR MOV A,#82H MOV B,MIN LCALL CLOCK_WR MOV A,#80H MOV B,SEC LCALL CLOCK_WR RET
GET1302:MOV A,#81H LCALL CLOCK_RD MOV SEC,A MOV A,#83H LCALL CLOCK_RD