1 / 29

Chapter 9

Chapter 9. Shift Registers By Taweesak Reungpeerakul. Contents. Basic Shift Register Functions Serial In/Serial Out Shift Registers Serial In/Parallel Out Shift Registers Parallel In/Serial Out Shift Registers Parallel Out/Parallel Out Shift Registers Bidirectional Shift Registers

lot
Download Presentation

Chapter 9

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 9 Shift Registers By Taweesak Reungpeerakul 241-208 CH9

  2. Contents • Basic Shift Register Functions • Serial In/Serial Out Shift Registers • Serial In/Parallel Out Shift Registers • Parallel In/Serial Out Shift Registers • Parallel Out/Parallel Out Shift Registers • Bidirectional Shift Registers • Shift Register Counters • Shift Register Applications 241-208 CH9

  3. 9.1 Basic Shift Register Functions • A shift register is an arrangement of flip-flops with important applications in storage and movement of data. Data in Data in Data out Data out Data in Data out Serial in/shift right/serial out Serial in/shift left/serial out Parallel in/serial out Data in Data in Data out Data out Rotate right Rotate left Serial in/parallel out Parallel in/parallel out 241-208 CH9

  4. 1 1 1 1 1 CLK 9.2 Serial-in/Serial out Shift Register • 5-bit serial in/serial out shift register implemented with D flip-flops. 1 241-208 CH9

  5. CLK CLK CLK CLK 9.3 Serial In/Parallel Out Shift Registers • 4-bit serial in/parallel out shift register • For example, assume the binary number 1011 is loaded sequentially, one bit at each clock pulse. 241-208 CH9

  6. The 74HC164A Shift Register • 8-bit serial in/parallel out shift register • One of the two serial data inputs may be used as an active HIGH enable to gate the other input. • If no enable is needed, the other serial input can be connected to Vcc. • The 74HC164A has an active LOW asynchronous clear. • Data is entered on the leading-edge of the clock. CLR CLK A Serial inputs B Q3 Q7 Q0 Q1 Q2 Q4 Q5 Q6 241-208 CH9

  7. B acts as an active HIGH enable for the data on A. As with CMOS devices, unused inputs should always be connected to a logic level; unused outputs should be left open. Waveforms for the 74HC164A CLR A Serial inputs B CLK Q0 Q1 Q2 Q3 Outputs Q4 Q5 Q6 Q7 Clear Clear 241-208 CH9

  8. 9.4 Parallel In/Serial Out Shift Registers • Shift registers can be used to convert parallel data to serial form. D3 D0 D1 D2 SHIFT/LOAD Serial data out Q3 Q0 Q1 Q2 CLK 241-208 CH9

  9. The 74HC165 Shift Register • 8-bit parallel in/serial out shift register • The clock (CLK) and clock inhibit (CLK INH) lines are connected to a common OR gate, so either of these inputs can be used as an active-LOW clock enable with the other as the clock input. • Data is loaded asynchronously when SH/LD is LOW and moved through the register synchronously when SH/LD is HIGH and a rising clock pulse occurs. D0 D1 D2 D3 D4 D5 D6 D7 Q7 SH/LD SER CLK INH Q7 CLK 241-208 CH9

  10. 74HC165 (cont.) 241-208 CH9

  11. MSB A Multisim simulation of the 74165A Q7 is labeled QH in Multisim Pattern is loaded when J1 is LOW 241-208 CH9

  12. MSB Waveform from Simulation Q7 Load Clk 241-208 CH9

  13. 9.5 Parallel In/Parallel Out Shift Registers 241-208 CH9

  14. Sample Timing Diagram 241-208 CH9

  15. 9.6 Bidirectional Shift Register • Bidirectional shift registers can shift the data in either direction using a RIGHT/LEFT input. 241-208 CH9

  16. Example • How will the pattern change if the RIGHT/LEFT control signal is inverted? CLK Shift left RIGHT/LEFT Shift right Serial data in Q0 Q1 Q2 Q3 241-208 CH9

  17. Example (cont.) CLK Shift left RIGHT/LEFT Shift right Shift right Shift left Serial data in Q0 Q1 Q2 Q3 241-208 CH9

  18. Universal Shift Register A universal shift register has both serial and parallel input and output capability. The 74HC194 is an example of a 4-bit bidirectional universal shift register. D0 D1 D2 D3 CLR S0 S1 SR SER SL SER CLK Q0 Q1 Q2 Q3 241-208 CH9

  19. Sample Waveforms 241-208 CH9

  20. 9.7 Shift Register Counters • Shift registers can form useful counters by recirculating a pattern of 0’s and 1’s. Two important shift register counters are the Johnson counter and the ring counter. • The Johnson counter can be made with a series of either D flip-flops or J-K flip-flops. 241-208 CH9

  21. Johnson counter • The Johnson counter is useful when you need a sequence that changes by only one bit at a time but it has a limited number of states (2n, where n = number of stages). The first five counts for a 4-bit Johnson counter that is initially cleared are:CLK Q0Q1Q2Q3 0 1 2 3 4 5 6 7 0 0 0 0 1 0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0 1 1 1 0 0 1 1 0 0 0 1 Question What are the remaining 3 states? 241-208 CH9

  22. Ring Counter • The ring counter can also be implemented with either D flip-flops or J-K flip-flops. • 4-bit ring counters are constructed from a series of D flip-flops and J-K flip-flops. Notice the feedback. Question Describe the disadvantage and advantage of the ring counter? 241-208 CH9

  23. Ring Counter • A common pattern for a ring counter is to load it with a single 1 or a single 0. The waveforms shown here are for an 8-bit ring counter with a single 1. 241-208 CH9

  24. 9.8 Shift Register Applications • Examples: Time Delay, Parallel/Serial Data Converter, and Keyboard Encoder An 8-bit serial in/serial out shift register has a 40 MHz clock. What is the total delay through the register? Example Solution The delay for each clock is 1/40 MHz = 25 ns 25 ns The total delay is 8 x 25 ns =200 ns = 200 ns 241-208 CH9

  25. Start Bit (0) Stop Bits (1) Parallel/Serial Data Converter 241-208 CH9

  26. Parallel/Serial Data Converter (cont.) 241-208 CH9

  27. UART • A UART (Universal Asynchronous Receiver Transmitter) is a serial-to-parallel converter and a parallel to serial converter. • UARTs are commonly used in small systems where one device must communicate with another. Parallel data is converted to asynchronous serial form and transmitted. Data bus CLK CLK Serial data out Serial data in 241-208 CH9

  28. Keyboard Encoder • The keyboard encoder is an example of where a ring counter is used in a small system to encode a key press. • Two 74HC195 shift registers are connected as an 8-bit ring counter preloaded with a single 0. • As the 0 circulate in the ring counter, it “scans” the keyboard looking for any row that has a key closure. • When one is found, a corresponding column line is connected to that row line. 241-208 CH9

More Related