randomizing 10 seven seg display

Status
Not open for further replies.

rx5

Full Member level 2
Joined
Oct 26, 2004
Messages
132
Helped
5
Reputation
10
Reaction score
4
Trophy points
1,298
Activity points
1,122
hello all,


im planing to build a "virtual keypad" .... each PAD will be a seven seg display

arranged in a "keypad" orrientation....

once the clock stops , it will display randomly a digit from 0 to 9... no seven

segment should have the same digit...

any ideas how?

can this be done using simple logic gates?
 

That sounds like a good job for a small microcontroller chip, such as a PIC. You can write a small program that generates pseudo-random numbers and scans the LED displays.
 

uhmm hello echo47,

I preffer the basic digital gates... BUt i think?? its impossible??

I dont know if a PIC can monitor 10 inputs (0-9 seven sgment display) at a time...
 

The complicated part is making all the digits unique.

If you must use ordinary TTL/CMOS logic chips (a student lab project perhaps), then beware you may need dozens of chips. Here's one way to do it. First, clear all the digits. Then use a 0-to-9 counter to select each value to be displayed. For each value, use a pseudo-random number generator (such as an LFSR) to determine which digit gets that value. If that digit already contains a value, then keep trying more random numbers until you find a blank digit. When all the digits are filled, stop.

One small five-dollar microcontroller could easily do all that stuff, as well as inputting buttons, scanning the displays, etc. However, a microcontroller can't output a lot of current, so if you want the LEDs to be bright, you will need external buffers.

I'm not sure what you mean by "monitor 10 inputs".
 

hello echo47,

I'm not sure what you mean by "monitor 10 inputs". <-- what I meant to say is if a PIC can "scan" 10 inputs..

I hope you could show a link/diagram concerning that LFSR ...

Added after 14 minutes:


lemme re state my problem.. a circuit w/c randomizes BCD codes BUt the random code/s should not get out from (0-9)... AND it would have to see the past randomized number/s before it.. so NO digit/s get the same value... sounds VERY hard on simple logic gates..

i cant quite figure it out HOW TO..
 

hi echo47
Im planning to create an Electronic Flash Card..Got any simple code to generate random numbers?Im will be using PIC Micro!ü
 

A Linear Feedback Shift Register (LFSR) is an easy way to generate a pseudo-random bit stream in hardware by using a shift register and XNOR gate. Here are a couple of Xilinx app notes, and an example in HDL:


With some fiddling, you can modify the LFSR to generate multiple bits simultaneously.

I think my previously-mentioned scheme would generate the ten unique digits you want, but beware an LFSR would generate binary numbers, so you would have to throw away any numbers from 10 to 15 and try again. Yes the project sounds like a big breadboard full of CMOS/TTL chips. That's why I like the one-chip microcontroller approach.


I don't have any PIC random number generator example, sorry. I'd start by searching Google.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…