Hi,
I have following questions.
- Why multiple capacitors of different values are connected between VDD and ground?
- What are solder jumpers? What they are useful for?
- Why and when external oscillators are used or needed for microcontroller?
- What to do with unused pins of CMOS devices or microcontrollers?
- Why & when two pins of microcontroller are connected with each other via a (boost) capacitor?
- What is the difference between digital and analog grounds?
Hy muashr,
You ask some searching questions.
In addition to the comprehensive information already posted, here is my two cents worth:
(1) Capacitors have three main functions in electronic circuits. They are used for other functions too: integration and timing for example.
(1.1) To store electrical energy, as in reservoir capacitors. Typically in mains power supplies (50Hz or 60Hz), reservoir capacitors range from 1mF to 100mf (1mF= 1000uF).
(1.1) To couple AC signals while removing the DC component: widely used in audio amplifiers to couple the various gain stages.
(1.3) To decouple to 0V various points in a circuit, mainly supply lines. This is to ensure that the supply lines are a low impedance and do not have signals on them which would upset the circuits. You often see a high value electrolytic capacitor in parallel with a low loss capacitor. The electrolytic capacitor provides low frequency high current decoupling, while the low loss capacitor provides a path to 0V for high frequency currents. You can think of capacitors in this deployment as little local batteries. A typical set up might be a 100uF aluminum electrolytic capacitor in parallel with a 100nF ceramic capacitor. You may ask why can't the electrolytic capacitor decouple all frequencies. The reason is that, because of their construction, their impedance rises rapidly with frequency.
(2) Solder jumpers are normally used to provide a position for an additional component if needed for another configuration. They are alo used like switches to configure a circuit.
(3) Internal oscillators are convenient compact and cheap and are quite adequate for many applications. On the other hand, external oscillators can have a far superior performance: absolute frequency, frequency stability, low jitter, etc. Fundamentally, there are two types of oscillator: timed and crystal controlled. An LM555 timer configured as an oscillator is an example of a timed oscillator. Many chips are half way houses and provide connections for attaching a crystal, but even these cannot ultimately match the performance of an external oscillator.
(4) Unused output pins on devices, inevitably, can be left unconnected, but input pins must always be connected in such a way as to define a stable state for a device, or the device may act strangely. This applies to all circuit functions: both digital and analogue: gates, counters, shift registers, opamps, comparators, linear voltage regulators. For example, a floating CMOS gate input can assume any voltage and will pick up electrostatic and electromagnetic signals in its vicinity. The gate can also oscillate and take excessive current from the supply line. Ultimately it may destroy itself along with the other gates on the same substrate. In general, the inputs of simple logic gates should be connected to 0V. A single inadvertent floating input on a MOS memory chip cost the company I worked for £250K UK and delayed the program three months.
(5) There could be many reasons for this. It is best to check the data sheet for the chip in question to find the answer.
(6) Grounds (0V) in real circuits are not the nice solid lines you see on schematics. Instead they comprise thousand a small resistors, capacitors and inductors. This applies to PCB traces and wires.
As a consequence, when a current flows down a conductor it causes signals to be imposed on the conductor. Take an example, if there was 20mili Ohms resistance between the power supply and the circuit and the circuit were consuming 1A, there would be 20mV voltage drop. As the frequency goes up the impedance of the conductor will go up due to the additional effect of the inductance and capacitance.
Analog circuits, by definition, amplify signals as opposed to just switching up and down like digital circuits, so they are sensitive to signals on their 0V line line and, to a lesser extent, on their other supply lines. When they are switching, digital circuits can pass massive current spikes down the OV line, which consequently generate large voltages. Decoupling capacitors, as mentioned above, help this but the OV signals can still trouble analogue circuits. To give you an idea of the problem remember that a modern opamp can have a DC open loop voltage gain of one million (120dB).
For this reason it is best to separate the OV lines for analog and digital circuits. Typically you would have completely separate conductors going back to the power supply 0V. Incidentally this principle also applies to the other supply lines.
On a final note: as I have said many times before on ETO, it is imperative in electronics to understand the difference between a schematic and the actual physical circuit. A piece of wire is not a perfect conductor; the same principle applies to all components: resistors, capacitors, inductors, transistors etc etc.
To illustrate the point here is the schematic of an aluminum electrolytic capacitor:
spec