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.

Can Any One Tell How Much Time Machine Cycles And Time is Taken by the Code Given

Status
Not open for further replies.
1 machine cycle will be of 1.085us with 11.0592 MHz crystal oscillator

MOV takes 1 machine cycles
DJNZ takes 2 machine cycles

Now you can calculate total machine cycles...
 

i found 1031 machine cycles and time will becomes 11.18635ms am i right...

Your off by a decimal point.

delay:
d1:
mov r7,#2
d2:
mov r5,#255
djnz r5,$
djnz r7,d2
ret

I HAVE USED 11.0592 CRYSTAL AND CONTROLLER IS 89S51


You can make a quick estimate in your head assuming a 12MHz Crystal, which for a AT89S51 equates to 1µS per instruction cycle.

Therefore, the duration of a 1000 instruction cycles is then equal to 1ms.



More precisely for 11.0592MHz Crystal equates to 1.0851 µS per instruction cycle.

And assuming your calculation of 1031 for total instruction cycles are correct, then

1.0851µS x 1031 = 1.119ms total elapse time for the routine shown above.

BigDog
 

i need to one more thing....


is there any other software other than keil on which we can write code for 8051 but with more features.......

i saw microC very interesting and easy to use but i think it is just for pic controllers......
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top