9 views

Uploaded by mdhuq1

- r059210504 Digital Logic Design
- System Design Example 38
- R8A66161DDSP
- HCF4020
- Counters
- EE221-Lecture-35-37.ppt
- Water Fare meter
- TNEB Junior Engineer Electrical Model Paper 1
- كارت الميزان
- A Systematic Design Procedure for Asynchronous Counters Using El Naga s Transitions Technique
- MBI5025
- 74HC193
- Lab Manual LOGIC DESIGN
- 6.2Counters
- Scan Path Design (1)
- Lcdf3 Chap 07 p1
- Tez FatmaSaricaPhDThesis
- Performance Comparison of Various Clock Gating Techniques
- Integrated Circuits La manul
- PRESCALAR

You are on page 1of 69

Asynchronous Counter Synchronous Counter

Register

Counters

A counter is a sequential machine that produces a specified count sequence. The count changes whenever the input clock is asserted. There is a great variety of counter based on its construction:

Clock: Synchronous or Asynchronous Clock Trigger: Positive edged or Negative edged Counts: Binary, Decade, Gray Count Direction: Up, Down, or Up/Down Flip-flops: JK or T or D

Counters

A counter is a register that goes through a predetermined sequence of states upon the application of clock pulses. Asynchronous counters Synchronous counters Async. counters (or ripple counters)

the clock signal (CLK) is only used to clock the first FF.

Each FF (except the first FF) is clocked by the preceding FF.

Sync. counters,

the clock signal (CLK) is applied to all FF, which means that all FF shares the same clock signal,

thus the output will change at the same time. 3

Uses of Counters

The most typical uses of counters are:

To count the number of times that a certain event takes place The occurrence of event to be counted is represented by the input signal to the counter To control a fixed sequence of actions in a digital system To generate timing signals To generate clocks of different frequencies

Counters are classified into two categories: Asynchronous Counters (Ripple counters) Synchronous Counters Asynchronous: The events do not have a fixed time relationship with each other and do not occur at the same time. Synchronous: The events have a fixed time relationship with each other and do occur at the same time. Counters are classified according to the way they are clocked:

In asynchronous counters, the first flip-flop is clocked by the external clock pulse and then each successive flip-flop is by clocked the output of the preceding flip-flop. In synchronous counters, the clock input is connected to all of the flip-flop so that they are clocked simultaneously.

Asynchronous Counters

In asynchronous counter each flip-flop derives its own clock from other flip-flops and is therefore independent of the input clock. Consequently, the output of each flip-flop may change at different time, hence the term asynchronous. For the asynchronous counter, the output of the first flip-flop becomes the clock input for the second flip-flop, and the output of the second flip-flop becomes the clock input for the third flip-flop etc. For the first flip-flop, the output changes whenever there is a negative transition in the clock input.

Asynchronous Counters

This means that the output of the first flip-flop produces a series of square waves that is half the frequency of the clock input. Since the output of the first flip-flop becomes the clock of the second flip-flop, the output of the second flip-flop is half the frequency of its clock, i.e. the output of the first flip-flop that in turn is half the frequency of the clock input. This behavior, in essence is captured by the binary bit pattern in the counting sequence.

Asynchronous counters

Modulus (MOD) the number of states it counts in a complete cycle before it goes back to the initial state. Thus, the number of flip-flops used depends on the MOD of the counter (ie; MOD-4 use 2 FF (2bit), MOD-8 use 3 FF (3-bit), etc..) Example: MOD-4 ripple/asynchronous upcounter.

The asynchronous counter that counts 4 number starts from 00011011 and back to 00 is called MOD-4 ripple (asynchronous) up-counter. Next state table and state diagram

Present State Q1Q0 00 01 10 11 Next State Q1Q0 01 10 11 00

00 11 10

9

01

MOD-4 Asynchronous up-counter

Q0 (LSB) 1 CLK Q1 (MSB)

Q

CLK

Q

CLK

K

CLK

Q1 0 Q0 0 0 1 1 0

1 1

0 0

