单片机智能温度计设计 第7页
MOV R1,PIN
ZIP: MOV A,@R0
MOV @R1,A
INC R0
MOV A,@R0
SWAP A
ORL A,@R1
MOV @R1,A
INC PIN
INC R0
INC R1
DJNZ R2,ZIP
AJMP EXIT
COMP:MOV A,PIN2
CJNE A,#4AH,J
AJMP OVR
J: MOV R0,PIN2
MOV R1,#7EH
MOV R2,#3
JJJ:MOV A,@R0
ANL A,#0F0H
SWAP A
XRL A,@R1
JNZ ENDD
DEC R1
MOV A,@R0
ANL A,#0FH
XRL A,@R1
JNZ ENDD
DEC R1
DEC R0
DJNZ R2,JJJ
SETB FLAG2
INC PIN3
AJMP TEST
ENDD:MOV A,PIN2
ADD A,#3
MOV PIN2,A
AJMP COMP
OVR: MOV PIN2,#3EH
AJMP TEST
HOUR:ACALL DELY
MOV R0,#7EH
JNB F0,SUB1
ACALL DAAD1
MOV A,R2
XRL A,#24H
JNZ ML0
ACALL CLR0
AJMP ML0
MINI:ACALL DELY
MOV R0,#7CH
JNB F0,SUB1
ACALL DAAD1
MOV A,R2
XRL A,#60H
JNZ ML0
ACALL CLR0
AJMP ML0
SECO:ACALL DELY
MOV R0,#7AH
JNB F0,SUB1
ACALL DAAD1
MOV A,R2
XRL A,#60H
JNZ ML0
ACALL CLR0
ML0: MOV R0,#79H
MOV R1,#50H
ACALL HEXASC
MOV R2,#6
MOV R0,#5AH
ACALL INI
AJMP SETT
SUB1:SETB F0
ACALL SUB
AJMP ML0
CLEAR:MOV @R0,#0
INC R0
DJNZ R1,CLEAR
RET
HOU: ACALL DELY
SETB E0
MOV R0,#4EH
ACALL DAAD1
MOV A,R2
XRL A,#24H
JNZ ML00
ACALL CLR0
AJMP ML00
MIN: ACALL DELY
SETB E0
MOV R0,#4CH
ACALL DAAD1
MOV A,R2
XRL A,#60H
JNZ ML00
ACALL CLR0
AJMP ML00
SEC: ACALL DELY
SETB E0
MOV R0,#4AH
ACALL DAAD1
MOV A,R2
XRL A,#60H
JNZ ML00
ACALL CLR0
ML00:MOV R0,#49H
MOV R1,#30H
ACALL HEXASC
MOV R2,#6
MOV R0,#3AH
MOV R1,PIN1
INC R1
ACALL INI
AJMP AAA
DELY:MOV R1,#0FFH
A1: MOV R2,#0FFH
LOOP:NOP
NOP
NOP
DJNZ R2,LOOP
DJNZ R1,A1
RET
PITO:PUSH PSW
PUSH 0E0H
PUSH DPH
PUSH DPL
SETB PSW.3
MOV A,P1
MOV TL0,#01H
MOV TH0,#1FH
CJNE A,#0FDH,SSS
MOV TL0,#0EDH
MOV TH0,#0FBH
SSS: JNB P1.5,GETNUM
DDD: MOV A,2FH
DEC A
MOV 2FH,A
JNZ RET0
MOV 2FH,#10H
MOV R0,#7AH
ACALL DAAD1
MOV A,R2
XRL A,#60H
JNZ RET0
ACALL CLR0
MOV R0,#7CH
ACALL DAAD1
MOV A,R2
XRL A,#60H
JNZ RET0
ACALL CLR0
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页