Searching \ for 'Pseudo-random number generation.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/method/math.htm?key=random
Search entire site for: 'Pseudo-random number generation.'.

Truncated match.
PICList Thread
'Pseudo-random number generation.'
1999\08\30@201437 by netquake

flavicon
face
Hi! I need to generate three bytes of pseudo-random numbers for
an app. I'm working on that features PIC12C508 and 509.
Then I need to count the number of ones present on those 24 bits.
Any cool ideas on solving any of these tasks are welcome!

Thanks a lot!
------------------------------------
netQ <spam_OUTnetquakeTakeThisOuTspaminnocent.com>
http://virtuaweb.com/picprog
"Home of amateur PIC programmers..."

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2

mQCNAzV38BkAAAEEALfWv9j3f+tZ+z2IW+2o9Ebx4bUGnHjHPqIe0a6yVKawaeV/
Y4I6L2/A0ddbVMG8+qJ0MvHNkr3DzYkpW+hTl9zAzXkKBdZ3GA5bbvot7entl/O2
YDtRWUV730koxBo5iFFUbJH5kbmkox+h3znj34zPnZNWzNaqOAwol3wABfBNAAUT
tBxOZXRRIDxuZXRxdWFrZUBpbm5vY2VudC5jb20+
=0bVU
-----END PGP PUBLIC KEY BLOCK-----

1999\08\31@010324 by quozl

flavicon
face
On Mon, Aug 30, 1999 at 09:13:34PM +0000, German wrote:
> Hi! I need to generate three bytes of pseudo-random numbers for
> an app. I'm working on that features PIC12C508 and 509.
> Then I need to count the number of ones present on those 24 bits.
> Any cool ideas on solving any of these tasks are welcome!

http://quozl.us.netrek.org/ has a random LED flasher on 12C509 that has
code you may be able to use.  24 bit psuedo-random number generator.

--
James Cameron                                      (.....quozlKILLspamspam@spam@us.netrek.org)

Linux, Firewalls, OpenVMS, Software Engineering, CGI, HTTP, X, C, FORTH,
COBOL, BASIC, DCL, csh, bash, ksh, sh, Electronics, Microcontrollers,
Disability Engineering, Netrek, Bicycles, Pedant, Farming, Home Control,
Remote Area Power, Greek Scholar, Tenor Vocalist, Church Sound, Husband.

"Specialisation is for insects." -- Robert Heinlein.

1999\08\31@040220 by root

flavicon
face
Hello,

exactly yesterday I have finished my hardware true (not pseudo) random
number generator. It outputs a random bit sequence in CMOS logic. If
interested, I can post the schematic (in ASCII, one page). I guess, you
should connect the output to the T0CKI, and sample it - say - in every 1
msec.

Regards,
Imre


On Mon, 30 Aug 1999, German wrote:

{Quote hidden}

1999\08\31@100031 by Adam Davis

flavicon
face
I would be interested in it!

-Adam

root wrote:
{Quote hidden}

1999\08\31@123122 by Robert A. LaBudde

flavicon
face
At 10:09 AM 8/31/99 +0200, Imre wrote:
>exactly yesterday I have finished my hardware true (not pseudo) random
>number generator. It outputs a random bit sequence in CMOS logic. If
>interested, I can post the schematic (in ASCII, one page). I guess, you
>should connect the output to the T0CKI, and sample it - say - in every 1
>msec.

I for one would be interested. Have you done a power spectrum analysis to
see how 'true' you hardware is at generating 'white' noise?


================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: EraseMEralspam_OUTspamTakeThisOuTlcfltd.com
Least Cost Formulations, Ltd.                   URL: http://lcfltd.com/
824 Timberlake Drive                            Tel: 757-467-0954
Virginia Beach, VA 23464-3239                   Fax: 757-467-2947

"Vere scire est per causae scire"
================================================================

1999\08\31@135024 by Anne Ogborn

flavicon
face
please post, i'm interested

1999\08\31@221526 by Bob Wake & RenŽe McMeeken

flavicon
face
>
> Hello,
>
> exactly yesterday I have finished my hardware true (not pseudo) random
> number generator. It outputs a random bit sequence in CMOS logic. If
> interested, I can post the schematic (in ASCII, one page). I guess, you
> should connect the output to the T0CKI, and sample it - say - in every 1
> msec.
>
> Regards,
> Imre

