loading

This circuit takes the input of the shift register and outputs the binary representation to 4 LEDs and a 7-segment display. It incorporates a 4-bit bidirectional shift register, BCD to 7-segment display driver, a 7-segment common anode display, a line buffer, several LEDs for checking outputs, several switches, several resistors, a capacitor and a diode for the switch debouncing for the clock signal.

Items include:

· TI 4-Bit Bidirectional Shift Register (SN74LS194AN)

· TI BCD-to-Seven Segment Driver (SN74LS47N)

· TI Bus Buffer (SN74HCT125N)

· Common Anode 7-Segment Display (SA56-51PBWA/A)

· Diode (N4148)

· 1μF capacitor

· 2-Toggle switches and 1-momentary switch

· 11-220Ω resistors, 2-10kΩ resistors

· 4 red LEDs

· Generic through-hole wires and breadboard

Step 1: Shift Register

A shift register is a type of storage register that holds the value of some binary sequence. This particular register can be shifted left or right, which makes it particularly useful for binary multiplication and division. For this example I will only being shifting the register to the right, as left shifting with the debounced switch for the clock signal was not giving a proper single clock edge to trigger on. Because of limited space on my breadboard, I used wires directly wired to HIGH or LOW to load the register initially, the diagrams show switches however, both work just as well. This register requires that CLR be wired to HIGH to prevent clearing the value stored in it. SR SER stands for “shift-right serial input”, it’s the value going to be filled on the left side when it is shifted right. SL SER means the same thing but the other way. I wired both to LOW to load zeros as it shifts. A, B, C, and D are used to load the values into the register. QA, QB, QC, and QD are the parallel output of the register. S1 and S2 change the mode of the register. When both are HIGH, the values at A, B, C and D are loaded. When S0 is HIGH and S1 is LOW it is set to shift right with each rising edge of the clock. Those are the only two modes I used for this design, all other modes and setting are shown in the manufacturer’s datasheet.

Step 2: Debounced Button

For this circuit I used a debounced button instead of a clock. If you want to you can design a 555 timer to get a low enough clock signal instead.

Switches and buttons often have issues when using them with ICs because of something called bouncing. Bouncing occurs when a button is closed and the contacts literally “bounce”. This is really irritating, especially with clock signals because an IC will often go through several clock cycles with one button press. Your circuit might be perfectly fine, we just can’t see what's happening that fast!

I used the circuit shown on The Lab Book Pages with an adaptation of my own to debounce the switch. Using the Inverter with Schmitt-Trigger that was shown on their website did not result in a usable signal. Instead I used a simple line buffer to fortify the signal. This is a HUGE improvement on using a bare switch, but it still has issues with going through 2 or 3 clock cycles every few button presses, so it is far from perfect.

http://www.labbookpages.co.uk/electronics/debounce.html

Step 3: 7-Segment Display Driver

Driver:

The TI 74LS47 display driver takes a BCD input and decodes it to the 7 segments of a 7-segment display. A, B, C and D are use as the BCD input and a, b, c, d, e, f, and g are the 7-segment outputs. For this circuit I want to disable any auxiliary functions, so I wired the LT, BI/RBO and RBI inputs to HIGH (being they are inverted inputs).

Display:

The display is a common-anode, which means that all LEDs within the display share the same HIGH voltage (or in this case two). Each LED then has its own current path out from the lettered outputs. Resistors must be used either between the HIGH voltage and pins 3 and 8 (or which ever pins are the VCC input on your display) or between each output to GROUND. I chose to use a 220Ω resistor between each output to GROUND. This ensures that each segment will have the same brightness no matter how many of them are on.

In addition, the IC is designed for common-anode displays. So it doesn’t actually supply current to the display. When a segment needs to be illuminated the IC it will sink current through the proper segments while blocking current through those that don’t need to be turned on. The reason for this is due to the fact that ICs have an easier time sinking current than supplying it.

Step 4: Buttons

The buttons I used to change modes for the register are soldered onto a generic circuit board with header pins. I highly recommend doing this because buttons and switches (at least the ones I use) constantly pop off breadboards. It also reduces the wear and tear on their pins. Just solder a sturdy header pin next to it and solder a connection underneath!

Step 5: Conclusion

Again a slow enough clock signal could be used instead of the debounced button. It was interesting to notice that when I wired this circuit the left shifting mode made the button jump through at least 2 clock cycles per button press, and it was never consistent. The right shifting however was very consistent, only shifting once per clock cycle most of the time. I have an attached MultiSim simulation attached as well.

This is my first instructable so let me know what you think!

<p>May I suggest SP inplace of DP switches with resistors to GND, this will avoid a third state during toggle.</p>
<p>This is great information! Thanks for sharing! </p>

About This Instructable

1,319views

28favorites

License:

Bio: I'm a computer engineering student at Fresno State. I work part-time as a math and science tutor. I also like to work with electronics ... More »
More by calvinjarrod:Shift Register With 7 Segment Display 
Add instructable to: