Counters - Khalsa College Patiala

11
J INSTRUCTION MANUAL FOR STUDY OF 4 BIT GOUNTERS (SYNCHRONOUS & ASYNCHRONOUS) ¥ B t Counters (Synchronous & Asynchronous) has been designed to study the following 4 Counters; 1. o. 4. The 'h 1. 2. 3. Asynchronous Counters, g Forward Counter. Reverse Counter. Modulo Counter. Synchronous Counters, g Forward Counter, b Reverse Counter. ^ Programmable Counter. ^ Decade Counter. Ring Counter. jhonson Counter. strument Comprises of the Following Built In Parts : Fixed output DC Regulated power supply of 5V. Four SRDT switches are mounted on the front panel to select logic '0' & logic '1' inputs. Two JK fliptlop IC's 7476 are mounted on the front panel & Important connections are brought out on sockets. ^ IC 74193 (Synchronous counter 10) is mounted on the front panel and important connections brought out on sockets. g IC 74190 (Synchronous decade counter IC) is mounted on the front panel and important connections brought out on sockets.

Transcript of Counters - Khalsa College Patiala

J

INSTRUCTION MANUAL

FOR

STUDY OF 4 BIT GOUNTERS

(SYNCHRONOUS & ASYNCHRONOUS)

¥

B t Counters (Synchronous & Asynchronous) has been designed to study the following4

Counters;

1.

o.

4.

The 'h

1.

2.

3.

Asynchronous Counters,g Forward Counter.

Reverse Counter.Modulo Counter.

Synchronous Counters,g Forward Counter,b Reverse Counter.^ Programmable Counter.^ Decade Counter.Ring Counter.

jhonson Counter.

strument Comprises of the Following Built In Parts :

Fixed output DC Regulated power supply of 5V.

Four SRDT switches are mounted on the front panel to select logic '0' & logic '1'inputs.

Two JK fliptlop IC's 7476 are mounted on the front panel & Important connections arebrought out on sockets.

^ IC 74193 (Synchronous counter 10) is mounted on the front panel and importantconnections brought out on sockets.

g IC 74190 (Synchronous decade counter IC) is mounted on the front panel and importantconnections brought out on sockets.

0)

7.

8.

IC 7420 is mounted on the front panel and important connections brought out on socketsto perform Modulo N counter experiment.

1 Hz monoshot clock pulse output with pulser switch provided on the front panel.

The front panel of the Instrument is Printed Circuit Board (RGB) ail the diagramsreprinted on the front panel and front panel is mounted on a spray painted

fibre cabinet.

THEORY

Se uential logic circuits are used for a variety of timing, sequencing and storage^ -ru., rharacteristics of these circuit is the memory. The output of sequentialfunctions. The Key t'Mciic.

logic circuits is a combined function of the various inputs states applied and the result of

evious operations which are stored in the circuit itself, The main circuit elements are flipflops These circuits stores binary data and their states are changed by the logic input signalsin accordance with the current informations stored in them. The sequential operation aregenerally seqenced by a periodic logic signal known as trigger or clock. The clock is anoscillator that generates pulses at a fixed frequency. The operation of most of the circuitsremains the same over a very wide range of clock frequencies. This gives us an advantagesthat circuit behaviour can be studied more closely at very low clock frequencies, save one persecond.

A counter is a sequential logic circuit made up of flip flops and is used to count the

number of pulses applied to it. The input pulses change the states of the flip flops in such away that by observing the output levels, the total number of input pulses applied can bedetermined. The counters are of two types

1. Asynchronous Counter.

2. Synchronous Counter.

1. Asynchronous Counter :Here we have used Ripple Counter (Asynchronous Counter) which is simple and

straight forward in operation & construction and usually requires a minimum of hardware.

Here each flip-flop Is triggered by the previous flip-flop, that is why it is also called as a serialcounter.For the 4 bit ripple counter, we have used two 7476 IC's each comprises of two flip-flops. For up counting, counter counts the no. of clock transition up to a maximum of 15. Clockpulses are applied at the clock input of first flip-flop & output of first flip-flop: i e. QA is used todrive flip-flop B & QB is used to drive flip-flop C and so on. The counter begins at count '0000'advances one count for each clock transition until it reaches count '111T. Aithis point, it

©

'/U

. II r^v/f:^r aaain For down counting, clock pulses,eselsbacK.o|OCO^^^^^^

are reduced by one coun^.^^ „,,, 3^,;,'} resets back to(fBseii' uc.-—

::=3===i==3==connecting the '='°^ ^^^,3 3, synchronous counters,

perform the expprocedure

to

:0 For Asynchronous CountersA. Forward Counter:

