Eee311 L14
Eee311 L14
Eee311 L14
Digital Electronics
Lecture 14 – 12/11/2022
2
Decade Counters/BCD Counters
This a MOD-10 (decade) counter which counts from 0 to 9. When the state ten
(DCBA = 1010) occurs, the counter resets. If the NAND gate is not connected, it
is a BCD counter because it can count up to DCBA = 1111. 3
MOD-60 Counter
Six JK FFs are required (26 = 64) to make a MOD-60 counter. A MOD-60
counter counts from 0 to 59 and resets when Q5Q4Q3Q2Q1Q0 = 1111002 =
60 occurs at the output. 4
Decoding a Counter
Digital counters are often used in
applications where the count
represented by the states of the FFs
must somehow be determined or
displayed. One of the simplest means for
displaying the contents of a counter
involves just connecting the output of
each FF to a small indicator LED. In this
way the states of the FFs are visibly
represented by the LEDs (ON = 1, OFF =
0), and the count can be mentally
determined by decoding the binary
states of the LEDs. 5
Decoding a BCD Counter to 7-Segment Display
The 10 outputs of BCD counter can
be used to control 10 individual
indicator LEDs for a visual display.
More often, instead of using 10
separate LEDs, a single display
device is used to display the decimal
numbers 0 through 9. One class of
decimal displays contains seven small segments made of a material (usually LEDs or
liquid-crystal displays) that either emits light or reflects ambient light. The BCD
decoder outputs control which segments are illuminated in order to produce a pattern
representing one of the decimal digits.
6
Shift Register/Ring Counter
The simplest shift-register counter is essentially a circulating shift register connected so that the last FF shifts its
value into the first FF. This arrangement is shown in Figure using D-type FFs (J-K flip-flops can also be used).The
FFs are connected so that information shifts from left to right and back around from Q 0 to Q3. In most instances,
only a single 1 is in the register, and it is made to circulate around the register as long as clock pulses are applied.
For this reason, it is called a ring counter. Assuming a starting state of Q3 = 1 and Q2 = Q1 = Q0 = 0. 7
Decoders
8
Decoder
A decoder is a logic circuit that accepts a
set of inputs that represents a binary
number and activates only the output that
corresponds to that input number. In
other words, a decoder circuit looks at its
inputs, determines which binary number
is present there, and activates the one
output that
corresponds to that number; all other outputs remain inactive. The diagram for a general
decoder is shown in Figure with N inputs and M outputs. Because each of the N inputs can
be 0 or 1, there are 2N possible input combinations or codes. For each of these input
combinations, only one of the M outputs will be active (HIGH); all the other outputs are
LOW. 9
Enable Input
Some decoders have one or more ENABLE inputs that are used to control the
operation of the decoder. For example, refer to the decoder in Figure and
visualize having a common ENABLE line connected to a fourth input of each
gate. With this ENABLE line held HIGH, the decoder will function normally, and
the A, B, C input code will determine which output is HIGH. With ENABLE held
LOW, however, all of the outputs will be forced to the LOW state regardless of
the levels at the A, B, C inputs. Thus, the decoder is enabled only if ENABLE is
HIGH.
10
Concept of Three-line-to-8-line Decoder
11
Three-line-to-8-line Decoder IC
12
Five-line-to-32-line Decoder
A3 and A4 are connected in such a way that one of the decoder is active. For A 3 A4 = 00 ⇒
Decoder 1; A3 A4 = 01 ⇒ Decoder 2; A3 A4 = 10 ⇒ Decoder 3; A3 A4 = 11 ⇒ Decoder 4 is
13
active.
BCD to 7-Segmet Display Driver
14
ENCODER
The opposite of decoding process is called
encoding and is performed by a logic
circuit called an encoder. An encoder has
a number of input lines, only one of
which the input is activated at a given
time, and produces an N-bit output code,
depending on which input is activated.
The Figure shows a general diagram for
an encoder with M inputs and N outputs.
Here, the inputs are active-HIGH, which
means that they are normally LOW. 15
ENCODER
An octal-to-binary encoder (8-line-to-3-line
encoder) performs the opposite function than
3-line-to-8-line decoder : it accepts eight
input lines and produces a three-bit output
code corresponding to the activated input.
https://www.electronics-tutorials.ws/combination/comb_4.html
16
ENCODER Application
Encoders can be used to reduce the number
of wires needed in a particular circuits or
application that have multiple inputs. For
example, assume that a microcomputer
needs to read the 104 keys of a standard
QWERTY keyboard where only one key
would be pressed either “HIGH” or “LOW”
at any one time. One way would be to connect all 104 wires from the
individual keys on the keyboard directly to the computers input but this
would be impractical for a small home PC. Another alternative and better
way would be to interface the keyboard to the PC using an encoder.
17
Thank You