Square wave generator on 20MHz

frequencyfunction generatoroscillatorwave

I need a circuit that generates rectangular waves. It shouldn't be lo-hi-lo-hi, but a random sequence of lo-hi-hi-hi-lo-lo is needed. It also has to oscillate like that, at at least 20MHz. I don't mind getting a special IC… Anything to make the job easier is fine by me.


Alright, I'm looking for really dead-easy ones and so thanks Nick for the solution. I'm also considering something possibly even smaller.

Please bare with me.

Maybe I can use an ordinary digital oscillator and then dynamically change its oscillating frequency (change in frequency also in terms of MHz), so that the level signals get dilated and compressed, giving the effect that we have randomly generated bitstreams. Though we have to set the targeted frequency (in this case, 20MHz), as the lower limit of changing the frequencies.

Something like this, an LTC6905 – http://cds.linear.com/docs/en/datasheet/6905fd.pdf (ok, not exactly cheap), and then vary the setting resistor in small increments/decrements randomly.

Of course there is a problem of randomly changing the resistance that is itself at least pseudo random. So it's back to square one. Any comments on this??

Best Answer

Assuming you want a pseudorandom sequence, a Linear Feedback Shift Register is an easy option. You can implement one with one or more shift registers, and a single XOR gate. Then, simply feed a clock signal into the latch pin to clock it. You can read the signal from any output pin on the shift register.

If you need a longer period than 511 bits, you can add additional shift registers.

The only complication to this is that you need to initialize the register with at least one bit set. One way to do this would be to use a shift register with output enable, tie one of the XOR gate's inputs to VCC with a pullup resistor, and use an RC circuit to ensure the output enable takes a short while to turn on after power is applied.

Here's an untested example:

schematic

simulate this circuit – Schematic created using CircuitLab