Shift Register with Parallel Load
Earlier in this chapter, we saw how a counter could be set to any value by synchronously loading a set of external inputs directly into the counter flip-flops. We can implement the same function in a shift register, as shown in Figure 9.68.
The circuit is similar to that of the bidirectional shift register in Figure 9.66. The synchronous input of each flip-flop is fed by an AND-OR circuit that directs one of two signals to the flip-flop: the output of the previous flip-flop (shift function) or a parallel input (load function). The circuit is configured such that the shift function is enabled when LOAD 0 and the load function is enabled when LOAD 1.
Figure 9.69 shows a simulation of the parallel-load shift register circuit of Figure 9.68. In the first part of the simulation, the shift function is selected. This is tested by sending a 1 through the circuit in a right-shift pattern. Next, at 400 ns, LOAD goes HIGH, and the parallel input value AH ( 10102) is synchronously loaded into the circuit. The LOAD input goes LOW, thus causing the circuit to revert to the shift function. The data in the register are right-shifted out, followed by 0s. At 640 ns, the value FH ( 11112) is loaded into the circuit, then right-shifted out.
Figure 9.70 shows the logic circuit of a universal shift register. This circuit can implement any combination of serial and parallel inputs and outputs. It can also serially shift data left or right or hold data, depending on the states of S1 and S0, which form a 2-bit function select input.
Each AND-OR circuit acts as a multiplexer to direct one of several possible data sources to the synchronous inputs of each flip-flop. For instance, if we trace the paths through the corresponding AND-OR circuit, we find that the possible sources of data at D2, the synchronous input of the second flip-flop, are Q3 (S1S0 01), P2 (S1S0 11), Q1 (S1S010), and Q2(S1S0 00). These are the inputs required for the right-shift, parallel load, left-shift, and hold functions, respectively. All functions are synchronous, including the parallel load and hold functions.
The hold function is a synchronous no change function, implemented by feeding back the Q output of a flip-flop to its synchronous (D) input. It is necessary to have this function, so that the flip-flops will not synchronously clear when none of the other functions is selected.