16
Aug 26, 2022 Lecturer Name [email protected] Contact Number IT2001PA Engineering Essentials (2/2) Chapter 13 - Counters

Ee2 chapter13 counters

  • Upload
    ck-yang

  • View
    323

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Ee2 chapter13 counters

Apr 12, 2023

Lecturer Name [email protected]

Contact Number

IT2001PAEngineering Essentials (2/2)

Chapter 13 - Counters

Page 2: Ee2 chapter13 counters

2

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

Lesson Objectives

Upon completion of this topic, you should be able to: Sketch the output waveform of a basic 4 bit up/down

counter.

Page 3: Ee2 chapter13 counters

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

Specific Objectives

Students should be able to : Identify 2 different types of counter :

Ripple up counter and Ripple down counter

Describe the operation of a 4 bit asynchronous ripple up counter with the aid of a waveform diagram.

Construct the truth table. State the maximum number of count. Describe the operation of a basic 4 bit asynchronous ripple down

counter with the aid of a waveform diagram.

Page 4: Ee2 chapter13 counters

4

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

Binary counting sequence

Used to count the

• number of binary pulses applied

Example:

recycles

Decimal : 0 1 2 3 0

Binary : 00 01 10 11 00

Page 5: Ee2 chapter13 counters

5

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

Calculation of maximum count value of a counter

Let N = number of flip-flops

M = maximum count reached before a counter recycles.

For N number of flip-flops,

• 2 counting states.

Maximum count = 2 - 1

N

N

Page 6: Ee2 chapter13 counters

6

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

Example:

Determine the maximum count for a counter using

• 4 flip-flops

Solution:

N = 4

Maximum count,

M = 2 - 1

= 2 - 1 =

• 5 flip-flops

Solution:

N = 5

Maximum count,

M = 2 - 1

= 2 - 1 =

N

4

N

5

Page 7: Ee2 chapter13 counters

7

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

4-Bit Asynchronous Up Counter

J

K

A

A

CLK

J

K

B

B

CLK

J

K

C

C

CLK

J

K

D

D

CLK

*

*

* All J and K inputs assumed to be 1.

Page 8: Ee2 chapter13 counters

8

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

Truth TableD C B A Number of clock pulses

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 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 0 0 0

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (recycles)

Page 9: Ee2 chapter13 counters

9

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

Counter waveforms

CLOCK

A

B

C

D

Counter-waveforms showing frequency division by 2 for each FF.

Page 10: Ee2 chapter13 counters

10

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

Ripple Up Counter

All counter is first of all cleared to zeroes by

• activating the CLEAR inputs.

Then the counter is clocked to count up.

J

K

A

A

CLK

J

K

B

B

CLK

*

*

* All J and K inputs assumed to be 1.

AB

CLKCLKCLK

To clear FFs to “0”

Page 11: Ee2 chapter13 counters

11

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

Ripple Down Counter

All counter is first of all presetted to ones by

• activating the PRESET inputs.

Then the counter is clocked to count down.

J

K

A

A

CLK

J

K

B

B

CLK

*

*

* All J and K inputs assumed to be 1.

ABPSPS PS

To preset FFs to “1”

Page 12: Ee2 chapter13 counters

12

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

Ripple Down Counter

Ripple Up Counter

BA counts up from 00 --> 01 --> 10 --> 11 --> 00recycles

BA counts down from 11--> 10 --> 01 --> 00 -->11recycles

Page 13: Ee2 chapter13 counters

13

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

3-Bit Asynchronous Down Counter

J

K

A

A

CLK

J

K

B

B

CLK

J

K

C

C

CLK

*

*

* All J and K inputs assumed to be 1.

Page 14: Ee2 chapter13 counters

14

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

Truth Table

C B A Number of clock pulses

1 1 1 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0 1 1 1 1 1 0 1 0 1 1 0 0 0 1 1

0 1 2 3 4 5 6

7 8 (recycles) 9 10

11 12

Page 15: Ee2 chapter13 counters

15

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

Counter Waveforms

CLOCK

A

B

C

Counter-waveforms showing frequency division by 2 for each FF.

1

1

1

0

1

0

1 1 1

0 0

1 1 1 1 1 1 1

0 0 00 0 0

1 11 1 1 1

0 0 0 00 0

0 0 0 0 0 0 0 0

1 1 1 1

Page 16: Ee2 chapter13 counters

16

Chapter 13 - Counters

IT2001PA Engineering Essentials (2/2)

Next Lesson