Post That Puppy!


'Pseudo-random number generation.'
1999\09\01@003158 by Javier
flavicon
face
part 0 1178 bytes content-type:application/octet-stream;-----Mensaje original-----
De: German <netquakespamspam_OUTINNOCENT.COM>
Para: @spam@PICLISTKILLspamspamMITVMA.MIT.EDU <KILLspamPICLISTKILLspamspamMITVMA.MIT.EDU>
Fecha: Lunes 30 de Agosto de 1999 21:16 p.m.
Asunto: Pseudo-random number generation.


Hi! I need to generate three bytes of pseudo-random numbers for
an app. I'm working on that features PIC12C508 and 509.
Then I need to count the number of ones present on those 24 bits.
Any cool ideas on solving any of these tasks are welcome!

Thanks a lot!
------------------------------------
netQ <RemoveMEnetquakeTakeThisOuTspaminnocent.com>
http://virtuaweb.com/picprog
"Home of amateur PIC programmers..."

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2

mQCNAzV38BkAAAEEALfWv9j3f+tZ+z2IW+2o9Ebx4bUGnHjHPqIe0a6yVKawaeV/
Y4I6L2/A0ddbVMG8+qJ0MvHNkr3DzYkpW+hTl9zAzXkKBdZ3GA5bbvot7entl/O2
YDtRWUV730koxBo5iFFUbJH5kbmkox+h3znj34zPnZNWzNaqOAwol3wABfBNAAUT
tBxOZXRRIDxuZXRxdWFrZUBpbm5vY2VudC5jb20+
=0bVU
-----END PGP PUBLIC KEY BLOCK-----

Content-Type: application/octet-stream;
       name="cheksum1.asm"
Content-Disposition: attachment;
       filename="cheksum1.asm"

Attachment converted: wonderland:cheksum1.asm (????/----) (0000BEA0)

1999\09\01@015401 by Donald Brown

picon face
Please Post  !!

--- Bob Wake & Renie McMeeken <spamBeGonerwakespamBeGonespamPATHCOM.COM> wrote:
> >
> > Hello,
> >
> > exactly yesterday I have finished my hardware true (not pseudo) random
> > number generator. It outputs a random bit sequence in CMOS logic. If
> > interested, I can post the schematic (in ASCII, one page). I guess, you
> > should connect the output to the T0CKI, and sample it - say - in every 1
> > msec.
> >
> > Regards,
> > Imre
>
> Post That Puppy!
>

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

1999\09\01@030317 by root

flavicon
face
Hi,
as more people wished, here is the true h/w random number generator:

White noise generator, design by dr. Imre Bartfai, 8/30/1999

+--------------------------------------------------------------------- Vdd
|                           220k                    220k               5V
|                       +---\/\/\---+           +---\/\/\---+------+
|                       |           |           |           |      |
| Ge                    |    |\     |           |    +------+      \
| EFT317 PNP      +-----+----|- \   |           |    |             / 220k
|      C          |     |    |    >-+----| |----+    |     |\      \
|   |/            \  +-------|+ /        47n    |    +-----|- \    |
+--B|        220k /  |  |    |/                 |    |     |    >--+
    |\            \  |  |  1/2 LM358            +----------|+ /    |
      |E          |  |  |                       |    |     |/      \
      +----| |----+--+  +                       +    +             /  47k
      |    47n    |     |                       |    | 1/2 LM358   \
      \           \     \                       \    \             |
 4k7  /        1M /     / 2k2                1M /    / 2k2         + out
      \           \     \                       \    \
      |           |     |                       |    |
      +-----------+-----+-----------------------+----+---------------- Vss

Standard TTL can not be driven, but CMOS (and maybe LS) are o.k.
The power supply must be filtered thoroughly due to the high gain!

Regards,
Imre

1999\09\01@030320 by root

flavicon
face
Hi,
it is not done yet but it is planned.
Regards,
Imre


On Tue, 31 Aug 1999, Robert A. LaBudde wrote:

{Quote hidden}

1999\09\01@053635 by Robert A. LaBudde

