[sdiy] Pseudo Random Noise Generator in an AVR?
ChristianH
chris at chrismusic.de
Wed Jan 9 11:12:38 CET 2013
I did exactly that a couple of years ago.
I used a dedicated 8 pin AVR for that.
Literally took about half an hour from first deciding to try it, and
most of that time was used to find out how to jumper the STK500 for
flashing that tiny part.
And no, sorry - the source has magically disappeared since then. I do
have an appropriately named source file that should be from that project,
but no noise code in there. Don't know what happend back then, maybe
indadvertently pressing ^Z and then ^S at the wrong moment...?
But then, I remember that I just sketched it down in C without much
thinking. Just as you described, forever loop, long int, some shifting,
some bit banging, and output lo bit to a pin.
Sounded good to me. And no hum from excessive amplification :-)
I took the polynomial from a Xilinx document called DS257.
I can't find a URL at Xilinx now, but Google reports
jaja.kn.vutbr.cz/~kajan/lfsr.pdf
which appears to be that very PDF I used back then.
Chris
On Tue, 08 Jan 2013 21:10:38 -0800 Jim Patchell <patchell at cox.net>
wrote:
> I am trying to elimnate parts in my current project. I have every thing
> on the board, except the analog noise generator (you know, reversed
> biased e-b junction. Gaining enough realestate may not be possible, and
> I don't want to add any more square inches. So, I was thinking, why not
> move the noise generator into the ATmega that is also on the board.
> Making a 32 bit linear feedback shift register in the firmware should
> not be a problem. Running it fast enough might be I would want to run
> it at a minimum of 40K shifts per second. Not even sure if that is fast
> enough.
>
> Anybody else every try something like this, and how did it work.
> Otherwise, I am going to have to break out the old STK500/501 and write
> some code. ;^)
>
> -Jim
More information about the Synth-diy
mailing list