0 1

1 0

1 1

Binary 0 1 0

2 3 0 1 10

2 3

The external clock is connected to the clock input of the first flip-flop (FF0) only. So, FF0 changes state at the falling edge of each clock pulse, but FF1 changes only when triggered by the falling edge of the Q output of FF0. Because of the inherent propagation delay through a flip-flop, the transition of the input clock pulse and a transition of the Q output of FF0 can never occur at exactly the same time. Therefore, the flip-flops cannot be triggered simultaneously, producing an asynchronous operation. The 2-bit ripple counter circuit above has four different states, each one corresponding to a count value.

A counter with n flip-flops can have 2 to the power n states. The number of states in a counter is known as its mod (modulo) number. Thus a 2-bit counter is a mod-4 counter. A mod-n counter may also be described as a divide-by-n counter. This is because the most significant flip-flop (the furthest flip-flop from the original clock pulse) produces one pulse for every n pulses at the clock input of the least significant flip-flop (the one triggers by the clock pulse). Thus, the above counter is an example of a divide-by-4 counter.

MOD-8 Asynchronous up-counter

C B A

Q

CLK

Q

CLK

Q

CLK

K

CLK

A 0

B

C

0

0 13

Next state table and state diagram Present State ABC Next State ABC

0 7 6 5 4 3 1 2

14

15

So far, we have design the counters with MOD number equal to 2N, where N is the number of bit (N = 1,2,3,4.) (also correspond to number of FF) Thus, the counters are limited on for counting MOD-2, MOD4, MOD-8, MOD-16 etc..

The question is how to design a MOD-5, MOD-6, MOD-7, MOD-9 which is not a MOD-2N (MOD 2N) ? MOD-6 counters will count from 010 (0002) to 510(1012) and after that will recount back to 010 (0002) continuously.

17

18

20

Circuit diagram for MOD-6 ripple up-counter (MOD 2 N)

C B A 1 CLK

J Q

CLK

J Q 1

CLK

J Q

CLK

K Q

CLR

K Q

CLR

K Q

CLR

Detect the output at ABC=110 to activate CLR. NAND gate is used to detect outputs that generates 0!

21

Propagation delay is severe for larger MOD of counters, especially at the MSB.

Existence of glitch is inevitable for MOD 2N counters.

Difficult to design random counters (i.e.: to design circuit that counts numbers in these sequence 56723156723156.)

Synchronous Counters

For synchronous counters, all the flip-flops are using the same clock signal. Thus, the output would change synchronously.

STEP 1: Obtain the State Diagram. STEP 2: Obtain the Excitation Table using state transition table for any particular FF (JK or D). Determine # of FF used. STEP 3: Obtain and simplify the function of each FF input using K-Map. STEP 4: Draw the circuit.

Synchronous Counters

Design a MOD-4 synchronous up-counter, using JK FF. STEP 1: Obtain the State transition Diagram

0 3 2 1

Binary

00 11 10 01

OUTPUT TRANSITION QN QN+1 FF INPUT J K

Excitation table

0 0 1 1

0 1 0 1

0 1 X X

X X 1 0

Present State A B 0 0 0 1 1 0 1 1

Next State A B 0 1 1 0 1 1 0 0

Flip-Flop inputs JA K A JB KB 0 X 1 X 1 X X 1 X 0 1 X X 1 X 1

0 0 0 1 X

B

1 1 X

JA = B

0 0 X 1 0 B

1 X 1

KA = B

0 0 1 1 1

1 X X

JB = 1

0 0 X 1 X

1 1 1

KB = 1

B (LSB)

1

A (MSB)

JB Q

CLK

JA Q

CLK

KB Q

KA Q

Synchronous counters

Design a MOD-4 synchronous down-counter, using JK FF?

0 1 2 3

Binary

00 01 10 11

28

Synchronous counters

Obtain the Excitation table. Two JK FF are used.

OUTPUT TRANSITION QN QN+1 FF INPUT J K

0 0 1 1

0 1 0 1

0 1 X X

X X 1 0