flavicon
face
At 09:13 AM 9/1/99 +0200, Imre wrote:
{Quote hidden}

Where does the transistor collector go? Presumably to Vdd? (Unconnected as
shown.)

================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: RemoveMEralspamTakeThisOuTlcfltd.com
Least Cost Formulations, Ltd.                   URL: http://lcfltd.com/
824 Timberlake Drive                            Tel: 757-467-0954
Virginia Beach, VA 23464-3239                   Fax: 757-467-2947

"Vere scire est per causae scire"
================================================================

1999\09\01@062711 by Michael Rigby-Jones

flavicon
face
{Quote hidden}

       Robert A. LaBudde wrote:

> Where does the transistor collector go? Presumably to Vdd? (Unconnected as
> shown.)
>
The collector is not connected.  This circuit relies on the reverse
breakdown of the Base-Emitter junction which produces a lot of noise.  More
or less the same as a zener diode, which can also be very noisy, although a
transistor is usually worse (or better depending on your point of view).

Regards

Mike Rigby-Jones

1999\09\01@085110 by Morgan Olsson

picon face
Hej Michael Rigby-Jones. Tack fšr ditt meddelande 11:24 1999-09-01 +0100 enligt nedan:
{Quote hidden}

Suggestion, untested:

I would think that connecting a cap between B and Vss would increase the noise output. (making a "stamp-off" pointfor the transistor noise voltage with much lower impedance than only the 220k resistor)

The idea is to in next step reduce the amplifier to just one opamp stage.

Regards
/Morgan
Morgans Reglerteknik, HŠllekŒs, 277 35 KIVIK, SWEDEN
  tel +46(0)414-446620, fax -70331,   mrtEraseMEspam.....iname.com

1999\09\01@160909 by Maris

picon face
For most transistors it takes around 7 volts to break down the reverse
emitter/base junction so this circuit may not work at 5 volts. Maybe you
can substitute a low voltage zener for the transistor.
Maris


At 09:13 AM 9/1/99 +0200, you wrote:
{Quote hidden}

1999\09\01@171134 by Gabriel Gonzalez

flavicon
face
This is a Germanium transistor...


-----Original Message-----
From: Maris <EraseMEmarisspamTIAC.NET>
To: RemoveMEPICLISTEraseMEspamEraseMEMITVMA.MIT.EDU <RemoveMEPICLISTspam_OUTspamKILLspamMITVMA.MIT.EDU>
Date: Wednesday, September 01, 1999 3:02 PM
Subject: Re: Pseudo-random number generation.


{Quote hidden}

Vdd
{Quote hidden}

Vss
>>
>> Standard TTL can not be driven, but CMOS (and maybe LS) are o.k.
>> The power supply must be filtered thoroughly due to the high gain!
>>
>>Regards,
>>Imre
>>
>>

1999\09\01@190012 by Russell McMahon

picon face
This circuit relies on the breakdown of the transistor junction to make
"white noise".
While 5V may work for the device specified many transistors need more than
this to function in this manner - if your version of this cct doesn't work
consider this as a possible cause - you may need 9v or possibly even as
much 12.




Russell McMahon








>as more people wished, here is the true h/w random number generator:
>
> White noise generator, design by dr. Imre Bartfai, 8/30/1999

1999\09\01@195828 by Antonio L Benci

flavicon
picon face
part 0 5903 bytes content-type:application/x-unknown-content-type-PFE32; name=noise509.asm (decoded 7bit)

Nino

Code follows...

