??? 01/02/09 06:17 Read: times |
#161252 - Returning from the timer without using RETI |
Hello,
I am detecting p2.0 bit for a definite time period and if it is not changed for the given time period, it restart the program again. But the problem is that when the program is returning without using RETI it doesnt works correctly pls give some idea to solve it. The origional program is as under ORG 00H JMP MAIN ORG 1BH JMP DETECTION ORG 030H MAIN: MOV R0,#00H MOV TMOD,#11H MOV TCON,#00H MOV TH1,#0FFH MOV TL1,#0F0H SETB EA SETB ET1 SETB TR1 JNB P2.0,$ ; detecting p2.0's status for the given time period and if it ;is not complemented twice timer interupt will be generated JB P2.0,$ CLR TR1 HR: CPL P3.1 JMP MAIN DETECTION: CLR TR1 CLR TF1 MOV TH1,#0FFH MOV TL1,#0F0H INC R0 CJNE R0,#2,RETURN JMP MAIN RETURN: SETB TR1 RETI END |
Topic | Author | Date |
Returning from the timer without using RETI | 01/01/70 00:00 | |
LJMP 0 is not a Reset | 01/01/70 00:00 | |
Correction | 01/01/70 00:00 | |
Problem solved![]() | 01/01/70 00:00 | |
any means of exit from an ISR ... | 01/01/70 00:00 |