8051 Oscillator CKT Diagram and Description
8051 Oscillator CKT Diagram and Description
8051 Oscillator CKT Diagram and Description
P I N 1 2 M H z
1 9
X T A L 2 )
C C 1 2 2
R p F
Y C
S 2
T A
L 2 2 p F
F i g . O s c i l l a t o r
C i r c u i t
In AT 89C51 two pins viz.pin no 18 &19 ( XTAL1 & XTAL2 ) are provided for connecting a resonant network to form an oscillator. A quartz crystal is used with ceramic capacitors as shown in above circuit diagram. The crystal frequency is the basic internal frequency of the micro controller. The range of the crystal that can be connected to the micro controller is 1Mhz to 16 Mhz. Different crystals are available such as the Quartz, Rochelle salts, and Tourmaline etc. We have preferred to use Quartz crystal because it is inexpensive and readily available. C1 and C2 are between 10pF to 40 pF. The capacitors C1, C2 are used for stable frequency operation i.e. in the condition where there is high noise and humidity as in the case of factories. Due to this the oscillator frequency can alter, for the suppression or do we can say deletion of this the two capacitor are used for stable frequency.
The 8051 oscillator & clock Pins XTAL1 & XTAL2 are provided for connecting a resonant network to form oscillator. Typically a quartz crystal and capacitors are employed. the crystal frequency is the basic internal clock frequency of the microcontroller. The manufacturers make available 8051 designs that can run at specified maximum & minimum frequencies, typically 1 Mhz to 16 Mhz. Minimum frequencies imply that some internal memories are dynamic & must always operate above a minimum frequency or data will be lost. P2 P1 P2 P1 P2 P1 P2 P1 P2 P1 P2 P1 P2 P1
State 1 State 2
State 6
One Machine Cycle ALE Serial data communication needs often dictate the frequency of the oscillator because of the requirement that internal counters must divide the basic clock rate to yield standard communication baud rates. If the basic clock frequency is not divisible without a reminder, then the resulting communication is not standard. The smallest interval of time to accomplish any simple instruction or part of complex instruction is called as the machine cycle. The machine cycle is made up of six states. A state is the basic time interval for discrete operations of the microcontroller, such a fetching an opcode byte, executing an opcode or writing data byte. Two oscillator pulses define each state. Program instruction may require one, two, or four machine cycles to be executed, depending upon the type of instruction. Instructions are fetched & executed by the microcontroller automatically beginning with the instruction located at ROM memory address 0000h at the time the microcontroller is first reset. To calculate the time any particular instruction will take to be executed, find the number of cycles C. The time to execute that instruction is then found by multiplying C by 12 & dividing the product by the crystal frequency. T= C * 12d _________ Crystal Freq.