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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/21/02 14:41
Read: times


 
#20037 - How much Time taken by routines:
Hi all,

Please let me know the values of R0 at specific intervals in micro seconds, in block - A

I have written at the end of each block in Qs what I need to know.

_________________________________________
BLOCK A
________________________________________

;Crystal frequency is 11.059 MHz with 89c51

MOV R0,#00H
LOOP
INC R0

NOP
NOP

JB P1.0,LOOP


Q1. Value of R0 when 200 micro seconds have lapsed ???


Q2. Value of R0 when 263 micro seconds have lapsed ???


Q3. Value of R0 when 400 micro seconds have lapsed ???


Q4. Value of R0 when 526 micro seconds have lapsed ???

---------------------------------------------

And the total exact time in micro seconds which this code in Block B takes.

_________________________________________
BLOCK B
_________________________________________

;Crystal frequency is 11.059 MHz with 89c51

CLR P1.0
AAA
MOV R0,#00H
MOV R1,#00H
BBB
MOV R2,#02H
DJNZ R2,$
JB P1.0,AAA

INC R1

CJNE R0,#02H,CCC
CJNE R1,#10H,CCC
SJMP DDD
CCC
CJNE R1,#0FFH,BBB

INC R0
SJMP BBB

DDD

;-------------------------------------------- ;Q:

; How many micro seconds have lapsed when ;control comes here ???
;--------------------------------------------


I have calculated it on the simulator and otherwise also by counting the instruction cycles, however, I need to be sure of what exactly it will be.

Regards


Simon





List of 12 messages in thread
TopicAuthorDate
How much Time taken by routines:            01/01/70 00:00      
RE: kindly re write the code on paper:            01/01/70 00:00      
RE: How much Time taken by routines:            01/01/70 00:00      
RE: How much Time taken: Erik            01/01/70 00:00      
RE: How much Time taken by routines:            01/01/70 00:00      
RE: kindly re write the code on paper:            01/01/70 00:00      
RE: How much Time taken by routines:            01/01/70 00:00      
RE: #time_value: Erik            01/01/70 00:00      
RE: #time_value: Erik            01/01/70 00:00      
RE: How much Time taken, however            01/01/70 00:00      
RE: 1000000 loops for uSec. Erik.            01/01/70 00:00      
RE: 1000000 loops for uSec. Erik.            01/01/70 00:00      

Back to Subject List