Search This Blog

Friday, December 23, 2011

Connection of XTAL1 and XTAL2

Okay this post is little late. But its better late than never. XTAL ports provide clock pulses to the 8051.this can be achieved in 2 ways.


XTAL CONNECTION WITH CRYSTAL
Generally quartz crystal is connected to inputs XTAL1 and XTAL2. This crystal also requires 2 capacitors. One side of each capacitor is connected to the ground. Usually value of capacitor can be 30pF or 33pF. Why capacitor are required in the connection?? Well the answer is directly connected to the basic circuitry of an oscillator.


 
XTAL CONNECTION WITH EXTERNAL OSCILLATOR CIRCUIT
Another way to provide frequency to the microcontroller is through external oscillator circuit. The single output is connected to one of the XTAL port while other is left unconnected. (do not ground the unconnected XTAL port).

 The connection is same way for both microcontroller and microprocessor.

DC motor control with optoisolator

Dc motor control with optoisolator.
Protection of control circuit is provided by the optoisolator. The motor and optoisolator uses separate power connection which is very necessary. As separate power supplies allows use of high voltage motors.
A decoupling capacitor should be used across the motor so as to reduce the electromagnetic induction created by motor.

What is PWM??(a very short intro)

Pulse width modulation
The speed of motor depends on 3 factors
  • Load
  • Voltage
  • Current
For a given fixed load we can maintain a steady speed by using a method called pulse width modulation. By changing or we can say “modulating” the width of the pulse applied to dc motor we can increase or decrease the amount of power provided to the motor, hereby increasing or decreasing the motor speed. Although voltage has fixed magnitude but it has a variable duty cycle. In short wider the pulse higher the speed.