This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

instruction timing in 8051MCU

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?

Parents
  • 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.

Reply
  • 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.

Children