Download CISC-340 Digital Systems Everything You Need to Know

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Molecular scale electronics wikipedia , lookup

Spark-gap transmitter wikipedia , lookup

Integrating ADC wikipedia , lookup

Multimeter wikipedia , lookup

Nanofluidic circuitry wikipedia , lookup

Valve RF amplifier wikipedia , lookup

Schmitt trigger wikipedia , lookup

Integrated circuit wikipedia , lookup

Operational amplifier wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Voltage regulator wikipedia , lookup

Current source wikipedia , lookup

History of the transistor wikipedia , lookup

Transistor–transistor logic wikipedia , lookup

Surge protector wikipedia , lookup

Ohm's law wikipedia , lookup

Power electronics wikipedia , lookup

Opto-isolator wikipedia , lookup

TRIAC wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Current mirror wikipedia , lookup

Rectiverter wikipedia , lookup

Power MOSFET wikipedia , lookup

CMOS wikipedia , lookup

Transcript
CISC-340 Digital Systems
Everything You Need to Know About Electronics - and more!!
Electric Energy
Free Electrons!
Let's start with the basics. Matter is composed of molecules. Molecules are composed of
atoms. Atoms are composed of a centre mass called the nucleus, containing positively
charged particles called protons and neutral particles called neutrons. Orbiting around the
nucleus at different but well defined energy levels (often called "rings" or "bands") are
negatively charged particles called electrons. There are only about 120 different elements
know to mankind. The number of electrons orbiting the nucleus (and not coincidently, the
number of protons in the atom) determine the "atomic weight" of the element. Each
element in the "periodic Table of the Elements" differs in its atomic weight.
The outermost (highest energy) band of electrons orbiting the nucleus is called the
"valence band". It is the valence band that is primarily responsible for the element's
electrical (and also chemical) properties. An element with 8 electrons in its outer band is
very stable. It is chemically inert and electrically non-conductive (an "insulator"). Atoms
with 1,2, or 3 atoms in their outer band are good conductors. For example, copper and
gold each have 1 electron in their valence band.
Silicon, the material on which integrated circuits are built, has 4 electrons in its outer
band. It is therefore somewhere between a good conductor and a good insulator.
Consequently, it is called a "semi-conductor" material. There are things that can be done
to make silicon either a good conductor or a good insulator.
Even at room temperature, electrons in the outer band of atoms have enough energy to
occasionally break free from their atomic structure and randomly move from atom to
atom. This leaves the atom from which the electron left, positively charged. When it
comes to charged particles, opposites attract. A positively charged atom with attract a
negatively charged free electron from a neighboring atom that has broken free of its
atomic bounds and is looking for a place to go. In the absence of any other forces, this
migration of electrons from atom to atom is random in direction and the net (directional)
flow of electrons through the material is zero.
If we were to apply an electrical force to cause the net migration of electrons to be in one
direction, we have an electrical "current". Current flow through a conductor such as a
metal wire is the rate of flow of electrons past a specific point in the wire. One ampere of
current flows when 6.25 x 10**18 electrons pass a circuit point per second. (The symbol
used for current flow is I)
The electrical force that can cause electrons to flow in one direction is called "voltage" .
(V) You can think of voltage as a form of potential energy; electrical "pressure" if you
like. (Current on the other hand is a form of kinetic energy). There are many ways to
generate voltage including electromagnetic methods (hydro generating stations) and
chemical methods (batteries).
Resistance and Ohm's Law
The resistance (R) of a material to current flow is measurable and its units are "ohms". A
resistance of 1 ohm exists when the current of 1 amp(ere) flows through a material with
an applied voltage of 1 volt. Not surprisingly, there is a common electronic circuit
component called a "resistor" that is used to control the current flowing in a circuit. (It's
just a small cylinder of carbon based material with connecting wires at each end).
Resistors can be purchased from your local electronic store in various resistances ranging
from a few ohms to millions of ohms. Most dial type volume controls such as that found
on your portable CD player are variable resistors.
This relationship of resistance, current and voltage is called "Ohm's Law" (after George
Simon Ohm 1787 - 1854).
V = I * R where V = voltage in volts, I = current in amps, R = resistance in ohms
Also, from this we can generate the following equations
I = V/R
and R = V/I
Electrical Power
Electrical Power is the rate at which electrical work is done, or the rate at which
electricity is consumed.
Power (P) = V * I , or I**2 R
Power is measured in watts, kilowatts, megawatts. For example, an incandescent light
bulb may consume 60 watts, a hair dryer typically consumes 1500 watts. Your local
power company charges you for total consumption = power * time. If you pay for your
own electricity, and used your hair dryer for an hour, Ontario Hydro would charge you
for 1500 watt-hours or 1.5 kilowatt-hours (currently about 7 cents )
Electronic circuit analysis.
Consider the following circuit of a voltage source V and two resistors R1, and R2. (A
jagged line is the schematic symbol for a resistor)
The current in the circuit I = V/Rtotal = Vbattery/ R1+R2
(The total resistance of resistors connected end-to-end as in the drawing is equal to the
sum of the individual resistances. Furthermore, since there is only one path for current to
flow in this circuit, the current is the same in all parts of this circuit)
Vout = Voltage across R2 =( I) * R2 = (Vbattery/R1+R2) * R2 = Vbattery*R2/R1+R2
Now let's simplify the drawing by assuming that the positive terminal of the battery or
source voltage is connected to a point in the circuit called Vdd, and the negative terminal
of the battery or source voltage is connected to "ground" (the common reference point of
all voltage measurements). We then have the following simplified drawing:
(The voltage Vout is the voltage measured between the point labelled Vout and Ground.
This is also the voltage measured between the two ends of R2, or the voltage "across"
R2.)
We won't actually analyze this circuit, although we now have the background necessary
to do so. We will see similar circuits and we will analyze those. First, let's learn about
another electronic component - the transistor.
Transistors as Switches
Current microprocessor technology uses a type of transistor called a Metal Oxide
Semiconductor Field Effect Transistor (MOSFET for short).
Transistors and integrated circuits are built on a foundation of silicon. Remember that
silicon atoms have 4 electrons in their outer band. This makes them semiconductors. We
can add minute quantities of a second element to control silicon's electrical properties. If
we add an element that has 5 electrons in its outer band (such as arsenic), 4 of the
electrons will tend to bind to neighboring silicon atoms (effectively forming bands in
each atom of 8 electrons - four from the silicon atom and 4 from the arsenic atom. This
sharing between atoms is called a "covalent bond") and the fifth electron will easily
escape the bounds of the arsenic atom and willingly take part in current flow. This
material would be called N-type silicon as it would have an excess of Negative charges to
participate in current flow. It doesn't take many arsenic atoms to significantly change the
conductive properties of pure silicon. One arsenic atom for every few hundred MILLION
silicon atoms is plenty! A MOSFET transistor with source and drain areas made of Ntype silicon is called an NMOS transistor.
Instead of adding arsenic, we could add a second element that had only three electrons in
its outer ring, such as gallium. Now the "covalent bond" between silicon and gallium will
only have 7, not 8, electrons. This absence of the one electron to make a stable covalent
bond is called a "hole". This atom pair will willingly accept any free electrons that
happen to be passing by to fill the bond and create a stable shared ring of 8 electrons.
Transistors made with source and drain areas made of P-type material are called PMOS
transistors.
Gate
Source
Gate
Source
Drain
N
N
P
P-type
semiconductor
substrate
Silicon
Dioxide
(insulating
layer)
NMOS
transistor
P
N
N-type
semiconductor
substrate
P
PMOS
transistor
D
G
Drain
D
substrate
S
G
substrate
S
Switch
analogy

