white noise/pseudo random noise

Hey all,

Is there a way to output pseudo random noise from the Arduino?

I'm attempting to emulate the Sound function from Picbasic. Here's the description of the function:

The Sound routine generates squarewave tones with frequencies of 280 Hz to 71 kHz and durations of 3.6 ms to 0.92 seconds at 4 MHz. It differs from its PBASIC counterpart in that all frequency values from 1 to 255 produce squarewave tones. PBASIC's Sound instruction generates tones when the frequency is in the range of 1 to 127, and hissing white-noise effects from 128 to 255. Both PBASIC and assembly versions of Sound produce a silent pause with a frequency value of 0.

u could use the ADC, which has some random(?) noise on the LSB (especially if u connect a little "antenna" (=upright 10cm wire) to the the analog input pin)...
but it cannot do more than 10kHz... never 4MHz... :slight_smile:

the pseudo random number generator is possibly even slower:
http://arduino.cc/en/Reference/Random

-arne