Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

i want to create variable delay upto 999 sec.

Status
Not open for further replies.

deepak.thakur

Newbie level 3
Joined
Jan 28, 2010
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
ludhiana
Activity points
1,306
dear sir,
i want to create variable delay upto 999 seconds witch can work parallely with other instructions
i use at89s52 microcontroller in asm programing language
any flowchart, sugestion reply me soon or email me at deepak_thakur_001
@hotmail.com
with warm regards
deepak
 

Somewhere here at the EDABoard you will find (use SEARCH) a number of posts on how to generate 0.1s delay using 8051-compatible microcontroller and Timer1 interrupt ..
Then you can employ two registers (or variables) to create the 9990 * 0.1s loop ..

Should work ..

Rgds,
IanP
 

hi, this code is delay for 1s using 11.0592Mhz crystal.

the 'del' subroutine will give you 1ms delay and the 'delay' subroutine will give you 1s.



Code:
DELAY:      ;call DELAY to get one second delay
        MOV R7,#10D
	L2: MOV R6,#100D
L1:
	CALL DEL
	DJNZ R6,L1
	DJNZ R7,L2
RET
 
DEL:
	MOV TMOD,#01H
	MOV TL0,#7CH
	MOV TH0,#0FCH
	SETB TR0
	JNB TF0,$
	CLR TR0
	CLR TF0
RET;

as per your comment you have to use timer in interrupt for parallel working with other instructions.

for questions regarding micro controller, post it micro controller section


regards
kj
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top