We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am using Atmel 89LV52 MCU and oscillator of 12Mhz. Since 89LV52 has CPI of 12, i think that the MCU can run 12M/12 = 1 Million instruction per second, am i right? then it takes 1us to run 1 instruction of Assembler, eg. MOV, SUBB, etc, but takes 2 us to run MOVX? Can anybody tell em whether i am right?
hi, Since 89LV52 has CPI of 12 read hardware manual more careful: some instructions take 24 and 48 cycles. Moreover, on some parts there is hardware implemented MOVX "stretch" by which such instructions may take different timings. Regards, Oleg
I have read the documents but there is not much explanation about the time taken of instruction sets. Since i am doing a project in which timing of instruction is critical, can anybody kindly reply this message with more detail explanation?
http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_PROG_GUIDE_1.pdf has it all, but BEWARE, some 2 and 4 clock versions (does not apply tho the one you are using now) differ in instruction cycle count. Erik
The instruction set manual (ISM) available on this web site lists instruction cycle counts assuming the "classic" 12 clocks / instruction cycle. As Erik says, there are 2 clocks / instruction and 4 clocks / instruction variants that are common. There are parts that need 6 per as well. When reading the documentation, be sure to note whether it is talking about "clock cycles" (from the oscillator) or "instruction cycles" (by which manuals usually mean clocks divided by whatever their clocks per instruction count is). If I recall, all 8051 instructions require 1, 2, or 3 instruction cycles to execute, which would be 12, 24, or 36 clocks on a traditional core, or 4, 8, or 12 on a newer design that uses 4 clocks/instruction.
"If I recall, all 8051 instructions require 1, 2, or 3 instruction cycles to execute" As it happens they are all 1 or 2 instruction cycles except MUL and DIV which are 4. Stefan
Drew, what I stated was not that 2 and 4 clockers exist, but that some of them have different instruction cycle counts for some instructions e.g. (some) Cygnal chips use one more instruction cycle when branching than when not. I know of no 6 or 12 clockers that do not run by standard instruction cycle count. Erik
As it happens Good thing I have the manual and don't have to rely on my recollection, then! what I stated was My apologies; I'll try to read more carefully.