counter and shift register

Arun Somani (arun@shasta.ee.washington.edu)
Sun, 2 Mar 1997 22:21:27 -0800

It has been brought to my attention that you may not be able
to use TTL library. (If somebody has found a way, please let
the whole class know.
In any case, you can implement counters and shift registers
using D flip flops.

If we assume that P and T inputs were always going to be 1, then
163 counter will have 4 D flip flop, called FF A, B, C, and D
with inputs as Dx and output as Qx for flip flop x. CLR=0 will clear the
output (set it to 0) and LOAD=0 will load a new value A, B, C, and D.
For counting both CLR=LOAD=1.
Then equations for D inputs for (binary up) count up is are:

DA = CLR * (LOAD * QA' + LOAD' * A)
DB = CLR * (LOAD * QA * QB' + LOAD' * B)
DC = CLR * (LOAD * QA * QB * QC' + LOAD' * C)
DD = CLR * (LOAD * QA * QB * QC * QD' + LOAD' * D)

Equations for D inputs for (binary down) count up is are:

DA = CLR * (LOAD * QA' + LOAD' * A)
DB = CLR * (LOAD * QA' * QB' + LOAD' * B)
DC = CLR * (LOAD * QA' * QB' * QC' + LOAD' * C)
DD = CLR * (LOAD * QA' * QB' * QC' * QD' + LOAD' * D)

Similarly for shift register, since we will need only Clear, shift, and
hold facility, for a 4 bit shift register with CLR input, you need
4 D flip flops, called FF A, B, C, and D.

The corresponding equations are:
It clears if CLR=0. It shifts if SHIFT=1. It retains the value if
SHIFT=CLR=0.

DA = CLR * (SHIFT' * QA + SHIFT * IN)
DB = CLR * (SHIFT' * QB + SHIFT * QA)
DC = CLR * (SHIFT' * QC + SHIFT * QB)
DD = CLR * (SHIFT' * QD + SHIFT * QC)

So you can create, up counter, down counter, and shifter using these
equations and create these block symbols and then use them in your
projects.

Sorry about the problem. My understanding was that synario had built in
library for TTL parts. LArry is still looking into this matter.

Arun Somani

m