Present St. A B

Next St.

A B

JA KA

JB KB

0 0 0 1 1 0

11 00 01

1x 0x x1

29

1x x1 1x

Synchronous counters

Obtain the simplified function using K-Map B B

0 0 1 1 x

1 0 x

JA =A

0 0 X 1 1

1 X 0

KA =B

0 0 1 1 1

1 X X

JB =1

0 0 X 1 X

30

1 1 1

KB =1

Synchronous counters

Draw the circuit diagram JA

CLK

Q A

KA Q JB

CLK

Q B

KB Q

31

The J and K inputs of FF0 are connected to HIGH.

FF1 has its J and K inputs connected to the output of FF0, and the J and K inputs of FF2 are connected to the output of an AND gate that is fed by the outputs of FF0 and FF1. After 3rd clock pulse, both outputs of FF0 and FF1 are HIGH. Positive edge of the 4th clock pulse will cause FF2 to change its state due to the AND gate. Advantage of sync. counters is that there is no cumulative time delay because all flip-flops are triggered in parallel. Maximum operating frequency for this counter will be significantly higher than for the corresponding ripple counter.

SYNCHRONOUS COUNTERS

All flip-flops are clocked simultaneously Mod-16 Synchronous Up-Counter

fmax

ff

34

Mod-6 Up-Counter Using D-flip-flops

Design table

35

MOD-6 UP-COUNTER

K-maps

Final design

36

1. Describe a general sequential circuit in terms of its basic parts and its input and outputs. 2. Develop a state diagram for a given sequence. 3. Develop a next-state table for a specific counter sequence. 4. Create a FF transition table. 5. Use K-map to derive the logic equations. 6. Implement a counter to produce a specified sequence of states.

Registers

Sample data using clock Hold data between clock cycles Computation (and delay) occurs between registers

data in D Q D Q data out

clock

may change

stable

stable

Definition of terms setup time: minimum time before the clocking event by which the input must be stable (Tsu) hold time: minimum time after the clocking event until which the input must remain stable (Th)

Tsu input Th data D Q D Q

clock

there is a timing "window" around the clocking event during which the input must remain stable and unchanged in order to be recognized

Output is a function of arbitrarily many past inputs

Output is a function of the input sampled at three different points in time.

Shift Register

Shift registers are constructed using several flip-flop, connected in such a way to STORE and TRANSFER digital data. Basically, D flip-flop is used. The input data (either 0 or 1) is applied to the D terminal and the data will be stored at Q during positive/negative-edge transition of the clock pulse. Negative edge transition of CLK

D Q

Shift Register

One D FF is used to store 1-bit of data.

Thus, the number of flip-flops used is the same with the number of bit stored.

Shift register mean that the data in each FF can be transferred/ move to other FF upon edge triggering of the clock signal. Four types of data movement in shift register are:

Parallel in / parallel out (PIPO) Serial in / parallel out (SIPO) Serial in / serial out (SISO) Parallel in / serial out (PISO)

Shift Register

Serial

Movement of N-bit data require N number of CLK pulses. Thus, the operation is slow. Only one FF is required to be connected at the output terminal, thus only one wire is required.

Parallel

Require only one CLK pulse to transfer all N-bit of data. Thus, operation is faster than serial. Required N number of connection to the output terminal, which is proportional to the number of bit. Thus, too many connection is required.

Flip-flop configuration for PIPO register.

D3 D2 D1 D0

D Q3

CP

D Q2

CP

D Q1

CP

D Q0

CP

CLK

Q3 Q2 Q1 Q0

CLK D3 D2 1 0 0 1 1 0 1 1 1 0

D1

D0 Q3 Q2 Q1 Q0 0 0

1

0 1 0 1 0

1

0 0 1 1 0

1

0

0

1

1

0

0

0

51

Flip-flop connection for SISO.

1st CLK DIN 2nd CLK 3rd CLK 4th CLK

D Q0

CP

D Q1

CP

D Q2

CP

D Q3

CP

CLK

FF0

FF1

