[Fwd: Re: [sdiy] Simplest random source]

René Schmitz uzs159 at uni-bonn.de
Mon Nov 18 12:00:13 CET 2002


Hi Seb, Magnus and List

There is no need to run this algorithm 16 times to get to a 16bit value. The 
contents of the shift register change with every iteration. You can use the 2 
lower/higher bytes directly as your random value. If it confuses you that the 
value of the i-th bit is determined by what i-1 was in the iteration before, 
well this whole thing is anything else but random, but purely deterministic.

Cheers,
 René


At 07:11 18.11.02 +0100, Magnus Danielson wrote:
>From: Seb Francis <seb at is-uk.com>
>Subject: Re: [Fwd: Re: [sdiy] Simplest random source]
>Date: Mon, 18 Nov 2002 03:51:59 +0000
>
>> Do I understand right that this code only produces 1 random bit per cycle, so
>> to get a 16bit random number you have to loop 16 times (16*19 instructions)?
>
>Well, you are correct in that it only produces 1 random bit. As Harry said,
>you then RC filter this on the output. Recall, if you run at 16 MHz, the
>CPU cycle clock is at 4 MHz (assuming PIC16C71) then the bit-clock is up at
>210 kHz and an RC filter at say 30 kHz would make a thick nice noise all the
>way up there. It's bandwidth limited of course, but that is allways the case,
>so why worry?
>
>You can actually tap more bits straight out of it. Say just toss all of SHIFT7
>onto a DAC. This would be similar to RC filtering actually, but the details is
>a little bit beyond what what we should bare at this early time in the morning.
>
>> Maybe it's a bit late at night and I'm not understanding it properly..
>
>Well, you got the first part right, but not the way to get more bits.
>
>Cheers,
>Magnus
>
-- 
uzs159 at uni-bonn.de
http://www.uni-bonn.de/~uzs159

 



More information about the Synth-diy mailing list