the "transfer function" of a MOS transistor is such that a small change in gate
voltage will cause a large change in source - to-drain resistance. In digital
electronics, we operate the gate at the two limits of input voltage (0 volts, or the
supply voltage Vdd). The result is two possible values of source-to-drain


resistance - no resistance or an infinite resistance. This is similar to the resistance
of an electrical switch.
the substrate is usually connected internally or externally to the source terminal.
the following describes NMOS and PMOS enhancement mode transistors. When
a sufficient voltage of a specific polarity is applied to the gate, the source to drain
resistance is reduced to a very low value.
NMOS (N-type Metal Oxide Semiconductor) transistor
• When the gate to substrate voltage is positive, the source-to-drain resistance is
reduced from a very high value to almost zero, like the contacts of a switch that is
closed.
PMOS (P-type Metal Oxide Semiconductor) transistor
• When the gate to substrate voltage is negative (substrate is more positive than the
gate) the source-to-drain resistance is reduced from a very high value to almost
zero, like the contacts of a switch that is closed.
•
In both NMOS and PMOS transistor, the gate terminal is electronically insulated from the
rest of the transistor. Thus no current can flow through the gate terminal. This is an
important feature as under static conditions, no power is consumed by current flowing
into or out of the gate terminal.
Simple logic gates can be constructed using NMOS transistors and resistors. An
important characteristic to note is that with an NMOS gate, when the output level is zero,
a current path exists from the negative power supply terminal (ground), through one or
more NMOS transistors, through the resistor, and back to the power supply positive
terminal (Vdd). Thus power is consumed during the entire time that the output is at a
logic 0.
An improvement is with CMOS logic. CMOS circuits use both NMOS and PMOS
transistors. The circuits are similar to the NMOS inverter circuit except that the resistor
has been replaced with a PMOS transistor. When Complementary MOS transistors are
used, at any instant in time, EITHER the PMOS or the NMOS transistor is conducting
but NOT both. Therefore there is no longer a path for current to flow from the positive
terminal of the power supply to the negative (ground) terminal. The circuit generates an
output of 0 or 1 (0 volts or +5 volts) depending on the input voltage, but seemingly, no
power is consumed!
Capacitance and Capacitors - The hidden electronic component!
Whenever two parallel conductors are separated by insulator material, there exists a
"capacitance". The effect of capacitance is to oppose any change in circuit voltage. The
simplest implementation of a "capacitor" would be two parallel metal plates separated by
air (an insulator)
metal
plates
air
Capacitor
contruction
schematic
symbol
The "capacitance" of the diagram above can be measured. The unit of capacitance is
called a "farad". The value of capacitance is dependent on the area of the metal plates,
the distance separating the places, and the type of insulating material separating the plates
(called the dielectric). A "farad" is a very large capacitor. Typical capacitors used in the
electronics industry would be measured in microfarads (10**-6 farads) or picofarads
(10**-9 farads).
Unfortunately, it's so easy to make a capacitor, often one is created whether we like it or
not. Think about two wires in an electrical cable, such as your network cable, printer
cable, cable TV cable, phone cable, and so on. Here we have two (or more) parallel
conductors separated by an insulator (the vinyl insulation around the wires). A capacitor
therefore exists and is prepared to resist signal voltage levels.
Also consider the construction of a MOS transistor. The gate is a metal or conductive
plate. Parallel to it is the N-type or P-type substrate on which the transistor is build. The
two are separated by an insulating layer (silicon dioxide). A capacitor therefore exists
between the gate and the substrate. This "gate capacitance" is prepared to resist signal
changes and is responsible for delays within digital logic components.
Capacitor action.
Consider the following circuit.
The circuit consists of a battery generating a voltage V, switches S1 and S2 , a resistor
R, and a capacitor C.
If switch S1 closes, there still is no completed conductive path for current to flow because
of the insulated space between the metallic plate of capacitor C. When the switch closes
however, the voltage on the top plate of the capacitor is equal to +V. The top plate of the
capacitor is connected to the positive terminal of the supply voltage V through the
resistor and the closed switch. Electrons tend to accumulate on the lower plate of the
capacitor, attracted by the positive voltage on the top plate.
At the same time, as electrons accumulate on the bottom plate (causing the bottom plate
to become negatively charged), electrons are repelled from the top plate as they feel the
influence of the negative charge on the bottom plate and also the positive voltage from
the top battery terminal. Thus there is a net flow of electrons from the top plate of the
capacitor back to the battery, and from the lower battery terminal to the lower plate of the
capacitor. The top plate of the capacitor accumulates a positive charge (lack of electrons)
and the bottom plate of the capacitor accumulates a negative charge (surplus of
electrons). This difference in charges on the top and bottom plates constitute a voltage
across capacitor C. The speed at which the voltage rises is dependant on the size of the
capacitance C and of the resistance R, according to the following equation:
-t/RC
) where e = 2.7182 (a constant commonly used in exponential and
Vc = V * (1 - e
hyperbolic equations where ln e = 1)
Vc = voltage that exists across capacitor C
t = elapsed time in seconds since switch S1 is closed
R = resistance of R in ohms
C = capacitance of C in farads.
The value RC is called the "time constant" of the circuit. Vc will reach about 63% of V in
1 time constant.
After a period of time, the voltage across the capacitor will equal the supply voltage. At
this point there will be no further flow of electrons. If switch S1 is then opened, and
switch S2 closed, the capacitor will lose its charge. This is because the lower plate of the
capacitor is now connected, through the resistor, to the positive voltage that has
accumulated on the upper plate. Electrons that had accumulated on the lower plate of the
capacitor are now attracted back to the upper plate of the capacitor and there is a path for
them to reach it - through switch S2, through R and on to the upper plate of C. As
electrons arrive back at the upper plate, they reduce the charge and thus the voltage on
the upper plate. The rate at which the voltage falls, is still dependant on the value of R
and C as before. At some point the voltage across C will decrease ("discharge") to 0
volts, at which point current flow will stop again.
During both charging and discharging cycles, there is current flow in the circuit, but no
electrons actually flow through the capacitor. The apparent current through the capacitor
is a result of "charge displacement" rather than electrons flowing through the capacitor
Switch S1 opened, S2
closed
V
Vc
Switch S1 closed
time
Graph of voltage across capacitor
The Dynamic Operation of CMOS gates.
Consider the operation of one logic gate driving the input to another logic gate. We'll use
the example of an inverter driving another inverter but the information presented applies
to any type of CMOS logical component.
A
Vx
a) an inverter gate driving another inverter
Vdd
Vdd
A
C
b) the capacitive load at node A
The physical gate/oxide/substrate structure of NMOS and PMOS transistors form
capacitors. The effect of this is to add a capacitance at the input of the second inverter.
This is because the input to the second inverter is actually connected to the gates of both
the PMOS and the NMOS transistors implementing this inverter. The equivalent circuit
showing this capacitance C is shown above. This capacitance has a negative effect on the
time it takes the second inverter to change states as a result of a change in the output of
the first inverter. The voltage across a capacitor cannot change instantaneously. The time
it takes node A to switch to Vdd or to 0 volts will depend on the size of C and the on
resistances of the transistors in the first inverter. (We have been assuming that the on
resistance is 0, but actually its a few ohms). Typically, the magnitude of C may be around
50 fF. (50 femtoFarads or 50 * 10**-15 Farads). Since C depends on the surface area of
the gate area, it ultimately depends on the level of integration of the integrated circuit.
Gate capacitance within a microprocessor will be much, much smaller than the gate
capacitance of a CMOS inverter chip because the size of the transistors will be much
smaller. If the output of a gate is connected to the inputs of multiple logic gates, the total
capacitance at the output is equal to the sum of capacitances of any connected gates.
The delay that this capacitance adds to the response time of a logic gate is called the
propagation delay. It can be seen in voltage waveforms of the input and output
waveforms as shown below. The input to the first inverter in our example is the
waveform for Vx. The output of the first inverter is VA.
Vdd
Gnd
Vx
50%
50%
Vdd
Gnd
VA
50%
50%
propagation
delay
propagation
delay
Propagation delay : the time between a change of input and a resulting change in
output.
Propagation delay is measured at the 50% points of the signals. A typical propagation
delay of a CMOS inverter is 10 nanoseconds (ns). Propagation delays increase as more
loads are connected to a gate's output.
Capacitance has another negative effect on the dynamic operation of logic gates. It was
stated earlier that under static conditions, a CMOS logic gate consumes no power because
no current flows through the gate terminal of a MOS transistor. When the input signal
changes however, the gate capacitance must charge (or discharge). This does consume
power, as charge or discharge current flows through the transistors of the previous gate
that is generating the input voltage.
The bottom line here is that CMOS logic gates only consume power when the output
switches states. At this time it must charge or discharge the gate capacitance of any logic
gates connected to the output. The power consumed by an individual transistor may be
very small, but in an integrated circuit that is as complex as a microprocessor, the total
power required can be a major problem. When current flows through any resistance,
some of the energy consumed is converted to heat. Increasing the operating switching
speed of a circuit will also increase its power consumption (and the generated heat)
because more transistors will be switching per unit time.
Here's a practical example:
Let's say that a gate's typical capacitance is 50 fF and we have a circuit that operates at
1000 MHz. (10**9 switching or clock cycles per second).Let's say that the dynamic
power consumed by each gate at this speed is 1.75 microwatts. Let's also say that we
have a microprocessor that has 10 million gates and that on average, 20% of them switch
states per clock cycle. How much power does the microprocessor require?
Power required = 107 (gates) * 0.20 *1.75 * 10-6 = 35 watts
As a real, practical example, the power consumption of a current Pentium 4 operating at
2.4 GHz is about 75 watts. Small wonder that core operating temperatures rise above 40
degrees C even with a heat sink and fan on top of the microprocessor.
Summary - Points to Remember








Ohm's Law: V = I / R where V = voltage in volts, I = current in amperes, R =
resistance in ohms
Power = V * I
current digital integrated circuit use CMOS technology to implement complex
logic circuits.
CMOS only consumes power when transistors switch states (on-to-off, or off-toon) CMOS consumes less power than any other current technology.
Power consumption generates heat. Steps may have to be taken to remove heat
from an integrated circuit. (fan cooling, liquid cooling)
Power consumption is proportional to the level of integration of the chip (the
number of transistors) and operating frequency.
Capacitance exists whenever 2 parallel conductors are separated by an insulator.
(MOS transistor gate/oxide/substrate structure, wires within a cable, parallel
traces of copper foil on a printed circuit board, etc)
The effect of capacitance is to oppose voltage changes and this causes the
propagation delay associated with digital logic components.