I am trying to design a circuit that will give me a "random" square wave. I know that I can get "white noise" by reverse-biasing a transistor, but I need to convert that to a lower frequency, irregular square wave that I can read in through a PIC port. It seems like this should be easy to do with an op-amp or some other type of amplifier and possibly a flip-flop, but I'm too much of a novice, especially with analog electronics, to work it out.
Ideally, the circuit would have a pot that could be used to adjust the average frequency from, say, 1,000 Hz to 100 Hz or less. It is not important for the square wave to have a precise 50% average duty cycle, but it can't be way off either (i.e. not a series of tiny pulses with lots of space in between) or I'll have trouble reading it with my PIC. This is why I'm thinking a flip-flop might be needed.
E.G.
,,,|''''''''''''''''''''|,,,,,,,,,,,,,,,,,,,,,,,|"""""|,,,|''''''''''''''''''''''''''''|,,,,|'''|,,,,,,,|''''''|,,,,,,,,|'''''
|<-------------------------------------100 msec-------------------------------------->|
I don't necessarily need to use a reverse-biased transistor as the noise source, but I don't know any other ways (other than using radioactive decay) to get random data. I want the source to be truly random rather than pseudo-random or I could just use the RAND function inside the PIC.
Can anyone point me in the right direction?
Rick Harrison.
Ideally, the circuit would have a pot that could be used to adjust the average frequency from, say, 1,000 Hz to 100 Hz or less. It is not important for the square wave to have a precise 50% average duty cycle, but it can't be way off either (i.e. not a series of tiny pulses with lots of space in between) or I'll have trouble reading it with my PIC. This is why I'm thinking a flip-flop might be needed.
E.G.
,,,|''''''''''''''''''''|,,,,,,,,,,,,,,,,,,,,,,,|"""""|,,,|''''''''''''''''''''''''''''|,,,,|'''|,,,,,,,|''''''|,,,,,,,,|'''''
|<-------------------------------------100 msec-------------------------------------->|
I don't necessarily need to use a reverse-biased transistor as the noise source, but I don't know any other ways (other than using radioactive decay) to get random data. I want the source to be truly random rather than pseudo-random or I could just use the RAND function inside the PIC.
Can anyone point me in the right direction?
Rick Harrison.