Prof.SurajitDhara SACT,
Dept.OfPhysics,NarajoleRaj College
C7T(DigitalSystemsandApplications),Topic:-Counters
Counters:Counterisasequentialcircuit.Adigitalcircuitwhichisusedfor acounting pulsesisknowncounter.Counteristhewidestapplicationof flip-flops.Itisagroupofflip-flopswithaclocksignalapplied.Countersare oftwotypes
Asynchronousorripplecounters.
Synchronouscounters.
Asynchronousorripplecounters:Thelogicdiagram ofa2-bitrippleup counterisshowninfigure.ThetoggleTflip-floparebeingused.Butwe canusetheJKflip-flopalsowithJandKconnectedpermanentlytologic1.
Externalclockisappliedtotheclockinputofflip-flopAandQAoutputis appliedtotheclockinputofthenextflip-flopi.e.FF-B.
LogicalDiagram
Oper at i on
SL.No Condi t i on Oper at i on 1.
InitiallyletboththeFFsbeintheresetstate
=00initially QBQA
2.
After1stnegativeclockedge
As soon as the first negativeclockedgeis applied,FF-Awilltoggle andQAwillbeequalto 1.
isconnectedtoclock
QA
inputofFF-B.SinceQA haschangedfrom 0to 1,itistreated asthe positiveclockedgeby FFB. There is no change inQB because FFBisanegativeedge triggeredFF.
=01afterthefirst QBQA
clockpulse.
3.
After 2nd negative clockedgeOnthearrivalofsecond negativeclockedge,FF- AtogglesagainandQA
= 0. The change in acts as a negative QA
clockedgeforFF-B.So
itwillalsotoggle,andQB willbe1.
= 10 after the QBQA
secondclockpulse.
4.
After3rdnegativeclockedge
Onthearrivalof3rdnegative clockedge,FF-Atogglesagain andQA become 1 from 0.
Sincethisisapositivegoing change,FFBdoesnotrespond toitandremainsinactive.So does not change and
QB
continues to be equalto 1.
=11afterthethirdclock
QBQA
pulse.
5.
After4thnegativeclockedge
Onthearrivalof4thnegative clockedge,FF-Atogglesagain andQAbecomes1 from 0.
This negative change inQA
actsasclockpulseforFF-B.
HenceittogglestochangeQB from 1to0.QBQA=00after thefourthclockpulse
TruthTable
Synchronouscounters:Ifthe"clock"pulsesareappliedtoalltheflip-flops inacountersimultaneously,thensuchacounteriscalledassynchronous counter.
4-bitSynchronousupcounter:TheJAandKAinputsofFF-Aaretiedto logic1.SoFF-Awillworkasatoggleflip-flop.TheJBandKBinputsare connectedtoQA.
LogicalDiagram
Operation
SLNo. Condition Operation 1. InitiallyletboththeFFs
beintheresetstate
=00initially.
QBQA
2. After1stnegativeclock edge
As soon as the first negativeclockedgeis applied,FF-Awilltoggle and wiQA llchangefrom 0to1.
Butatthe instantof applicationofnegative clockedge, , = =QAJA JB 0.HenceFF-B willnot changeitsstate.SoQB willremain0.
=01afterthefirst QQ
clockpulse.
3. After 2nd negative clockedge
Onthearrivalofsecond negativeclockedge,FF- AtogglesagainandQA changesfrom 1to0.
ButatthisinstantQA was1.SoJB=KB=1 and FF-B willtoggle.
Hence QB changes from 0to1.
QBQA = 10 afterthe secondclockpulse.
4. After3rdnegativeclock edge
On application ofthe thirdfallingclockedge, FF-Awilltogglefrom 0 to 1 butthere is no changeofstateforFF- B.
QBQA = 11 afterthe thirdclockpulse.
5. After4thnegativeclock
edge On application ofthe next clock pulse,QA willchangefrom 1to0 asQBwillalsochange from1to0.
QBQA = 00 afterthe fourthclockpulse.
Classificationofcounters:Dependingonthewayinwhichthecounting progresses,thesynchronousorasynchronouscountersareclassifiedas follows–
Upcounters
Downcounters
Up/Downcounters
UP/DOWNCounter:Upcounteranddowncounteriscombinedtogetherto obtainanUP/DOWNcounter.AmodecontrolM inputisalsoprovidedto selecteitherupordownmode.Acombinationalcircuitisrequiredtobe designedandusedbetweeneachpairofflip-flopinordertoachievethe up/downoperation.
Typeofup/downcounters
UP/DOWNripplecounters
UP/DOWNsynchronouscounter
UP/DOWN RippleCounters:IntheUP/DOWN ripplecounteralltheFFs operateinthetogglemode.SoeitherTflip-flopsorJKflip-flopsaretobe used.TheLSBflip-flopreceivesclockdirectly.Buttheclocktoeveryother FFisobtainedfrom Q=QbaroutputofthepreviousFF.
UPcountingmodeM =0-TheQ outputoftheprecedingFFis connectedtotheclockofthenextstageifupcountingistobe achieved.Forthismode,themodeselectinputMisatlogic0M=0.
DOWNcountingmodeM =1-IfM =1,thentheQbaroutputofthe precedingFFisconnectedtothenextFF.Thiswilloperatethe counterinthecountingmode.
Example:3-bitbinaryup/downripplecounter.
3-bit−hencethreeFFsarerequired.
UP/DOWN−Soamodecontrolinputisessential.
Forarippleupcounter,theQoutputofprecedingFFisconnectedto theclockinputofthenextone.
Forarippleupcounter,theQoutputofprecedingFFisconnectedto theclockinputofthenextone.
Forarippledowncounter,theQ baroutputofprecedingFFis connectedtotheclockinputofthenextone.
LettheselectionofQ andQ baroutputoftheprecedingFFbe controlledbythemodecontrolinputM suchthat,IfM =0,UP counting.SoconnectQtoCLK.IfM =1,DOWNcounting.Soconnect
QbartoCLK.
BlockDiagram
TruthTable
Operation
SLNo. Condition Operation 1. Case 1 − With M = 0
Upcountingmode
IfM=0andMbar=1,then theANDgates1and3in fig. will be enabled whereastheANDgates2 and4willbedisabled.
HenceQAgetsconnected totheclockinputofFF-B andQBgetsconnectedto theclockinputofFF-C.
These connections are same as those for the normalup counter.Thus withM =0thecircuitwork asanupcounter.
2. With M = 1 Downcountingmode
IfM =1,thenAND gates2 and 4 in fig.are enabled whereastheANDgates1and 3aredisabled.
HenceQAbargetsconnected totheclockinputofFF-Band QBbargetsconnectedtothe clockinputofFF-C.
These connections will produce a down counter. ThuswithM =1thecircuit worksasadowncounter.
ModulusCounterMOD–Ncounter:The2-bitripplecounteriscalledas MOD-4counterand3-bitripplecounteriscalledasMOD-8counter.Soin general,ann-bitripplecounteriscalledasmodulo-Ncounter.Where,MOD number=2n.
Typeofmodulus:
2-bitupordownMOD–4
3-bitupordownMOD–8
4-bitupordownMOD–16
Applicationofcounters:
Frequencycounters
Digitalclock
Timemeasurement
AtoDconverter