FF2

FF3

Flip-flop connection for PISO.

SHIFT/LOAD D0

D1

D2

D3

D Q0

CLK CP

D Q1

CP

D Q2

CP

D Q3

CP

FF0

FF1

FF2

FF3

CLK D0 D1 0 0 0 1 1 0 1 1 1 0

D2

D3

SHIFT/ LOAD

1

1

1

0

1

0

0

1

1

1

Q3

56

A shift register counter is a shift register whose output being fed back (connected back) to the serial input. This shift register would count the state in a unique sequence! Two types of shift register counter:

The ring counter The Johnson counter

Ring Counter

Q3 Q2 Q1 Q0

0 0 1 0 0 1 0 0

0 0 0 1

1 0 0 0

Ring counters are used to construct One-Hot counters It can be constructed for any desired MOD number A MOD-N ring counter uses N flip-flops connected in the arrangement as shown in fig. a) In general ring-counter will require more flip-flops than a binary counter for the same MOD number

Johnson Counter

Or Twisted-ring counter

Johnson counter constructed exactly like a normal ring counter except that the inverted output of the last flip-flop is fed back to first flip-flop

A0 B 0 0

1

0 0

1

1 0

1

1 1

66

Sequential Circuits

Design steps

Topics Discussed

Characteristic equation for RS, D, JK & T FF. Design/excitation table for RS, D, JK & T FF. 3-bit synchronous counter design using T FF. Design of synchronous counter with the count sequence 0,3,2,4,1,5,7, and repeat using RS FF/T FF. Design of synchronous counter that goes through the sequence 2,6,1,7,5, and repeat using D FF. A FF has 3 inputs S, R, & T. no more than one of these inputs may be 1 at any time. S & R inputs behave as SR FF. T input behave as T FF.

Show a state graph for this FF Write an equation for output Q+ in terms of S, R, T & Q

THANK YOU

- r059210504 Digital Logic DesignUploaded byprakash.paruchuri
- System Design Example 38Uploaded byYellasiri Suresh
- R8A66161DDSPUploaded byElie Sarkis
- HCF4020Uploaded byjnax101
- CountersUploaded byBruce_Jass_3739
- EE221-Lecture-35-37.pptUploaded bysayed Tamir jan
- Water Fare meterUploaded byJeevan Landge Patil
- TNEB Junior Engineer Electrical Model Paper 1Uploaded byRevathy
- كارت الميزانUploaded bykarim karim
- A Systematic Design Procedure for Asynchronous Counters Using El Naga s Transitions TechniqueUploaded byDebranjan Pal
- MBI5025Uploaded byClaudio Vaz
- 74HC193Uploaded byjnax101
- Lab Manual LOGIC DESIGNUploaded bylachuns123
- 6.2CountersUploaded byBharadwaja Pisupati
- Scan Path Design (1)Uploaded byGowtham Hari
- Lcdf3 Chap 07 p1Uploaded byzirfay
- Tez FatmaSaricaPhDThesisUploaded bySüleyman Erkan
- Performance Comparison of Various Clock Gating TechniquesUploaded byInternational Organization of Scientific Research (IOSR)
- Integrated Circuits La manulUploaded byShreerama Samartha G Bhatta
- PRESCALARUploaded bykamesh419kota
- 4.Pic2 Timers FinalUploaded bySreepadam Padam
- 6es7212 1bb23 0xb0 SiemensUploaded byIonut Racaru
- Siemens S7 MPI (Eng)Uploaded byhuseyingulsan
- FPGAUploaded bymrmrama2008
- W02E-EN-01+CJ1W-CTL+OperManualUploaded byyassine123
- LabView PracticeUploaded byVarunSunil
- Analog Inputs and OutputsUploaded byiedmond
- Data SheetUploaded bylgojf
- SwitchUploaded byNidhi Shukla
- b70.6581.0enUploaded byBore Telezar

