digital fundamentals -...

79
Digital Fundamentals 1 Counters

Upload: vocong

Post on 06-Feb-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Digital Fundamentals

1

Counters

Page 2: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Objectives

•Describe the difference between an asynchronous and a synchronous counter

•Analyze counter timing diagrams

•Analyze counter circuits

•Explain how propagation delays affect the operation of a counter

•Determine the modulus of a counter

•Modify the modulus of a counter

•Recognize the difference between a 4-bit binary counter and a decade counter

•Use an up/down counter to generate forward and reverse binary sequences

•Determine the sequence of a counter

2

•Use IC counters in various applications

•Design a counter that will have any specified sequence of states

•Use cascaded counters to achieve a higher modulus

•Use logic gates to decode any given state of a counter

•Eliminate glitches in counter decoding

•Explain how a digital clock operates

•Troubleshoot counters for various types of faults

•Interpret counter logic symbols that use dependency notation

•Discuss mode selection in an SPLD

•Apply a counter in a system application

Page 3: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--1 A 2-bit asynchronous binary counter. Open file F09-01 to verify operation.

Figure 9--2 Timing diagram for the counter of Figure 9-1. As in previous chapters, output waveforms are shown in green.

3Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Figure 9--2 Timing diagram for the counter of Figure 9-1. As in previous chapters, output waveforms are shown in green.

Page 4: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--3 Three-bit asynchronous binary counter and its timing diagram for one cycle. Open file F09-03 to verify operation.

4Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 5: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--4 Propagation delays in a 3-bit asynchronous (ripple-clocked) binary counter.

5Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 6: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9-5 Example 9-1: Four-bit asynchronous binary counter and its timing diagram. Open file F09-05 and verify the operation.Propagation delay is 10 ns for the flip-flops. Draw the timing diagram and determine the total propagation delay and the maximumclock frequency at which the counter can be operated.

6Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

