I am required to build a "dice game" using my choice of the 7490, 7492, or 7493 ripple counters as the basis of my circuit. The way the circuit must work is as follows: A pushbutton must be pressed and released to simulate the roll of the die. While the switch is held down, a numerical 8 is displayed, and when the button is released a random value between 1 and 6 should appear on the 7-segment display. I also need to supply my own debounced pushbutton (my switch in the screenshot provided represents this.)
My circuit works perfectly fine (in Multisim atleast) other than the fact that my clock counts from 0-6 and then repeats, rather than the required 1 through 6 that simulates actual dice values. I have the circuit set up so that instead of going through its normal 3-bit count of 0-7, the three outputs of the counter are ANDed together and sent to the RESET inputs of the counter to indicate its invalid state and reset it early. Other notes to make is that one of the rules is only a +5V power supply is given, so I had to make an oscillator using the 555 Timer, which is why its there rather than a function generator. I also obviously used the 7492 but only used three of the flip flops since I only need a maximum of 6 states, but it gives me 8 states and I have only eliminated one of the two invalid states (7) and have yet to remove the other (0.)
I have spent hours thinking of how to fix my issue. In addition to the option of my actual circuit design not being possible to achieve the conditions that I wish to achieve, I have tried decoding the outputs of the clock by adding logic gates based off of a truth table that I constructed to remove the possibility of displaying a 0, but then I get something like a constant 1 being displayed when the switch is closed/open. I've looked at the 74LS47 decoder/driver datasheet to see what values actually allow a zero to be displayed, which is obviously all of the inputs to the decoder low, so I imagine (if my circuit is capable of this) that I somehow need to prevent the inputs from ever all reaching zero, or have the 7-segment display display another value between one and six for that one unique state where all three of the clock outputs go low (0.) My best guess at preventing all the outputs from reaching zero is to reform the counter into a DOWN counter, and making 000 the false state, and resetting at 1 instead, but then a 7 will be displayed again. I feel like the answer is right in front of me but I can't wrap my head around it.
My circuit works perfectly fine (in Multisim atleast) other than the fact that my clock counts from 0-6 and then repeats, rather than the required 1 through 6 that simulates actual dice values. I have the circuit set up so that instead of going through its normal 3-bit count of 0-7, the three outputs of the counter are ANDed together and sent to the RESET inputs of the counter to indicate its invalid state and reset it early. Other notes to make is that one of the rules is only a +5V power supply is given, so I had to make an oscillator using the 555 Timer, which is why its there rather than a function generator. I also obviously used the 7492 but only used three of the flip flops since I only need a maximum of 6 states, but it gives me 8 states and I have only eliminated one of the two invalid states (7) and have yet to remove the other (0.)
I have spent hours thinking of how to fix my issue. In addition to the option of my actual circuit design not being possible to achieve the conditions that I wish to achieve, I have tried decoding the outputs of the clock by adding logic gates based off of a truth table that I constructed to remove the possibility of displaying a 0, but then I get something like a constant 1 being displayed when the switch is closed/open. I've looked at the 74LS47 decoder/driver datasheet to see what values actually allow a zero to be displayed, which is obviously all of the inputs to the decoder low, so I imagine (if my circuit is capable of this) that I somehow need to prevent the inputs from ever all reaching zero, or have the 7-segment display display another value between one and six for that one unique state where all three of the clock outputs go low (0.) My best guess at preventing all the outputs from reaching zero is to reform the counter into a DOWN counter, and making 000 the false state, and resetting at 1 instead, but then a 7 will be displayed again. I feel like the answer is right in front of me but I can't wrap my head around it.