- Radio CabUploaded bymdhuq1
- 4 Process Control BlockUploaded bymdhuq1
- 2 Compilation StagesUploaded bymdhuq1
- 3 Creating LibrariesUploaded bymdhuq1
- The Linux Kernel Module Programming Guide 2 6Uploaded bybubblesm
- Saha Embedded ProjectsUploaded bymdhuq1
- 1 OS Designs IntroductionUploaded bymdhuq1
- SIMATIC HMI ProTool Configuring Windows-Based SystemsUploaded byTamer Ahmed Salem
- MotivationUploaded bymdhuq1
- Proximity Sensors - Inductive Capacitive PhotoelectricUploaded bymdhuq1
- Sunrom Inr CatalogueUploaded bymdhuq1
- 6 Image Processing ApplicationUploaded bymdhuq1
- nRF51822_datasheetUploaded bymdhuq1
- 5 ELF Run Time LibrariesUploaded bymdhuq1
- breads_prnUploaded byapi-3761732
- Depth First Search AlgUploaded bymdhuq1
- Graphs-IUploaded bymdhuq1
- ALU Based Address Generation for RAMsUploaded bymdhuq1
- ALU Based Address Generation for RAMsUploaded bymdhuq1
- BIST Using Cellular Automata as Test Pattern Generator and Response CompactionUploaded bymdhuq1
- Android SlidesUploaded bymdhuq1
- Slides LinuxkernelUploaded bymdhuq1
- Algorithm TimecomplexityUploaded bymdhuq1
- SlidesUploaded byEduardo Gório
- DSA Full MaterialUploaded bymdhuq1
- Divide and Conquer AlgorithmsUploaded bymdhuq1
- Graphs-IIUploaded bymdhuq1
- Efficient Built-In Self-repair Strategy for Embedded SRAM With Selectable RedundancyUploaded bymdhuq1
- Divide and Conquer-3Uploaded bymdhuq1
- KnapsackUploaded bymdhuq1

- Php + Jsp + Mysql in JbossUploaded byapi-3800032
- Tube DeviceUploaded bya4jabsi
- Computational Evaluation of Emissions for Non-premixed Natural gas CombustionUploaded byijsret
- Perspectives on Healthcare in Latin AmericaUploaded bymarec
- Rfc 1772Uploaded bykirangs
- nnnUploaded byShai Garcia
- HPXUploaded byapi-3700460
- Styrene Production From EthylbenzeneUploaded byChegg Chem
- CCNA 2 Chapter 9 V4.0 AnswersUploaded bySang Niyomkham
- Chicken FootUploaded byJeff Chang
- Chartered Accountants Regulatory Board sanctioned by IAASAUploaded byIntegrity
- Poultry Layer FarmingUploaded bypmeyyappan
- windmillresearchUploaded byapi-254136507
- Improving NPI Process Effectivness Using Lean Thinking (1)Uploaded byjesusmem
- ALM FAQ_11.3Uploaded byRanjani Devrajan
- Eva Ppa KnewUploaded byOzin Trung
- Core Java ConceptsUploaded bySiddharth Singh Chauhan
- NYC Swim Team Medical Form and Swim Application[1]Uploaded bykevin6479
- Mini Project on Tata Docomo - Anoop pUploaded byAnoop Puliyassery
- File 073Uploaded byBinay K Srivastawa
- Propaganda and Hitler EssayUploaded byMariahJohn
- FREE CSEC® English A and Mathematics Past Papers 2002-2008Uploaded byAmanda Mohammed
- Notice of Motion & MemorandumUploaded byAmerican Civil Liberties Union of Southern California
- De Villa vs. CAUploaded byJeremiah Trinidad
- BigPicture161G ManualUploaded byAnderson José Pereira
- Digest_Alitalia vs. IACUploaded byPaul Vincent Cunanan
- Engr.M.N.WAHID_CV.docxUploaded byAl-Ain Homes
- Leaching Gold w HalidesUploaded byEnergyCzar
- Varanasi Mumbai 07sep2014Uploaded bysahulw
- Lng 4 - Operational Integrity 7-3-09-Aacomments-Aug09Uploaded bynangkarak8201