;
;   Pseudorandom digital white noise generator for PIC series.
;
;   PIC12C508 version written April 7th, 1997 by Scott Rider.
; Questions/comment to RemoveMEchipTakeThisOuTspamspamaeug.org
;
;   PIC12C509 modified version by Antonio L. Benci. 22/03/1999.
;
;   This program uses Microchip assembler mnemonics and the Microchip
; MPASM assembler (http://www.microchip.com/).  Default config options
; are set in the __FUSES line below: MCLRE off, CP off, WDT off,
OSC=INTRC.
;
;                  _______  _______
;                 |       \/       |
;     (+5V) Vdd --+ 1            8 +-- Vss (GND)
;                 |                |                      470
;   X1/CLKI/GP5 --+ 2            7 +-- GP0 (audio out) --/\/\/-- (spkr)
;    (not used)   |                |                  |   10K   1uF
;   X2/CLKO/GP4 --+ 3            6 +-- GP1             --/\/\/--|(--
(line)
;    (swt input)  |                |  (swt input)
;     GP3/!MCLR --+ 4            5 +-- GP2
;    (swt input)  |  (PIC12C508)   |  (swt input)
;                 +----------------+
;
;   This program generates a continuous stream of white noise through a
; speaker connected (via a 470-ohm series resistor) to pin GP0 of a
; PIC12C509.  It demonstrates an easy method for generating a seemingly
; random stream of bits. Hardware folks will probably recognize it as
the
; tapped shift register technique covered in the CMOS Cookbook by Don
; Lancaster.
;
; Adapted from the original PIC16C54 (Parallax) version by Scott
Edwards.
;
;##########################################################################
;
; Programmable noise weighting added by A L Benci 22/03/1999
;
; GP1..GP4 are connected to a dip switch which the user can use to
select
; 'textures' of 2 to 30. A zero value skips the function.
;
;
       list    p=12c509
       radix   dec
       include "p12c509.inc"

       __FUSES _MCLRE_OFF &_CP_OFF & _WDT_OFF & _IntRC_OSC  ;Internal osc.

       cblock  0x07    ;Variables
               i       ;Loop counter
               x       ;Scratch
               y       ;Scratch
               zz      ;Scratch
               sr0     ;32 bits of shift register
               sr1
               sr2
               sr3     ;/
       endc

       org      0x0
;
;  PIC12C509 cold starts at 03FFF (where it loads a factory-programmed
; internal osc. calibrate value).  It then rolls over to 0x0.
;
       movwf   OSCCAL
       goto    start
;
;  Subroutines in 12-bit PIC series must go on bottom page of ROM.
;
wait
loop    decfsz  i,F
       goto    loop
       retlw   0
;
;  Main code area traditionally starts at 0x100 on a 12-bit PIC.
;
       org     0x100

start   movlw   b'11000000'     ;Turn off T0CKI
       option                  ;/
       movlw   b'00000000'     ;Preset outputs to come up low
       movwf   GPIO            ;/
       movlw   b'00011110'     ;Set the I/O direction (GP3..GP1 as inputs,
GP0,GP5 as output)
       tris    GPIO

       clrf    sr0             ;Might as well start with a seed of zero.
       clrf    sr1
       clrf    sr2
       clrf    sr3             ;/
;
;   The main loop 'taps' is 24 CPU cycles.  At the 4MHz internal clock
; rate, the noise output is operating at a max. rate of about 21KHz.
;
taps    btfss   sr3,6           ;Get bits 18 and 31 for the feedback
XOR.
       bcf     x,0
       btfsc   sr3,6
       bsf     x,0             ;Bit 31 -> x

       btfss   sr2,1
       bcf     y,0
       btfsc   sr2,1
       bsf     y,0             ;Bit 18 -> y

       movf    y,W             ;!(x XOR y) -> carry
       xorwf   x,F

       btfsc   x,0
       bcf     STATUS,C
       btfss   x,0
       bsf     STATUS,C        ;/

       rlf      sr0,F          ;32-bit shift
       rlf      sr1,F
       rlf      sr2,F
       rlf      sr3,F          ;/
;
;  Put a pseudorandom bit out to the speaker.  In this example, GPIO bit
0
; (pin 7 on the PIC12C509) is used.  Be sure to use a 470 ohm resistor
for
; speaker or 10K or better for input to an op-amp/divider/whatever.
;

       btfss   sr3,7           ;line 1
       bcf     GPIO,0          ;line 2
       btfsc   sr3,7           ;line 3
       bsf     GPIO,0          ;line 4

;
;  Uncomment the following 'call wait' to experiment with changing the
; 'texture' of the noise (see 'wait' routine, above).

       movf     GPIO,W         ;read switch input
       andlw    b'00011110'    ;mask all but swt bits
       movwf    i              ;save value

       btfss    STATUS,Z       ;is result zero
       call     wait           ;Optional delay routine to alter sound

       goto     taps           ;Ad infinitum...
;
;  That's all, folks!
;
       end

--
******************************************************
* Antonio (Nino) Benci                               *
* Professional Officer / Electronic Services Manager *
* Monash University - Dept of Physics                *
* Wellington Rd, Clayton. 3168                       *
* Victoria, Australia.                               *
* TEL    - 61 3 9905 3649, FAX - 61 3 9905 3637      *
* Mobile - 0414 764 763 (private and ah only)        *
* EMAIL  - EraseMEnino.bencispamspamspamBeGonesci.monash.edu.au (work)       *
*        - RemoveMEfleatechKILLspamspamexcite.com (private)             *
* WWW    - http://www.physics.monash.edu.au/                *
******************************************************

Content-type: application/x-unknown-content-type-PFE32; name=noise509.asm
Content-disposition: inline; filename=noise509.asm

Attachment converted: wonderland:noise509.asm (????/----) (0000BF5E)
Content-type: text/x-vcard; name=Nino.Benci.vcf; charset=us-ascii
Content-description: Card for Antonio L Benci
Content-disposition: attachment; filename=Nino.Benci.vcf
Content-transfer-encoding: 7BIT

Attachment converted: wonderland:Nino.Benci.vcf (TEXT/CSOm) (0000BF5F)

1999\09\01@195832 by Antonio L Benci

flavicon
picon face
part 0 980 bytes content-type:text/x-vcard; name=Nino.Benci.vcf; charset=us-ascii (decoded 7bit)

Nino.
--
******************************************************
* Antonio (Nino) Benci                               *
* Professional Officer / Electronic Services Manager *
* Monash University - Dept of Physics                *
* Wellington Rd, Clayton. 3168                       *
* Victoria, Australia.                               *
* TEL    - 61 3 9905 3649, FAX - 61 3 9905 3637      *
* Mobile - 0414 764 763 (private and ah only)        *
* EMAIL  - nino.benciSTOPspamspamspam_OUTsci.monash.edu.au (work)       *
*        - spamBeGonefleatechSTOPspamspamEraseMEexcite.com (private)             *
* WWW    - http://www.physics.monash.edu.au/                *
******************************************************

Content-type: text/x-vcard; name=Nino.Benci.vcf; charset=us-ascii
Content-description: Card for Antonio L Benci
Content-disposition: attachment; filename=Nino.Benci.vcf
Content-transfer-encoding: 7BIT

Attachment converted: wonderland:Nino.Benci.vcf 1 (TEXT/CSOm) (0000BF60)

1999\09\02@022516 by root

flavicon
face
Hi,

it is o.k. It IS unconnected.

Regards,
Imre


On Wed, 1 Sep 1999, Robert A. LaBudde wrote:

{Quote hidden}

1999\09\02@060624 by root

flavicon
face
Hi,
note, that the transistor is an obsolete Ge-PNP dug out of the junk box.
The Zener provided far worse results. This, however, worked at 5 volts
definitely.

Regards,
Imre


On Wed, 1 Sep 1999, Maris wrote:

{Quote hidden}

1999\09\05@101922 by Wes Brzozowski

flavicon
face
At 05:42 PM 09/01/1999 +1000, you wrote:
>My previous reply included the code example in line and as an
>attachement. This was an error on my part. Appologies if this causes
>problems, i was too fast on the SEND button...

Thanks for sharing it. Personally, I like including the code in the body of
the message when it's small enough. Makes it much easier to archive for future
reference (otherwise, we have to imbed it in the message ourselves). Fact is,
most people saving your info won't be using your code exactly as you wrote
it,
anyway; we'll be modifying it to suit our own needs. Since we'll be editing
the file anyway, it's simple to also strip off the message portions of a
combined file.

So, as long as it doesn't cause any unobvious problems with the list, I'm all
for sending a single text message, instead of attatching text to text. Save
the
attatchments for binaries.

Thanks again for sharing your work & take care...

Wes B.

************************************************************************
*     Wes B.         *  "It's a wonderful world out there, Hobbes old  *
* EraseMEwesbspamEraseMEpronetisp.net *    buddy... Let's go exploring."   - Calvin     *
************************************************************************

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...