|MadSci Network: Computer Science|
Hi Jim, Very simply stated, a shift register is used to store data temporarily. It has two parts: a serial input and a parallel output. If you think of an 8- bit shift register, you can think of the serial input as a tube open at the bottom and open at the top. The tube can hold only 8 tennis balls (bits) at a time. Some of the balls are white (bit on); others are black (bit off). As you start pushing balls into the bottom of the tube, the ones above it will move up, eventually filling the tube. After that, adding more balls will cause the ones at the top to fall out. Typically, the input comes from a counter such as the CMOS 4518 or 4520. Let's say we want to decode the serial data coming from a data line. The data is usually preceded by a start bit. This bit signals (enables) the shift register to start moving following bits up the tube. once the tube is filled, the stop bit signals the register that it is to stop the process (turning off the enable pin of the register). The register now contains 8 bits of information; some on and some off, representing a single character of data. A second signal from the microprocessor or some other timing device, causes the bits to be shifted into the second half of the register, the buffer. Once there, the data may be read by the microprocessor, leaving the first half, the shift portion of the register, to start on the next series of data bits. Timing is everything. If the "read" signal from the microprocessor is received too soon, the data may have not yet been shifted into the buffer, and the data is invalid. Also, if the "enable" pulse comes too soon, the new data will start pushing the valid bits out the top before it has been transferred to the buffer, again resulting in invalid data. Finally, there are 4 types of shift registers: serial-input parallel output, serial input-serial output, parallel input-parallel output, and parallel-input parallel output. Some shift registers are called "universal" shift registers. They can be used for any of the four shift functions depending on how they are implemented. I hope this answers your question. If you need any further clarification, you may contact me directly at: KarlKolbus@ameritech.net Your not-so-mad scientist, Karl
Try the links in the MadSci Library for more information on Computer Science.