You are on page 1of 3

Slide 1

CPU timing and machine cycle


To generate operating frequency for 8051 microcontrollers we need to connect external crystal
of frequency 11.0592 megahertz in between XTAL1 and XTAL2 pin. Oscillator formed by crystal
capacitor and on-chip inverter generator pulse train at a frequency of crystal hence the crystal
frequency would be the operating frequency in 8051 microcontrollers.

Smart Logic Academy © All copy right reserved


Slide 2

Here in this diagram


P1 and P2 indicate Pulse time.

S1 S2 S3 S4 S5 S6 indicates state time and together they form one machine cycles.

Pulse time means the clock frequency established the smallest interval of time within the
microcontroller.

State time nothing but the basic time interval for discrete operations of the microcontroller such
as fetching an opcode, decoding an opcode and executing an opcode. Here opcode is nothing but
the operational code, which is 8-bit value which indicates the operation to be performed by 8051
microcontrollers.

The machine cycle is the smallest interval of time to accomplish any simple instructions or the
part of complex instruction.

Instruction cycle is made up of one or more machine cycle.

1 machine cycle = 6 state = 12 clock period

Smart Logic Academy © All copy right reserved


Slide 3

ADD A,R0 instruction takes one machine cycle to complete this operation similarly MOV A,#23h
instruction takes 2 machine cycle to complete the operation and LJMP instruction takes 3
machine cycles.

The time required to execute the instruction can be calculated using formula. In 8051
microcontroller crystal frequency is nothing but the operating frequency which is 11.0592
megahertz, using above-mentioned formula you can easily find out 1 machine cycle equals to
1.085 us.

Smart Logic Academy © All copy right reserved

You might also like