nsnst totp 40104)( =⋅=

MHznst

ftotp

2540

11

)(max ===

Page 7: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--6 An asynchronously clocked decade counter with asynchronous recycling.

7Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 8: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9-7 Example 9-2: Asynchronously clocked modulus-12 counter with asynchronous recycling. 000000010010001101000101011001111000

8Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

10001001101010110000etc.

1100

Page 9: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--8 The 74LS93A 4-bit asynchronous binary counter logic diagram. (Pin numbers are in parentheses, and all J and K inputs are internally connected HIGH.)

9Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Figure 9--9 Two configurations of the 74LS93A asynchronous counter. (The qualifying label, CTR DIV n, indicates a counter with nstates.)

Page 10: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9-10 Example 9-3: Show how the 74LS93A can be connected as a modulus-12 counter.

10Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 11: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--11 A 2-bit synchronous binary counter.

11Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 12: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--12 Timing details for the 2-bit synchronous counter operation (the propagation delays of both flip-flops are assumed to be equal).

12Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 13: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--13 Timing diagram for the counter of Figure 9-11. NO EXTRA DELAYS!

13Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 14: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--14 A 3-bit synchronous binary counter. Open file F09-14 to verify the operation.

000001010011100101

14Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Figure 9--15 Timing diagram for the counter of Figure 9-14. 110111000

Page 15: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--16 A 4-bit synchronous binary counter and timing diagram. Points where the AND gate outputs are HIGH are indicated by the shaded areas.

15Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 16: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--17 A synchronous BCD decade counter. Open file F09-17 to verify operation.

16Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 17: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--19 The 74HC163 4-bit synchronous binary counter. (The qualifying label CTR DIV 16 indicates a counter with sixteen states.)

17Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 18: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

18

Page 19: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

19

Page 20: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--20 Timing example for a 74HC163.

20Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 21: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--21 The 74LS160 synchronous BCD decade counter. (The qualifying label CTR DIV 10 indicates a counter with ten states.)

21Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 22: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

22

Page 23: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--22 Timing example for a 74LS160.

23Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 24: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--23 A basic 3-bit up/down synchronous counter. Open file F09-23 to verify operation.

24Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 25: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9-24 Example 9-4: Shot the timing diagram in the following situation: Q3 2 1 00 0 0 00 0 0 10 0 1 00 1 0 00 0 1 10 0 1 00 0 0 1

UP

DOWN

25Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

0 0 0 10 0 0 01 1 1 10 0 0 00 0 0 10 0 1 00 0 0 10 0 0 0

DOWN

UP

DOWN

Page 26: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--25 The 74HC190 up/down synchronous decade counter.

26Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 27: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

27

Page 28: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--26 Timing example for a 74HC190.

28Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 29: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--27 General clocked sequential circuit.

Design of synchronous counters

29Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 30: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--28 State diagram for a 3-bit Gray code counter.

STEP 1

30Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 31: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

STEP 2

Next-State table

Q Q2 1 0 2 1 00 0 0 0 0 10 0 1 0 1 10 1 1 0 1 00 1 0 1 1 0

Presentstate

Nextstate

31

0 1 0 1 1 01 1 0 1 1 11 1 1 1 0 11 0 1 1 0 01 0 0 0 0 0

Page 32: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

STEP 3

Flip-flop transition table

QN N+10 → 00 → 1

QJ K0 X1 X

Outputtransitions

Flip-flopinputs

32

0 → 11 → 01 → 1

1 XX 1X 0

QN: present stateN+1: next stateX: don’t care

Page 33: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--29 Examples of the mapping procedure for the counter sequence represented in Table 9-7 and Table 9-8.

STEP 4

33Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 34: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

STEP 5From the K-maps:

021

1212120

1212120

QQK

QQJ

QQQQQQK

QQQQQQJ

==

⊕=+=

⊕=+=

34

012

012

021

QQK

QQJ

QQK

=

=

=

Page 35: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--30 Karnaugh maps for present-state J and K inputs.

35Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 36: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--31 Three-bit Gray code counter. Open file F09-31 to verify operation.

STEP 6

36Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 37: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Summary of steps:1. Specify the counter sequence and draw a state diagram.

2. Derive a next-state table from the state diagram.

3. Develop a transition table showing the flip-flop inputs requiredfor each transition. The transition table is always the same fora given type of flip-flop.

37

4. Transfer the J and K states from the transition table to K-maps.There is a K-map for each input of each flip-flop.

5. Group the K-map cells to generate and derive the logic express-ion for each flip-flop input.

6. Implement the expressions with combinational logic, and comb-ine with the flip-flops to create the counter.

Page 38: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9-32 Example 9-5: Design a counter with following state diagram:

Present Next

Step 1

38Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Q Q2 1 0 2 1 00 0 1 0 1 00 1 0 1 0 11 0 1 1 1 11 1 1 0 0 1

Presentstate

Nextstate

Step 2

Step 3

Page 39: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--33 Step 4

39Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 40: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Step 5

122

11

200

1

,1

QKJ

KJ

QKJ

====

==

40

Page 41: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--34

Step 6

41Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 42: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9-35 Example 9-6: Develop a synchronous 3-bit u/d counter with a Gray code sequence.

STEP 1 STEP 2

42

STEP 3

Page 43: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--36 J and K maps for Table 9-11. The UP/DOWN control input, Y, is treated as a fourth variable.

STEP 4

43Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 44: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

STEP 5

44

Page 45: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--37 Three-bit up/down Gray code counter.

STEP 6

45

Page 46: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--38 Two cascaded counters (all J and K inputs are HIGH).

CASCADED COUNTERS

46

Figure 9--39 Timing diagram for the cascaded counter configuration of Figure 9-38.

Page 47: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--40 A modulus-100 counter using two cascaded decade counters.

47Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 48: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--41 Three cascaded decade counters forming a divide-by-1000 frequency divider with intermediate divide- by-10 and divide-by-100 outputs.

48Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 49: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9-42 Example 9: Determine the overall modulus in the following cascaded counters

Solution

49Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Solution8x12x16 = 1536

10x4x7x5 = 1400

Page 50: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9-43 Example 9-8: Use 74LS160 counters to obtain a 10 kHz waveform from a 1 MHz clock.Solution: A divide-by-100 counter using two 74LS160 decade counters.

50Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 51: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--44 A divide-by-40,000 counter using 74HC161 4-bit binary counters. Note that each of the parallel data inputs is shown in binary order (the right-most bit D0 is the LSB in each counter).

51Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 52: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--45 Decoding of state 6 (110). Open file F09-45 to verify operation.

Counter decoding

52Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 53: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9-46 Example 9-9: Implement the decoding of binary state 2 and binary state 7 of a 3-bit synchronous counter. A 3-bit counter with active-HIGH decoding of count 2 and count 7. Open file F09-46 to verify operation.

53

Page 54: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9-47 A basic decade (BCD) counter and decoder.

Decoding glitchesFigure 9--48 Outputs with glitches from the decoder in Figure 9-47.Glitch widths are exaggerated for illustration and are usually only afew nanoseconds wide.

54Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 55: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--49 The basic decade counter and decoder with strobing to eliminate glitches.

Figure 9--50 Strobed decoder outputs for the circuit of Figure 9-49.

55Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 56: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--51 Simplified logic diagram for a 12-hour digital clock. Logic details using specific devices are shown in Figures 9-52 and 9-53.

Application examples

56Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 57: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--52 Logic diagram of typical divide-by-60 counter using 74LS160A synchronous decade counters. Note that the outputs are in binary order (the right-most bit is the LSB).

57Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 58: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--53 Logic diagram for hours counter and decoders. Note that on the counter inputs and outputs, the right-most bit is the LSB.

58Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 59: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--54 Functional block diagram for parking garage control.

59Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Figure 9--55 Logic diagram for modulus-100 up/down counter for automobile parking control.

Page 60: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--56 Parallel-to-serial data conversion logic.Figure 9--57 Example of parallel-to-serial conversion timing for thecircuit in Figure 9-56.

60Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 61: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--58 Example of a failure that affects following counters in a cascaded arrangement.

Troubleshooting

61Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 62: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--59 Example of a failure in a cascaded counter with a truncated sequence.

62Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 63: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9-60 Example 9-10: Frequency measurements are made on the truncated counter (see below) as indicated. Determineif the counter is working properly, and if not, isolate the fault.

Solution:Check frequency at TC 4 ...

63Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 64: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9-61 Example 9-11: Determine if there is a problem with the counter

64Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 65: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Hands on tip

When observing the time relationship between two digital signals with a dual-trace oscillo-scope, trigger the scope with the slower signal (it has fewer possible trigger points!).Hence do not use clock signals for triggering (they are usually the fastest signal in the system).

65

Page 66: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--62 The 74HC163 4-bit synchronous counter.

Logic symbols with dependency notation

66Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 67: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--63 Combinational mode for active-LOW and active-HIGH outputs. The red lines show the logic paths in each case.

67Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 68: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--64 Registered mode for active-LOW and active-HIGH outputs. The red lines show the logic paths in each case.

68Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 69: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--65

69Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 70: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--66 Traffic light control system block diagram and light sequence.

70Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 71: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--67 Block diagram of the sequential logic.

71Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 72: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--68 State diagram showing the 2-bit Gray code sequence.

72Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 73: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--69 Sequential logic.

73Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 74: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

74

Page 75: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--70

75Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 76: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--71

76Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 77: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--72

77Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 78: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--73 Comparison of asynchronous and synchronous counters.

78Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 79: Digital Fundamentals - electronics.physics.helsinki.fielectronics.physics.helsinki.fi/wp-content/uploads/2012/01/luento9.pdf · Summary of steps: 1. Specify the counter sequence and

Figure 9--74 Note that the labels (names of inputs and outputs) are consistent with text but may differ from the particular manufacturer’s data book you are using. The devices shown are functionally the same and pin compatible with the same device types in other available TTL and CMOS IC families.

79Thomas L. FloydDigital Fundamentals, 8e

Copyright ©2003 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.