Registers & Counters M. Sachdev Dept. of Electrical & - - PDF document

registers counters
SMART_READER_LITE
LIVE PREVIEW

Registers & Counters M. Sachdev Dept. of Electrical & - - PDF document

ECE 223 Digital Circuits and Systems Registers & Counters M. Sachdev Dept. of Electrical & Computer Engineering University of Waterloo 1 Registers Register is a group of flip-flops n -bit register has n flip-flops Can hold


slide-1
SLIDE 1

1

1

Registers & Counters

  • M. Sachdev
  • Dept. of Electrical & Computer Engineering

University of Waterloo

ECE 223 Digital Circuits and Systems

2

Registers

Register is a group of flip-flops

n-bit register has n flip-flops Can hold n bits of binary data Register may also contain combinational

logic

slide-2
SLIDE 2

2

3

Register with Parallel Load

  • Specific control

signal to load n-bit data

Load =0, register

retains the data

Load = 1, register

accepts new data

4

Shift Register

  • Capable of shifting data in one or both directions

Clock controls the shift operation

  • Figure shows a simple shift register with left to

right data shifting capability

slide-3
SLIDE 3

3

5

Serial Data Transfer

  • Serial mode Data is transferred one bit at a time

6

Serial Addition

  • Parallel adders
  • Faster,
  • cost more logic
  • Serial adders
  • Slower
  • n-bit addition

n clock cycles

  • Less hardware
slide-4
SLIDE 4

4

7

Universal Shift Register

1 1 S1 Mode Control Para load 1 Shift left Shift right No change Operation 1 S0

8

Ripple (Asynchronous) Counter

  • Counts the binary

sequence

Negative edge

triggered

Output of one flip-

flop Clock to the next

Clock skew adds

up

slide-5
SLIDE 5

5

9

BCD Ripple Counter

  • Counter must reset itself

after counting the terminal count

10

Synchronous Counters

  • A common clock is applied to

all flip-flops

Clock skew does not add up Faster than ripple counters

  • Synchronous counters can be

designed using sequential circuit procedure

  • Synchronous binary counter
slide-6
SLIDE 6

6

11

Up-Down Binary Counter

  • Can count up (0000

1111) or down (1111 0000) binary sequence

12

Synchronous BCD Counter

Design a synchronous BCD counter with T flip-flops

1 1 1 1 1 1 1 1 1 1 1 1 1 y Out 1 TQ8 Flip-flop inputs 1 TQ4 1 1 1 TQ2 Next State Present State 1 1 1 1 Q4 1 1 1 1 Q2 1 1 1 1 Q1 1 Q8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Q1 Q8 1 1 1 TQ1 Q4 1 Q2

slide-7
SLIDE 7

7

13

Binary Counter with Parallel Load

14

BCD Counter & Modulo-N Counter

  • Home work - Suppose we want to design a counter

with 1,2,3,4,5,6,7,8,9 sequence (mod-9 counter)?

slide-8
SLIDE 8

8

15

Counter with Unused States

  • A circuit with n flip-flops has 2n states
  • We may have to design a counter with a given sequence (unused

states)

  • Unused states may be treated as don’t care or assigned specific

next state

  • Outside noise may cause the counter to enter unused state
  • Must ensure counter eventually goes to the valid state

Flip-flop Inputs Next State Present State X 1 X 1 JB 1 X X 1 X X KB X 1 X 1 JC X 1 X X 1 X KC 1 1 C X X X 1 JA 1 X X X KA 1 1 1 A 1 1 1 1 1 1 A 1 B 1 B 1 C

16

Counter with Unused States

slide-9
SLIDE 9

9

17

Ring Counter

Capable of generating different timing signals

18

Johnson Counter

  • Number of states of a ring counter can be doubled
slide-10
SLIDE 10

10

19

Book Sections – Registers & Counters

Material is covered in Sections 6.1 – 6.5