Note: The full set of videos is presented on the YouTube channel: DerekMolloyDCU
- 555 Timer Clock Circuit with Voltage Regulated Supply
- 4 Momentary toggle switches and suitable resistors
- BCD Up/down counte
- BCD to 7-Segment Decoder (SN74LS47N) - Caution, expensive IC.
- 7-Segment Display (Common Anode - Code: 2358799)
- 7 suitable resistors for driving display
This experiment aims to integrate a Binary Coded Decimal (BCD) counter and a 7-Segment display together to create a circuit that will count from 0 to 9. It uses the 555 Timer from the previous experiment (here) to drive the counter.
The first circuit that we will design is a circuit to convert from BCD (e.g. 0100) to its decimal digit equivalent (e.g. 4) and display this using a 7-Segment Display. To do this we need to use a driver/decoder that is built to know which segments must be lit to display the decimal equivalent symbol for that number.
We are going to use a 7-Segment display that is in Common Anode configuration. This means that all of the Anodes of the 8 diodes (7 segments plus the dot) are tied together as in Figure 1.
Figure 1. The Common Anode Configuration of our 7-Segment display.
The 7-segment display is configured as in Figure 2, with the pins 3 and 8 connected together (the common anode). The remaining 8 pins are then responsible for lighting the segments a-g (and the dot - DP) on the display. For example, Pin 1 lights the segment part 'e'. See Figure 1 and 2 together.
Figure 2. The 7-Segment Display and its pins - read together with Figure 1.
The datasheet for this display is attached to the bottom of this page (LED_Common_Anode). You will need to use suitable resistors to drive this display. Calculate this value yourself - the video will confirm your calculation.
Now, we need to convert from the BCD inputs into the values required for the 7-segment display. To do this we use the 74LS47 as we are using a common anode display. If we were to use a common cathode display we would use a 74LS48. The datasheet for the 74LS47 in the kit is attached to the bottom of this page (SN74LS47.pdf)
The first video details the first circuit to be designed that uses the 74LS47 to drive the 7-segment display. When you are wiring this up, take care that the bare legs of the resistors connected to the 7-segment display are not touching.
Next, we wish to connect a counter.
Binary Coded Decimal (BCD) Counter
A BCD counter counts binary coded decimal, where the decimal value in this case is 0 to 9, so the binary coded equivalent is 0000 to 1001, where we need 4 bits to represent 10 different symbols. The counter that has been supplied in your kits is the CD40192B and the datasheet for this component is attached to the bottom of this page. The CD40192B is a BCD Up/Down counter that also has a reset input. You can read the full details of its functionality in the attached datasheet.
We will connect this counter to the 555 Timer circuit that we developed in the Experiment on Clock Generator Circuits, which will have a full clock cycle every 1 second. Initially we need to drive the "up counter" pin with this clock signal and set the "down counter" pin to '1'.
The second video demonstrates how to create a BCD counter using the CD40192B IC.
Now, we wish to connect both circuits together. The outputs from the BCD counter are perfect for inputs to the BCD to 7-segment decoder. This video demonstrates the connected circuit and asks you to make two modifications to the circuit.
So, the circuit appears to work correctly and has asked the following questions:
Question 1 - Add a button to the circuit that allows the count to be reset to zero when it is pressed.
Question 2 - Add a mechanism to the circuit to allow the count to go backwards when enabled.
Question 3 - Modify the circuit to count in octal, rather than decimal.
Please do not look at the solution videos until you have had a good think about how you would solve the problem. In particular, examine the datasheet for the BCD Up/Down counter below and think about how you would implement the solution. The second question is more challenging as you need some sort of switching circuit - think back to your logic circuitry to see if you can come up with your own solution. My solution is just one possible solution.
Solution 1 - Resetting the Count to Zero when the button is pressed.
Solution 2 - Add a mechanism to the circuit to allow the count to go backwards when enabled.
Solution 3 - Count in Binary Coded Octal rather than Binary Coded Decimal
This is a useful setup that can be applied to any circuit where a count is required. It can be extended through additional counters and decoders to count decimal with more digits (0-99 etc.). The addition of a real-time clock could allow this to form the display of a digital clock.