This article will explain about importance of clock cycle and machine cycle in microcontroller As we know that microcontroller is a programmable embedded system. Further it needs to communicate with external machine’s control systems and memory devices. So, it is important that , each operation of microcontroller need to be synchronized with them. Otherwise, it is impossible to perform various task assigned to microcontroller. Like human are following clocks for their everyday activities , microcontrollers are also need some clock signal to synchronize with external and its internal various circuitry systems.
Because microcontrollers are programmable devices. So, they need certain frequency to perform their operations.
The 8051 microcontroller has on chip oscillator circuits, which act as clock generating source for it. The output pulses of oscillator circuits are stable . So, it can be used to synchronize the operation of all circuit block inside the microcontroller and external circuits.
Circuit diagram
The circuit diagram of clock generating system is shown here. There everyone can understand about clock cycle and machine cycle in microcontroller
Using internal clock generating circuit
XTAL- 1 (Pin No:19) is used as input to the inverting oscillating amplifier and input to the internal clocking circuits. and XTAl-2( pin no:18) is used as output to the internal inverting oscillator amplifier. A 12MHZ crystal is connected between XTAL-1 and XTAl-2. In addition to each 33pf disc capacitors are connected in each pin (XTAL-1 &2). Another end of the capacitor is grounded.
Using external clock circuit
To use external clock circuit XTAL-1 (Pin No:19) connected with an external clock generating circuit. XTAL-2 (pin No:18) left not connected (NC).
Definition of clock pulse
One complete oscillation of clock source called as one clock pulse
What is state
The one state is considered as combination of two clock pulses
What is machine cycle
A one machine cycle contains six states I.e. 12 clock pulses.