This is a display where entering a binary number with four DIP switches shows a decimal digit on a seven-segment display. With no clock or counter, the circuit is simple, and it is a good exercise for seeing "binary to decimal conversion" and "the role of a decoder" with your own eyes. This article covers how to connect a 74LS47 decoder, a common-anode FND-507, and a 4-position DIP switch, the display for each switch position, and what is shown for inputs of 10 and above.
What you will build
- Make a binary number for 0 to 9 with a 4-position DIP switch.
- The 74LS47 converts the binary number (BCD) to seven-segment signals.
- A common-anode FND-507 displays the digit.
Parts list
| Part | Qty | Value |
|---|---|---|
| 74LS47 | 1 | 16-pin socket |
| FND-507 | 1 | Common anode |
| DIP switch | 1 | 4-position |
| Pull-up resistors | 4 | 10 kΩ |
| Segment resistors | 7 | 330 Ω |
| Decoupling capacitor | 1 | 100 nF |
| 5 V supply | 1 | 4.75–5.25 V for the 74LS |
Connections
DIP switch and inputs
Connect each switch between a 74LS47 input pin and GND, and attach a 10 kΩ pull-up resistor from each input pin to +5V (Pull-Up and Pull-Down Resistors). When a switch is ON (closed) the input is Low (0), and when OFF (open) the pull-up makes it High (1).
| Switch | 74LS47 input | Place value |
|---|---|---|
| S1 | A (pin 7) | 1 |
| S2 | B (pin 1) | 2 |
| S3 | C (pin 2) | 4 |
| S4 | D (pin 6) | 8 |
74LS47 control pins
| Pin | Name | Connection | Meaning |
|---|---|---|---|
| 3 | LT | +5V | Lamp test off |
| 4 | BI/RBO | +5V | Blanking input off |
| 5 | RBI | +5V | Leading-zero blanking off |
| 16 / 8 | VCC / GND | +5V / GND | Power |
Outputs and the FND
Connect the a to g outputs of the 74LS47 (pins 13, 12, 11, 10, 9, 15, 14) through 330 Ω each to pins 7, 6, 4, 2, 1, 9, 10 of the FND-507. Connect the FND's COM pins (3 and 8) to +5V. The detailed correspondence is the same as the table in A 0–9 Digit Counter with a 74LS90, 74LS47, and Seven-Segment Display.
Switch positions and display
Because ON is 0, you have to think of the binary number inverted when making a digit. In the binary number of the digit you want, set the places with 1 to OFF and the places with 0 to ON.
| Digit shown | Binary (D C B A) | S4 | S3 | S2 | S1 |
|---|---|---|---|---|---|
| 0 | 0000 | ON | ON | ON | ON |
| 1 | 0001 | ON | ON | ON | OFF |
| 2 | 0010 | ON | ON | OFF | ON |
| 3 | 0011 | ON | ON | OFF | OFF |
| 4 | 0100 | ON | OFF | ON | ON |
| 5 | 0101 | ON | OFF | ON | OFF |
| 6 | 0110 | ON | OFF | OFF | ON |
| 7 | 0111 | ON | OFF | OFF | OFF |
| 8 | 1000 | OFF | ON | ON | ON |
| 9 | 1001 | OFF | ON | ON | OFF |
If you leave all four switches OFF (1111), that is 15, so the 74LS47 blanks the display completely (nothing shown).
If you enter 10 or more
For inputs of 10 to 14 (1010 to 1110) the 74LS47 shows special non-digit shapes, and for 15 (1111) all segments go off. It is not meant to display hexadecimal A to F. To get a blank at 10 and above, use a decoder like the CD4511 (a part whose display turns off at 10 and above), but the CD4511 is for common cathode, so the connection to the FND differs (Driving Seven-Segment Displays).
Ideas to extend it
- Lamp test switch: put a tact switch between the LT pin (pin 3) and GND, and while you press it all segments light, making it easy to find a bad FND or a wiring error.
- Blanking: connect BI/RBO (pin 4) to GND with a switch and the display goes off regardless of the input.
- Add the decimal point: put a resistor and a switch on the decimal point (pin 5) to light it.
Build it in Patterndo first
Patterndo has the 4-channel DIP switch, the 74LS47, and the FND-507, so you can build this circuit in the editor before soldering. Change the DIP switches and check the digit shown, and in simulation hover over the pins to see how each output of the 74LS47 changes between HIGH and LOW. How to use it is in Using Patterndo Simulation.
Checks
| Symptom | Where to check |
|---|---|
| Nothing displays at all | +5V on the FND COM, the 74LS47 power (pins 16 and 8), whether all switches are OFF |
| Wrong digit | Input pin order (A = pin 7, B = pin 1, C = pin 2, D = pin 6), ON/OFF inversion of the switches |
| Some segments do not light | That segment's resistor and the FND pin, a cold joint |
| All segments light | The LT pin is connected to GND |
Summary
You make a binary number by pulling the 74LS47 inputs Low with the DIP switches, and the result shows on the FND as a decimal digit. Remembering only that ON is 0, you can make digits as in the table above. For a version that climbs automatically with a clock, see the digit counter.