Basic
CMOS Circuits
0. Introduction
CMOS logic devices can be used to build a
wide range of circuits, e.g. circuits that perform Boolean logic or
mathematical operations, counters and dividers, circuits that generate timing sequences,
and waveform synthesizers. In this sequence of lab exercises you will get an
opportunity to investigated a number of basic CMOS applications. This should
enable you to build up a repertoire of useful circuits.
There are large numbers of CMOS devices,
divided in a number of families. While it is useful to be aware of the fact
that for many tasks there are specially developed devices, within the context
of this lab we will stick with a very small subset. It is expected that you
become reasonably familiar with their operation.
Using only very few components, it is
possible to build fairly elaborate pulse and signal generators. Since this is
probably one of the more useful applications of CMOS within the context of a
research lab, this will be the focus of the following labs. After some
exercises with the use of basic logic gates, you will first build a pulse
generator based on CMOS gates and RC networks. Subsequently, you will build a
similar instrument using counters. The final project is a simple approach to
digital wave-form generation.
1. General precautions
CMOS
devices are generally quite forgiving, as long as you stick to the following
rules.
·
You will see two families of CMOS, the 4000 series
and the 74HC series. 4000 series devices can operate with a supply voltage
between 3V and 15V, the 74HC series is intended for operation around 5V. To
avoid mistakes, always use 5V as power supply voltage.
·
Inputs and outputs should not see voltages higher
than the positive supply voltage, or lower than the negative supply (usually
ground). Therefore, before you connect devices such as the signal generator to
your circuit, first connect your power supply. Furthermore, make
sure that the output from your signal generator is always positive, and
less than 5V. Use your oscilloscope to check the signal before you apply it to
the CMOS circuit.
·
CMOS circuits have well defined output states as
long as all inputs are defined. Open inputs should be avoided. All unused
inputs should be tied high (to Vs) or low (to ground). Inputs that
go “off board” should be connected to ground with a 1MΩ resistor. This
way, even when they are not connected to the outside world, they still are in a
well defined state. It is tempting to ignore gates that are note used. However,
gates with ill defined inputs are prone to oscillation and will draw large
supply currents.
·
To avoid coupling between units via the supply
lines, bypass the supply with a 0.1μF capacitor mounted close to every
CMOS IC packages on your board.
2.
Basic ingredients
To get
used to the layout and characteristics of CMOS chips, using only NAND gates, build
the following basic circuits, and determine their truth tables. For the 4-input
AND gate checking the whole table gets boring. Select about a dozen
“interesting” input combinations, and verify that the output takes the expected
values.
a) 2-input
NAND
b) Inverter
c) 2-input
OR
d) 2-input
XOR
e) 4-input
AND
f) RS
flip-flop
3. Digital wave-form
generation
In
a previous lab, you have generated a high quality sine-wave signal using a Wien
bridge oscillator. This circuit had a few obvious disadvantages. 1) It was
difficult to predict the amplitude of the sine-wave, since this depended
sensitively on the elements (diodes, lamp) in the feedback loop. 2) Changing
the frequency involved simultaneously changing two resistors or two capacitors.
Using
digital techniques it is possible to avoid these problems. One can make
sine-wave generators (and for that matter signal generators with output
wave-forms of any shape) that have very well defined amplitude and a frequency
that is an integral fraction of a clock frequency. Especially changing the
frequency now becomes a simple operation, just change the frequency of the
clock. The price one pays for these advantages is associated with the fact that
a digital circuit can only take a finite number of discrete states. As a
result, the output signal is not quite continuous, but looks like a (large)
number of (small) steps.
The circuits in this section will be based exclusively on the
Data Flip-Flop 74HC74.
To become familiar with slightly more complicated circuits, first do the
following exercise.
·
Using a 74HC74 dual DFF and some gates, build a
two-bit ripple counter. (See fig. 8 in the Flip-Flop and counter handout.) Your
signal generator can function as clock. Use your oscilloscope to verify that
the decoder outputs cycle in the desired order.

To
demonstrate the principle of digital waveform generation, let us first
construct a very simple circuit. Figure 1 shows how the outputs of a three
stage Johnson counter can be combined to produce a very crude approximation of
a sine-wave. The circuit has 8 different states, but because of the symmetry of
the sine-wave the output takes only 4 values.
You
can get a much cleaner sine-wave by expanding the number of stages. This also
makes it possible to give the steps in the output signal different height so
they follow a sine wave pattern more closely. The appropriate resistor values
for a six-stage circuit are indicated in figure 2. Again, build the circuit. Check that even with a very simple
low-pass filter much of the “discreteness” of the signal can be removed without
changing the over all shape.

Figure 2. A digital sine wave generator using DFFs
(74HC74).
R1 = R5 = 10 kW R2 = R4 = 17.5 kW R3 = 20 kW
Finally, let us look at a very different
wave form, the staircase. In this case we configure the DFFs as a four stage
ripple counter, i.e., the circuit can take 16 distinct states. With a
resistance network we give different “weight” to each of the four outputs. At
O4 you will find a complete 16 step staircase signal, but for good measure also
check what is at outputs O1 – O3.

Figure 3. A 4-bit
staircase generator using DFFs configured as ripple counter. R = 10 kW.