Digital circuit tips
- guidance and hints and tips on using digital logic circuits
Digital logic circuits are widely used in today's'
electronics. These circuits are used for a very wide variety of applications.
From simple logic circuits consisting of a few logic gates, through to
complicated microprocessor based systems.
Whatever the form of digital logic circuit, there are a
number of precautions that should be observed when designing, and also when
undertaking the circuit board layout. If the circuit is correctly designed and
constructed then problems in the performance can be avoided.
Decoupling
One of the main points to ensure is that the power rails are adequately
decoupled. As the logic circuits switch very fast, switching spikes appear on
the rails and these can in turn appear on the outputs of other circuits. In turn
this can cause other circuits to "fire" when they would not normally be intended
to do so.
To prevent this happening all chips should be decoupled. In
the first instance there should be a large capacitor at the input to the board,
and then each chip should be individually decoupled using a smaller capacitor.
The value of the capacitor will depend upon the type of logic being used. The
speed, and current consumption will govern the size of capacitor required, but
typically a 22nF may be used. For chips running with very low values of current
a smaller capacitor may be acceptable, but be aware that even low current logic
families tend to switch very fast these days and this can place large voltage
spikes onto the rails.
Some manufacturing companies suggest in their codes of
practice that a proportion of the chips should be decoupled. While this may be
perfectly acceptable, the safest route is to decouple each chip.
Earthing
The ground lines in a logic circuit of great importance. By providing an
effective ground line, problems such as ringing, spikes and noise can be
reduced. In many printed circuit boards a ground plane is used. This may be the
second side of a double sided board, or in some cases an internal layer in a
multilayer board. By having a complete, or nearly complete layer in the board,
it is possible to take any decoupling or earth points to the plane using the
shortest possible leads. This reduces the inductance and makes the connection
more effective. With the sharp edges, and the inherent high frequencies that are
present, these techniques are important and can improve the performance. For the
more simple circuits that may be made using pin and wire techniques, good
practise is still as important, if not more so. Earth loops should be avoided,
and earth wires should be as thick as reasonably possible. A little planning
prior to constructing the circuit can enable the leads to be kept as short as
possible.
General layout
The layout of a digital logic board can have a significant affect on its
performance. With edges of waveforms being very fast, the frequencies that are
contained within the waveforms are particularly high. Accordingly leads must be
kept as short as reasonably possible if the circuit is to be able to perform
correctly. Indeed many high end printed circuit board layout packages contain
software that simulates the effects of the leads in the layout. These software
packages can be particularly helpful when board or system complexity dictates
that lead lengths greater than those that would normally be needed are required
to enable the overall system to be realised. However for many instances this
level of simulation is not required, and lead lengths can be kept short.
Unused inputs
In many circuits using logic ICs, inputs may be left open. This can cause
problems. Even though they normally float high, i.e. go to the "1" state, it is
wise not to leave them open. Ideally inputs to gates should be taken to ground,
or if they need a logical "1" at the input they should be taken to the rail,
preferably though a resistor.
In many designs, spare gates may be available on the board.
The input gates to these circuits should not be left floating as they have been
known to switch and cause additional spikes on the rails, etc. It is best
practice to take the inputs of these gates to ground. In this way any
possibility of them switching in a spurious manner will be removed.
Summary
At first sight digital logic circuits may not appear to need all the care and
attention given to a radio frequency (RF) circuit, but the speed of some of the
edges on the waveform transitions means that very high frequencies are contained
within them. To ensure that the optimum performance is obtained, good layout is
essential. Obeying a few simple rules can often ensure that the circuit operates
correctly
|