I am working on a PCB project where I want to generate a random number from 1 to 100 at the push of a button. The design is still basic, and I'm relatively new at designing electronics, so a lot of this could possibly be wrong.
So far in my design, I am using a 555 timer in astable mode, with a frequency of 1k or more(haven't chosen the resistors or capacitor quite yet), which goes into a ripple counter, acting as a pseudo-random number generator. This counter will reset to zero when it reaches 100 using a NAND, giving the number a range of 0 to 99 in binary. This number is then sent to a pair of 4-bit adders, which I will use to push the number range up to 1-100.
At this point, I would have 8 bit lines that need to go through a decoder of some sort, which then connects to my 3 digit 7-segment display. I've been thinking about the following options:
Since this is a PCB project, I am avoiding using an Arduino, and an EEPROM would need a significant amount of programming to get working. I have also considered using logic gates, but that would require an obscene number of gates to work.
This project is based on https://www.electronics-project-design.com/digitaldice.html, which only uses one display for a 4-bit number.
So far in my design, I am using a 555 timer in astable mode, with a frequency of 1k or more(haven't chosen the resistors or capacitor quite yet), which goes into a ripple counter, acting as a pseudo-random number generator. This counter will reset to zero when it reaches 100 using a NAND, giving the number a range of 0 to 99 in binary. This number is then sent to a pair of 4-bit adders, which I will use to push the number range up to 1-100.
At this point, I would have 8 bit lines that need to go through a decoder of some sort, which then connects to my 3 digit 7-segment display. I've been thinking about the following options:
- Somehow convert the 8-bit binary number into its 3 decimal digits(still in binary), and send each set to a BCD to 7-segment decoder, which each control an individual display. I'm not sure how I might g about "splitting" a binary number like this.
- Use a decoder with 8-bit parallel input that can run a 3 digit 7-segment display. I have not been able to find one like this.
Since this is a PCB project, I am avoiding using an Arduino, and an EEPROM would need a significant amount of programming to get working. I have also considered using logic gates, but that would require an obscene number of gates to work.
This project is based on https://www.electronics-project-design.com/digitaldice.html, which only uses one display for a 4-bit number.