1.Connect the circuitas shown in Fig- U)through patchcordsi.e. connectclockoutput to ck(cloGk puus.^_pulse) input of firstflip flop, connect Qoutput of firstflip flopto ok input of second

GN

UUipccw.

to ok input of second

OUTPUT INDICATORS

D

!C2Mi Or

74761 1/2 OFB 1/2 OF

1 1/2 OF

13^

FIG. (1) FORWARD COUNTER

h/' t

frhirrtflioflop Q output of third flip flop

flip flop, 0 output of f econd flip flop to ok inpu o ^,0 ok input offourth flip flop as shown ,n 9 .^p^^^gether.output indicators. Connect reset (R) points of all th

g-

4

usIhs OWOPr WOQls atfiis^

r

once. Check the status Of output indicabi 8, ihey 61 wI'ch)

5 porFoward counting,reset inputs (or apply logic input1) and Apply clock pulses one

by one using pulser switch.Note down all the four outputsatthe application of each pulse&verifythetruthTableNo.1.

automatically-

Truth Table (1) for 4 Bit Forward Counter

f I

^ INPUT OUTPUT

Clock QD QC QB OA

0 0 0 0 0

1 0 0 0

2 0 0 1 0 V

3 0 0 1^

4 0 1, 0 d.^

5 0 1. 0^6 0 1' 1" 0 ̂

7 0 1 1 1

8 1 0 0 0

9 1 0 0 V--

10 1 0 1

11 1 0 1 -

12 1 1 0 c ̂

13 1 1" 0

14 1 1 1' 0 V15 1 1 1 1,

V y

B. Reverse Counter: LSB

1.

2-

3-

A.

Connect the

circuit asshown in Fig-

(2) through pulse ̂patchcordsj 0. connectclock outputto ck(clock

1 1/2 OF

QB

9iC 1

11

fi 1/2 OF

747612 10

7

Vcci QC-ff

J3

Ck3

TQ

QD

MSB

i"5

^ 102^^' J

Q -Ck

® i-2-) 1/2 OF 6 1/2 OF7476 i K ,^7476

16 14 —I 12 10

13 2 C 7

TGND

FIG. (2) REVERSE COUNTER

ulse) input offirst flip flop, connect Q output of first flip flop to ck input Oi second flipflop 'o'output of second Hip flop to ck input of third flip flop, Q output of third flip flop tock input of fourth flip flop as shown in Fig .2. Also connect all the four Q outputs tooutput indicators. Connect set (S) points of all the flip flops together through patchcords.

Keep all the J & K inputs open, as in open condition they assume the state to be'T.

Switch ON the instrument using ON/OFF toggle switch provided on the front panel.

To set the outputs (Q) of flip-flops connect the set pins (S) to ground point (logic 0)once. Check the status of output indicators, they should show 1111 level.

<]>

