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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/13/05 14:57
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#87271 - it is good!
Responding to: ???'s previous message
Dear ronan
see the code below
xtal:12Mhz

WITH INTERNAL LOOP YOU HAVE 50 msec delay
WITH SECOND LOOP YOU HAVE 100*50 msec=5 sec delay
WITH 3'd LOOP YOU HAVE 4*5=20 sec delay

and you can have another loop or higher value in R6,R7
for increasing delay.







MOV A,#1
START0:
MOV R6,#8
START1:
MOV P2,A
RL A
LCALL DELAY1
DJNZ R6,START1
SJMP START0


DELAY1:
PUSH 7
push 6
MOV R6,#4
STP1:
MOV R7,#100
STP0:
MOV TMOD,#00000001B
MOV TH0,#3CH
MOV TL0,#0B0H
SETB TR0
TF0?:
JNB TF0,TF0?
CLR TR0
CLR TF0
DJNZ R7,STP0
DJNZ R6,STP1
POP 6
POP 7
RET




List of 15 messages in thread
TopicAuthorDate
delays            01/01/70 00:00      
   delay routine ideas            01/01/70 00:00      
      further ideas            01/01/70 00:00      
   change p2 outputs            01/01/70 00:00      
      Bad practice Peter            01/01/70 00:00      
         sorry            01/01/70 00:00      
   Obtaining Delays            01/01/70 00:00      
      Not RTC            01/01/70 00:00      
   it is good!            01/01/70 00:00      
      it is good.            01/01/70 00:00      
         Not so good            01/01/70 00:00      
   Stop wasting our time Meero            01/01/70 00:00      
      pot and kettle            01/01/70 00:00      
         Eric the great.            01/01/70 00:00      
            Erik the great            01/01/70 00:00      

Back to Subject List