Digital Logic Design · Lab 13 · read before the labAll labsGo to the lab →

Registers: words of flip flops.

A register stores a binary word, one flip flop per bit. A shift register can also move the word sideways, one place per clock pulse.

01

A register

A group of flip flops sharing one clock. Each flip flop (a cell) stores one bit of the word. D flip flops are the natural choice: at the clock edge each one stores the bit on its D input.

02

Shifting

QA=0QB=0QC=0QD (out)=0

0 pulses. Each rising edge copies Din into A, A into B, B into C and C into D at the same moment. Read A to D together (parallel out) or only D (serial out, four pulses late).

03

Four kinds

SISO

Serial in, serial out: one bit enters per pulse, the word leaves at the far end n pulses later (a delay line).

SIPO

Serial in, parallel out: after n pulses the whole word is on the outputs (serial to parallel).

PIPO

Parallel in, parallel out: all bits stored at one clock edge (a plain storage register).

PISO

Parallel in, serial out: load the word at once, then shift it out one bit per pulse (parallel to serial).

04

The 74166

741668-bit parallel-in serial-out shift register1SER2A3B4C5D6CLK INH7CLK8GND9CLR10E11F12G13QH14H15SH/LD16VCC

Hold the chip with its notch on the left. Pin 1 is at the bottom left, the pins count up to the right, then continue along the top from right to left. Most 14 pin chips have VCC on pin 14 and GND on pin 7, but not all: check every new chip.

SH/LD (pin 15) LOW: the next clock edge loads A to H. HIGH: each clock edge shifts one place towards QH. CLK INH (pin 6) must be LOW to let the clock through. CLR (pin 9) LOW clears everything; left open it reads HIGH.

05

Circular shift

Wire the serial output back to the serial input and nothing is lost: after eight shifts the 74166 holds the same word again. A ring of four D flip flops with one 1 in it makes a ring counter.

06

Check yourself

Q1A 4 bit SISO register is empty. You enter 1 then three 0s. When does the 1 reach the output?

At the fourth clock pulse.

Q2In the serial-in parallel-out task, why disconnect the clock after the fourth pulse?

So no more pulses shift the word: the LEDs then hold it.

Q3On the 74166, what does SH/LD LOW do?

The next clock edge loads A to H in parallel.

Q4What must CLK INH be for the 74166 to shift?

LOW (to GND).

I am ready, go to the lab →