last mod: march 2014 paul r. godin shift registers registers 1.1
TRANSCRIPT
![Page 1: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/1.jpg)
Last Mod: March 2014 Paul R. Godin
Shift Registers
Registers 1.1
![Page 2: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/2.jpg)
Shift Register Applications
Shift Registers are an important Flip-Flop configuration with a wide range of applications, including: Computer and Data Communications (Serial and Parallel) Converting between serial and parallel applications Multi-bit number storage Sequencing (enabling system) Basic arithmetic such as scaling (a serial shift to the left or
right will change the value of a binary number a power of 2, like shifting a decimal point for a base-10 number)
Logical operations Delay circuits State machines Parity circuits …other applications
Registers 1.2
![Page 3: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/3.jpg)
Parallel versus Serial
Serial communications: provides a binary number as a sequence of binary digits, one after another, through one data line.
Parallel communications: provides a binary number as binary digits through multiple data lines at the same time.
Registers 1.3
![Page 4: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/4.jpg)
Shift Registers
Shift Registers are devices that store and move data bits in serial (to the left or the right),
..or in parallel,
..or a combination of serial and parallel.
Registers 1.4
![Page 5: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/5.jpg)
Configuration
In Shift Registers, the binary digit transfers (shifts) from the output of one flip-flop to the input of the next individual Flip-Flop at every clock edge.
Once the binary digits are shifted in, the individual Flip-Flops will each retain a bit, and the whole configuration will retain a binary number.
Registers 1.5
![Page 6: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/6.jpg)
Construction
Shift registers are constructed from flip-flops due to their characteristics: Edge-triggered devices Output state retention
Each Flip-Flop in a shift register can retain one binary digit. For instance, if a 5-bit binary number needs to be stored and
shifted, 5 flip-flops are required.
Each binary digit transfer operation requires a clock edge.
Asynchronous inputs are useful in resetting the whole configuration.
Registers 1.6
![Page 7: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/7.jpg)
Shift Register Construction
Shift registers are comprised of D Flip-Flops that share a common clock input.
D Q
Q
D Q
Q
D Q
Q
Registers 1.7
![Page 8: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/8.jpg)
Combinations of Data Transfer Methods
SISO: Serial In, Serial Out
SIPO: Serial In, Parallel Out
PISO: Parallel In, Serial Out
PIPO: Parallel In, Parallel Out
How many clock edges are required for each operation?
10110 10110
10110
10110
10110
1011010110
10110
Registers 1.8
![Page 9: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/9.jpg)
SISO Flip-Flop Shift Register
a Serial In Serial Out shift register has a single input and a single output
D Q
Q
D Q
Q
D Q
Q
Input Output
Registers 1.9
![Page 10: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/10.jpg)
SIPO Flip-Flop Shift Register
a Serial In Parallel Out shift register has a single input and access to all outputs
D Q
Q
D Q
Q
D Q
Q
Input
Output Output Output
Registers 1.10
![Page 11: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/11.jpg)
PISO Flip-Flop Shift Register
a Parallel In Serial Out shift register requires additional gates. In this example the parallel input must revert to logic low; in other configurations steering gates are used to switch between loading and shifting operations.
Input
D Q
Q
InputOutput
Input
D Q
Q
D Q
Q
Registers 1.11
![Page 12: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/12.jpg)
PIPO Flip-Flop Shift Register
a Parallel In Parallel Out register has the simplest configuration. It represents a memory device.
D Q
Q
Input
Output
D Q
Q
Output
D Q
Q
Output
Input Input
Registers 1.12
![Page 13: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/13.jpg)
Universal Shift Registers
Universal Shift Registers can be configured to operate in a variety of modes.
Internally use steering gates to configure: SIPO, PIPO, SISO, PISO operations Shift Direction Parallel input (load) Hold
Refer to the manufacturer specification sheets for more information.
Registers 1.13
![Page 14: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/14.jpg)
Registers 1.14
Universal Shift Registers
Look up the 74LS194 and describe its function by looking at the schematic. Fill in the table.
S0 S1 Mode
0 0
0 1
1 0
1 1
In-class exercise14
![Page 15: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/15.jpg)
Application: Parallel transferring the contents of a Register to another register.
Describe where this circuit combination may be used.
Registers 1.15
![Page 16: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/16.jpg)
JK Shift Registers
J-K Shift registers are seldom used, as two inputs (J,K) are required to load the first flip-flop (note all others receive only set or reset inputs).
Input OutputJ Q
K Q
J Q
K Q
J Q
K QInput
Registers 1.16
![Page 17: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/17.jpg)
Ring Counter
A ring counter takes the serial output of the last Flip-Flop of a shift register and provides it to the serial input of the first Flip-Flop.
Ring Counters are also known as re-circulating shift registers.
The display characteristics will be familiar…
Registers 1.17
![Page 18: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/18.jpg)
Ring Counter
In Class: Build a ring counter using electronics simulation tools
Registers 1.18
![Page 19: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/19.jpg)
Self-Starting or Load on Power-up
There are several ways of loading values into a ring counter on power-up: RC circuit Logic detection (similar to truncating a counter)
Registers 1.19
In Class: Add a self-starting circuit using electronics simulation tools (note: the simulation software may not realistically simulate start-up.
![Page 20: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/20.jpg)
Johnson Counter
A Johnson Counter re-circulates the last flip-flop Q (inverted) output back to the input of the first Flip-Flop. It doesn’t require an initialization value, and will provide a predictable output state sequence.
Registers 1.20
![Page 21: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/21.jpg)
Re-Circulating Counters
Johnson Counter00001000110011101111011100110001
A 4-bit Johnson counter has a modulus of 8, meaning there are 8 unique output states.
8 unique states
Registers 1.21
What is the modulus of a 5-bit counter? 6-bit counter?
![Page 22: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/22.jpg)
State Diagram
A State Diagram is used to describe the sequence of output states of a circuit.
The state diagram for the previous Johnson counter looks like this:
1000
1100
1110
1111
0111
0011
0001
0000
Registers 1.22
![Page 23: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/23.jpg)
Ring Counter Application
Some devices require scanning. Scanning is when devices are enabled one at a time to: check their status, or enable their output
An example of scanning is for keyboard inputs. The ring counter enables each of the keys in turn to check on their state.
Registers 1.23
![Page 24: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/24.jpg)
Ring Counter used to sequence a device
Registers 1.24
Ring Counter
Decoder
Display Commons
![Page 25: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/25.jpg)
Registers 1.25
State Recognition
One application of registers is to recognize a specific binary number. Sequences of bits are loaded in series into a register. External detection gates will identify if the value matches a predetermined value:
What value will this circuit detect?Will this work with a Johnson counter?
25
![Page 26: Last Mod: March 2014 Paul R. Godin Shift Registers Registers 1.1](https://reader030.vdocuments.net/reader030/viewer/2022032803/56649e3b5503460f94b2d819/html5/thumbnails/26.jpg)
Registers 1.26
Comparison of two values
Values stored in shift registers can be compared by using the following circuit :
What is the output if both binary inputs are the same?