L11+Counter - Lecture 11 Counters 1 Counters Count up or...

Info iconThis preview shows pages 1–15. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Lecture 11 Counters
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Counters Count up or count down Count in different format: binary, decimal, one-hot, … Implemented with flip flops – triggered by their clocks Counting the number of the input clock cycles Can be designed as an FSM Counters: – Asynchronous counters – Synchronous counters
Background image of page 2
3 Asynchronous Binary Counter – Ripple Counter Flip flops are not triggered by a global clock signal – Example: up counter with T flip flops Clock Q0 Q2 Q1 Count 0 7 6 5 4 3 2 18 T Q Q Clock T Q Q T Q Q 1 Q 0 Q 1 Q 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Asynchronous Counter – Ripple Counter D Q Q Clock D Q Q D Q Q Q 0 Q 1 Q 2 Example: – Alternative binary ripple counter, with D flip flops, up counter
Background image of page 4
5 Asynchronous Counter – Ripple Counter Problem with asynchronous counters: Delays caused by each stage – timing issues
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Synchronous Binary Counter A sequential logic circuit •A n n -bit binary counter can count in binary from 0 up to 2 n -1 and repeat n n- bit binary counter consists of n flip-flops May be implemented by different type of flip-flops All the flip-flops are synchronized by the same clock – synchronous counter Example: a 3-bit binary counter can count through this sequence Can be implemented as an FSM start
Background image of page 6
7 Synchronous Binary Counter Design • State Table Next State Present State 0 1 1 0 0 1 1 0 Q1 + 1 1 1 1 0 0 0 0 Q2 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 0 1 1 1 Q2 + 0 1 1 1 0 1 0 1 0 1 0 0 Q0 + Q0 Q1
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 Binary Counter with D Flip-Flop D input equations in terms of Qs 0 1 11 10 01 00 1 1 1 1 0 0 0 0 Q2 D2 = Q2Q1’ + Q2Q0’ + Q2’Q1Q0 = Q2(Q1’+Q0’)+Q2’Q1Q0 = Q2(Q1Q0)’+Q2’(Q1Q0) = Q2 (Q1Q0) Q1Q0 D2 0 0 11 10 01 00 1 1 0 1 1 1 0 0 Q2 D1 = Q1’Q0 + Q1Q0’ = Q1 Q0 Q1Q0 D1 0 0 11 10 01 00 1 0 1 1 1 0 1 0 Q2 D0 = Q0’ Q1Q0 D0 The input equation can be generalized as Dn = Qn (Qn-1…Q1Q0)
Background image of page 8
9 Binary Counter with D Flip-Flop • 3-bit binary counter by D FF 3-bit Binary Counter Q1 Q0 clock reset Q2 reset Combinational Logic State Register
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10 Binary Counter with T Flip-Flop • Excitation table of T-FF • Characteristic table and equation of T-FF Toggle No Change 1 0 T Q’ X Q X Q + Q Q’ Q Q + Complement 1 No Change 0 T No Change Toggle Toggle No Change 0 1 1 0 T 1 1 0 1 1 0 0 0 Q + Q Q + = T Q
Background image of page 10
11 Binary Counter with T Flip-Flop • State Table with T input T Input Next State Present State 0 1 0 1 0 1 0 1 Q0 + 0 1 1 0 0 1 1 0 Q1 + 0 1 1 1 1 0 0 0 Q2 + 1 0 1 0 1 0 1 0 T1 1 1 1 1 0 0 0 0 Q2 1 1 1 1 1 0 0 1 1 0 1 0 1 0 0 0 1 0 0 0 T2 1 1 1 1 0 1 1 1 0 1 0 0 T0 Q0 Q1 Intermediate columns
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
12 Binary Counter with T Flip-Flop T input equations in terms of Qs can be found from the state table 1 1 11 10 01 00 0 0 0 1 0 0 0 0 Q2 T2 = Q1Q0 Q1Q0 T2 1 1 11 10 01 00 0 1 0 1 0 1 0 0 Q2 T1 = Q0 Q1Q0 T1 1 1 11 10 01 00 1 1 1 1 1 1 1 0 Q2 T0 = 1 Q1Q0 T0
Background image of page 12
13 Binary Counter with T Flip-Flop • 3-bit binary counter by T FF TFF2 T2 Q2 Q2 clock TFF1 T1 Q1 Q1 Q1 Q0 clear clear clear TFF0 T0 Q0 Q0 clear Q2 “1”
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
14 Binary Counter with JK Flip-Flop • Excitation table of JK-FF • Characteristic table and equation of JK-FF Reset 0 1 0 Hold Q 0 0 1 1 J Q’ 1 Q + Toggle 1 Set 0 Action K 0/0 1/1 0/1 1/0 K 1/0 0/1 1/1 0/0 J X X 1 0 J
Background image of page 14
Image of page 15
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/14/2011 for the course EE 270/370 taught by Professor Gangzheng during the Fall '11 term at Shanghai Jiao Tong University.

Page1 / 43

L11+Counter - Lecture 11 Counters 1 Counters Count up or...

This preview shows document pages 1 - 15. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online