Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/07/04 10:05
Read: times


 
Msg Score: 0
 -1 Didn't Search First
 +1 Underrated
#75593 - Program keeps looping itself ,Why?
This program is supposed to switch on S1 for 1 second the switch off for 1 second and turn it ON and do nothing but it keeps repeating the cycle
Why should it repeat itself ? Or better way how do I stop it from repeating itself.Use a Flag bit ?


I read some books, but if it's still a silly question please let me know what is wrong ..

Thank you
Deepak


$mod51

;**O/P
S1 EQU P3.0
S2 EQU P3.1
;*****Delay routine delaration*****
VAR1 EQU R0
VAR2 EQU R1
VAR3 EQU R2

;*************************************************

ORG 0000H
LJMP MAIN
;****1Sec Delay routine****************
DELAY:
MOV VAR3,#8
MOV VAR2,#8
MOV VAR1,#236
TT1:
DJNZ VAR1,TT1
DJNZ VAR2,TT1
DJNZ VAR3,TT1
RET
;****End of Delay routine ****************

MAIN:
CLR S1
CALL DELAY
SETB S1
CALL DELAY
CLR S1
END





List of 12 messages in thread
TopicAuthorDate
Program keeps looping itself ,Why?            01/01/70 00:00      
   RE: Program keeps looping itself ,Why?            01/01/70 00:00      
      RE: Program keeps looping itself ,Why?            01/01/70 00:00      
         RE: Program keeps looping itself ,Why?            01/01/70 00:00      
            RE: Program keeps looping itself ,Why?            01/01/70 00:00      
               RE: Program keeps looping itself ,Why?            01/01/70 00:00      
                  RE: Program keeps looping itself ,Why?            01/01/70 00:00      
         RE: Program keeps looping itself ,Why?            01/01/70 00:00      
   RE: Program keeps looping itself ,Why?            01/01/70 00:00      
   RE: Program keeps looping itself ,Why?            01/01/70 00:00      
   RE: Program keeps looping itself ,Why?            01/01/70 00:00      
      My mistake            01/01/70 00:00      

Back to Subject List