Types of cycles

The clock signal causes the processor to execute any instructions. However, it often happens that the clock signal supplied externally has a different frequency than the internal clock signal that controls commands received and executed by the CPU. Therefore, two concepts were introduced: clock cycle and machine cycle.

The former is simply the inverse of the clock generator frequency. The latter is obtained by taking into account possible internal divisions of the clock signal. A very good example is the popular 8051 microcontroller, which in its basic version has a machine cycle 12 times longer than the clock cycle. Also, although the default setting is different, the AVR processor can have a machine cycle that is different from the clock cycle.

The concept of a machine cycle should not be identified with the instruction execution time. In some cases this may be the case, but in most popular microcontrollers, the execution of a single instruction takes from two to several machine cycles and from 8 to several dozen clock cycles. The AVR microcontroller was used in the SU 1.2 controller and the SU 1.5 controller, it executes most of the instructions during a single clock cycle.

Its modern design is one example where the clock cycle is equal to the machine cycle. As you can easily deduce, the faster the processor clock, the more instructions it can execute per unit of time. This statement is true if you compare processors with identical or very similar architectures. For different architectures, the comparison result may be completely different.

A clock cycle is the period of the clock signal produced on the basis of a quartz resonator, RC elements, etc. It can be calculated as the reciprocal of the clock generator frequency.

clock cycle = 1/FGEN

A machine cycle is the period of an internal clock signal. It is calculated after taking into account the internal frequency divisions of the clock signal. In an AVR microcontroller, machine cycle = clock cycle.

machine cycle = internal division x 1/FGEN

To simplify comparisons of different processors, the concept of computing power was introduced, for which a unit called MIPS is usually used.

1 MIPS is nothing else than 1 million operations per second. Due to the fact that in the AVR microcontroller the machine cycle is equal to the clock cycle, an AVR clocked with a signal at a frequency of 8 MHz has a computing power approximately equal to 8 MIPS. The standard 8051, with the same clock signal parameters, has a computing power of approximately 0.667 MIPS.

Scroll to Top