各位:
小弟一软件,一开启watchdog就停机,不知为何?现贴出代码,请各位指导一下。
CALL clearWDT
CLR EA
MOV TA,#0AAH
MOV TA,#55H
orl WDCON,#04H
MOV TA,#0AAH
MOV TA,#55H
orl WDCON,#10H
MOV TA,#0AAH
MOV TA,#55H
orl WDCON,#40H
SETB EA
MOV A,WDCON
JB ACC.6,$
CLR EA
MOV TA,#0AAH
MOV TA,#55H
ORL WDCON,#80H
SETB EA
clearWDT:
CLR EA
MOV TA,#0AAH
MOV TA,#55H
MOV A,#08H
CPL A
ANL WDCON,A
SETB EA
RET
|