(9

Truth Table (2) for 4 Bit Down Counter5 For Down counting, open

the set (S) inputs (or apply

logic input 1) and Applyclock pulses one by oneosingpuleer switch. Note

i down ail the four outputsattheapplioationofeach

• . pulse & verify the truthTable No.2.

pp'cationofnektpulse,i 1111 automatically.

C. Wlodulo-N counter:counter counts upto 15 & then resets to '0'. But it can be made to reset at4 bit ripple c p^irpose, we operate the reset connections automatically using 4-

gny clock pu'se- ^hat output of a NAND Gate is low if & only if all the inputs arejpput NAND convert 4-bit foward counter to Decade counter. For decade counterpigh. suppose g^Q^ild count upto 9 & than resets to zero at tenth clock pulse. Weit is required output of 2nd & 4th flip fio^s high & output of 1 st & 3rd flip flopkpoW that at 1 ^ of 2nd & 4th flip flop & Q output of 1 st & 3rd flip flop for the

So vvo cnoo^is 10^- " . , mAND lsb output indicator

5 of 4-input 0.^/

^ INPUT OUTPUT

Clock QD QC QB QA

0 1 1 1 1

1 1 1 1 0

2 1 1 0 1

3 1 1 0 0

4 1 0 1 1

5 1 0 1 0

6 1 0 0 1

7 1 0 0 0

8 0 1 1 1

9 0 1 1 0

10 0 1 0 1

11 0 1 0 0

12 0 0 1 1 ■'13 0 0 1 0 >

14 0 0 0 1

15 0 0 0 0k y

MSB

' ff"".fAlsoconhectoutput®1aND Gate to common

all the flip flops-ofrpsetp'UU^ iUp CLUUK

vou can program the''^nterforahynumberofpulses that is why this

known ascO

MO

u

1.

nterduio counter.

1 1/2 OF

QB

910 1

11

fi 1/2 OF

747610

8

1 1/2 OF

QD'

p11

10 2 Qb 1/2 OF

127476

1(18 Q

iC 7420>Connectthe circuit FiG (3) DECADE counteras shown in Fig. (3) through patchcords i.e. connect clock output to ck (clock pulse)input offirst flip flop, connect Q output of first flip flop to ck input ofsecond flip flop, Qoutput ofsecond flip flop to ok input of third flip flop, Q output of third flip flop to ck input

V 0

"h

'"''"'^corned reset (R) points of

Gate.

the J & K inputs open, asl^n'opencondniontheyassunaethestate to be'1'-

, .u inc;trument using ON/OFF toggle switch provided on the front panel.switch ON the instruf

addIv clock pulses one by one using pulser switch. Note down all thepor oounting^ application of each pulse & verify the truth Table No.3.four outputs a

ter counts the pulses upto decimal 9 i.e. from 0000 to 1001 & then on theconclusion : Coun jp at any count for3pplicationofnextpu.se,.exan'ip'® : trom 0000 to 1010; Connect the Q output of first flip flop, Q output

fnp fi^P- QAND°Gate All other connections will remain same.

t to count from 0000 to 0011 : Connect the Q output of first flip flop, Q outputflip flop. Q ^"P ̂ '°P' °

^!.\ND Gate. All other connections will remain same.o want to count from 0000 to 1101 : Connect the Q output of first flip flop, Q output

'^^e^nd flip flop,'□'output of third flip flop, Q output of fourth flip flop to the inputs of^AND Gate. All other connections will remain same.

synchronous CountersDown and Programmable Synchronous Counter using IC 74193 :

Counter :Connect 4 logic inputs to A,B,C&D inputs of IC 74193 through patchcords. Setth?

Truth Table (4) for 4 Bit Up Counter4 logicinputstoOOOO. ^ Lj! ^^ ̂ f INPUT OUTPUT ^

9 For Up counting, connect clock QD I QC I QB I OA' niitout of clock pulse to UP ^ 0 o 0 '0'< ^ 0 0 0 1^.

input of the 2 o o 1 o3 0 0 T ,1

3 Connect 4 logic outputs (QA, ^ o ^QB QC. QD) to output 5 0 1 0 1

6 0 1 1 0indicators. ^ 0 1 1 1

8 1 0 0 0Switch ON the instrument using g 1 0 0 1

'*■ ON/OFF toggle switch 10 3 0 1 1provided on the front panel. , 1 0 013 1 1 0 1

To reset the output on 0000, 14 1 1 1 0_pressclearswitch(SW1)once. [_>= [J MM MMlock pulses one by one using pulser switch. Note down all the four outputs at

Cratiln of each pulse & verify the truth Table No. 4.the applicat'oc oi e k O OCARRY I I BORROW

lusion : Counter counts the pulses up to decimel 15 (from ^...,, 0 then on the application of next pulse, resets to zero MfssOOOOtolliU®automatically. ^

o- ^

nov/n Counter:' For Down coTinting, connect output of clock pulse to DN 0^(Pown) input of the IC. ^ ^ ^

SWi CLEAR LOAD SW2

Apply clock pulses one by one using pulser switch. Note downII the four outputs at the application of each pulse & verify the truth

Table No. 5.

Conclusion : Counter counts the pulses from 1111 to 0000 & then on the application of nextpulse, sets to 1111 automatically.programmable Counter :

All counters in 74193 are fully programmable. This means that the outputs may bepreset to any state by entering the desire data inputs and then press the load switch (SV\/2)once.

;1- ©CLEAR LOAD SYt

/N & PROGRAMMABLEHRONOUS COUNTER

FIG. 4

To preset the outputs at anystate, apply required logic input onA,B,C,D Inputs of IC 74193 and thenpress load switch (SW2) once. Forpxsmplfi ■

It we want to preset the outputsen 1010level;Apply logic inputs 10103tA,B.C,D inputs of IC 74193 and theneress load switch (SW2) once. Forcounting operation procedure willUainsameasin case ofupand downcounting.

Truth Table for (5) 4 Bit Down

INPUT II OUTPUT

Counter

Clock

Ifwewantto preset the outputs 12

on level : Apply 109'^ 14.BCDinputsof ic 74193 andthenleress load switch (SW2) once. Forounting operation procedure willremain same as in case ofup and down counting

f tJl I '

r-> .,n and Proqrammable Synchronous Counter using IC 74190 :Oecade Up, Down ana r a

_ ,~ade Up Counter .

Connect Clock output (1Hz) to OK Input of the IC 74190through patchcords.

Connect LOAD to logic input '0' (ground point) and alsos to ground point printed on thefront panel. Apply logic 0 on GoflC.

Connect 4 logic outputs to output indicators.

switch ON the instrument using ON/OFF toggle switchFiG. 5 MAX/MIN

provided on the froht

Apply logic 1 (5V DC printed on the front panel) on LOAD pin of IC.

Apply clock pulses one by one using pulser switch. Note down all the four outputs at

application of each pulse & verify the truth Table No. 6.

-j-il

C nclusion * Counter counts the pulses upto 9 i.e. from 0000 to 1001 & then on the application..nrrie' resets to 0000 automatically.OUI lOIUOH-zi " -

of next pulse, resets to 0000 automatically

Decade Down Counter .^ 8. Apply logic on D/U pin of 10.

■ g Apply clock pulses one by one usingpulser switch. Note down all the fouroutputs at the application of eachpulse & verify the truth Table No. 7.

Conciusion : Counter counts the pulses.,oto9i.e.from1001to0000&thenontheapplication of next pulse, resets to 0000automatically.

Programmable Counter:

All counters In 74190 are fullyprogrammable. The Counter can belelet to any desired. BCD digit asdetermined by the states of the data ^inputs output of counter, _

connect 4 logic inputs to A, B, C & Dr.. I its of I C 741 90.

connect the LOAD input tomund point and apply logic inputs onf o c & D inputs of IC 74190 andbserve the output status everytime.° For counting purpose repeatsteps as in case of Decade up ^and Down counters.

Ring counterConnect the circuit

as shown in Fig/6)through

. J ~ « CLOCKpatchcordsi.e pulseconnect clock input

Truth Table (6) for 4 Bit Modulo Counterm ■ MB H ^^1 t

INPUT OUTPUT

Clock OD OC OB OA

0 0 0 0 0

1 0 0 0 1

2 0 0 1 0

3 0 0 1 1

4 0 1 0 0

5 0 1 0 1

6 0 1 1 0

7 0 1 1 1

8 1 0 0 0

9 1 0 0 1

10 0 0 0 0

Truth Table (7) for 4 Bit Down Counter

OUTPUTINPUT

Clock QC 01

OUTPUT INDICATORS

M2 OF

7476

FIG, (6) RING COUNTER

INPUT

Clock

of all the flip flops together

and connect it to clock Truth Table (8) for Ring Counteroutput(1 Hz). Connect J / input OUTPUT ^input of each flip flop to Qoutput and K input of each OA QB QC QDflip flop to ^output. ° 1 0 0 0 —I

- 1 0 1 0 0 RECYClConnect set input (S) of j 0 o 1 0first flip flop to reset inputs (^3 o o 0 i J—of next three flip flops as

shown in Fig. No. 6. Connect 4 logic output indicators to 4 Q outputs.

Switch ON the instrument using ON/OFF toggle switch provided on the front panel.

OUTPUT

OA QB QC QD

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

RECYCLE

3 Apply clock pulses one by one using pulser switch. Note down all the four outputs atthe application of each pulse & verify the truth Table No.8.

Jhonson Counter :Connect the circuit output indicators msbas shown in Fig. (6)t h r ough ^ I iJ ̂patchchords (a; _ jcjconnect clock input -S , 14

of all the flip flops | "^T^together and i/-rtnnect it to clock ——conneoi FIG. (7) JHONSON COUNTSr

output(IHz). (b) _Connect J input of 1st flip-flop to Q output of the 4th flip flop and K input of the 1st flip-

flop to Q output of the 4th flip - flop, (c) Connect J input of 2nd, 3rd, 4th flip -flop to Qoutput of 1st, 2nd, 3rd flip-flop and Connect K input of the 2nd, 3rd, 4th flip-flop to Qoutput of the 1st, 2nd, 3rd flip-

(d) Connect reset oins of Truth Table (9) for Jhonson Counter

FIG. (7) JHONSON COUNTSr

flop, (d) Connect reset pins of

all the flip flops together asshown in Fig. No. 6. Connect 4logic output indicators to 4 Qoutputs.

Switch ON the instrument using

ON/OFF toggle switch provided

INPUT

Clock

0

1

2

3

4

5

6

7

OUTPUT

OA QB QC QD

0 0 0 0 ~1

1 0 0 0R

1 1 0 0E

C1 1 1 0 Y1 1 1 1 C

0 1 1 1 L

0 0 1 1 E1

0 0 0 1 Jy

3.

on the front panel.

To reset the output connect reset pins to logic 'o' (Ground) once. After that this pin willremain open.

4. Applydockpulsesonebyoneusingpulserswitch. Note down all the four outputs atthe application of each pulse & verify the truth Table No.9

STANDARD ACCES<^npii=c

1. Twenty (4mm) Singlepoint Pachcords for Interconnections

2. Instruction Manual.