Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to generate pseudo random numbers on 8-bit micor?

Status
Not open for further replies.

electrojit

Member level 1
Joined
Dec 15, 2005
Messages
41
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,576
I want to gerate random number without using any inbuilt functions, so please tell me any simple algorithm if possible as early as possible.

Thank you in advance!
 

ey,
i think u can get some useful stuff from
h**p://en.wikipedia.org/wiki/PRNG
but each PRNG will repeat itself after a undefined number of iterations
it depends on your algorithm how many iterations are acceptable
i donno where u wanna use it for. but if it isnt allowed to repeat itself within a few million iterations u gotta write a good algorithm. if ur fine with repetence in 100 iterations u can use simpler algorithms

jocom
 

Try this one:
**broken link removed**

Regards,
IanP
 

There is no truly random number. In addition since you don't want to use a built in function such as RAND(), I suggest you write your own. It can be rather simple such as taking an argument such as my_rand(x) = x + 1. In addition you can seed your random number with a clock, a method in which RAND() is used, such as implement my_rand(clock + 1).
 

white_shadow said:
There is no truly random number.
I do not agree. There are methods to get real random numbers. Though not with an algorithm. An example:
The time between the decay of Krypton-atoms. Measure it and u got a random number.
There are installations that produce random-numbers this way.
jocom
 

I have generated Pseudo Noise using a PIC 12c672 .Basically is having arrays . You can tap the array and exor it with a value. The sequence will repeat atfer some time, but looking it into an spectrum analizer it was enough for my purposes (apply this noise to a laser) .
 

Hi,

you can obtain a true random number using the noise of a zener diode. Just bias the zener using a resistor and amplify the AC component of the signal then compare it with a treshold voltage to obtain the logic value.

Best Regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top