ECED2200 – Digital Circuits Counters 24/07/2012 Colin O’Flynn - CC BY-SA 1
General Notes See updates to these slides: www.newae.com/teaching • These slides licensed under ‘Creative Commons Attribution-ShareAlike 3.0 • Unported License’ These slides are not the complete course – they are extended in-class • You will find the following references useful, see • www.newae.com/teaching for more information/links: The book “Bebop to the Boolean Boogie” which is available to Dalhousie Students – Course notes (covers almost everything we will discuss in class) – Various websites such as e.g.: www.play-hookey.com – The book “Contemporary Logic Design”, which was used in previous iterations of the – class and you may have already 24/07/2012 Colin O’Flynn - CC BY-SA 2
DIVIDE-BY N COUNTER 24/07/2012 Colin O’Flynn - CC BY-SA 3
Divide-By N CLK/2 CLK/4 CLK/8 CLK 24/07/2012 Colin O’Flynn - CC BY-SA 4
CLK/4 Divide-By N CLK/2 CLK 24/07/2012 Colin O’Flynn - CC BY-SA 5
Uses of Divide-By-N 32.768 KHz crystal 24/07/2012 Colin O’Flynn - CC BY-SA 6
Uses of Divide-By-N 32.768 KHz crystal 2 15 = 32768 24/07/2012 Colin O’Flynn - CC BY-SA 7
BINARY RIPPLE COUNTER 24/07/2012 Colin O’Flynn - CC BY-SA 8
Binary Ripple Design 24/07/2012 Colin O’Flynn - CC BY-SA 9
Up Counter Q0 Q1 Q3 CLK 24/07/2012 Colin O’Flynn - CC BY-SA 10
Down Counter Q0 Q1 Q3 CLK 24/07/2012 Colin O’Flynn - CC BY-SA 11
SYNCHRONOUS COUNTER 24/07/2012 Colin O’Flynn - CC BY-SA 12
24/07/2012 Colin O’Flynn - CC BY-SA 13
Count Sequence? 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 24/07/2012 Colin O’Flynn - CC BY-SA 14
Synchronous Counter Design 24/07/2012 Colin O’Flynn - CC BY-SA 15
RING COUNTER 24/07/2012 Colin O’Flynn - CC BY-SA 16
Design 24/07/2012 Colin O’Flynn - CC BY-SA 17
DESIGN PROCEDURE FOR ARBITRARY COUNTERS 24/07/2012 Colin O’Flynn - CC BY-SA 18
Design Specs 0 0 0 0 1 0 0 1 1 1 0 1 1 1 0 (0, 2, 3, 5, 6) 24/07/2012 Colin O’Flynn - CC BY-SA 19
Procedure 1. Draw state transition diagram 2. Write state transition table 3. Choose flip-flops & determine required inputs 4. Design logic to realize required inputs 24/07/2012 Colin O’Flynn - CC BY-SA 20
Counter Design Example 0 0 0 0 1 0 0 1 1 1 0 1 1 1 0 (0, 2, 3, 5, 6) 24/07/2012 Colin O’Flynn - CC BY-SA 21
1. State Transition Diagram 110 000 010 101 011 24/07/2012 Colin O’Flynn - CC BY-SA 22
2. State Transition Table A + B + C + A B C 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 24/07/2012 Colin O’Flynn - CC BY-SA 23
2. State Transition Table A + B + C + A B C 0 0 0 0 1 0 0 0 1 ? ? ? 0 1 0 0 1 1 0 1 1 1 0 1 1 0 0 ? ? ? 1 0 1 1 1 0 1 1 0 0 0 0 1 1 1 ? ? ? 24/07/2012 Colin O’Flynn - CC BY-SA 24
3. Select Flip-Flop e.g.: We will use T flip-flops: Q Q+ T 0 0 0 0 1 1 1 0 1 1 1 0 24/07/2012 Colin O’Flynn - CC BY-SA 25
Q Q+ T 0 0 0 3. Figure out FF Inputs 0 1 1 1 0 1 1 1 0 A + B + C + A B C TA TB TC 0 0 0 0 1 0 0 0 1 ? ? ? 0 1 0 0 1 1 0 1 1 1 0 1 1 0 0 ? ? ? 1 0 1 1 1 0 1 1 0 0 0 0 1 1 1 ? ? ? 24/07/2012 Colin O’Flynn - CC BY-SA 26
Q Q+ T 0 0 0 3. Figure out FF Inputs 0 1 1 1 0 1 1 1 0 A + B + C + A B C TA TB TC 0 0 0 0 1 0 0 1 0 0 0 1 ? ? ? ? ? ? 0 1 0 0 1 1 0 0 1 0 1 1 1 0 1 1 1 0 1 0 0 ? ? ? ? ? ? 1 0 1 1 1 0 0 1 1 1 1 0 0 0 0 1 1 0 1 1 1 ? ? ? ? ? ? 24/07/2012 Colin O’Flynn - CC BY-SA 27
4. Generate Required Logic A B C TA 0 0 0 0 0 0 1 ? 0 1 0 0 0 1 1 1 1 0 0 ? 1 0 1 0 1 1 0 1 1 1 1 ? 24/07/2012 Colin O’Flynn - CC BY-SA 28
4. Generate Required Logic A B C TB 0 0 0 1 0 0 1 ? 0 1 0 0 0 1 1 1 1 0 0 ? 1 0 1 1 1 1 0 1 1 1 1 ? 24/07/2012 Colin O’Flynn - CC BY-SA 29
4. Generate Required Logic A B C TC 0 0 0 0 0 0 1 ? 0 1 0 1 0 1 1 0 1 0 0 ? 1 0 1 1 1 1 0 0 1 1 1 ? 24/07/2012 Colin O’Flynn - CC BY-SA 30
4. Implement B A C CLK 24/07/2012 Colin O’Flynn - CC BY-SA 31
4. Implement 24/07/2012 Colin O’Flynn - CC BY-SA 32
Verifying if Counters are Self-Starting A + B + C + A B C TA TB TC 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 24/07/2012 Colin O’Flynn - CC BY-SA 33
State Transition Diagram 110 000 010 101 011 24/07/2012 Colin O’Flynn - CC BY-SA 34
More See class notes for lots of examples of creating counters & verifying if they are self-starting or not 24/07/2012 Colin O’Flynn - CC BY-SA 35
Recommend
More recommend