Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
anyone knows how to "continuosly " generating a series of random number in 16f628, prefereble in using pic basic. I try using random command but it does not generate the random number.
I don't know how to write basic for pic, but i remembered that there is a algorithm to build random function as I studied on programming in high school.
The fact that random is not relly random, but it's made from an algorithm that choose one of upto 10^12 matrix elements in Pascal. And if you want, you can make it.
Perhaps you have to review how to generate random function in high level languages, and then do it in PICs. I'm in doubt that high level language for PIC can give random function. If you find out the ans, pls tell meeh. I also care bout it.
Why is the random command not generating you random numbers ?
It is 16 bit long 1 - 65535, there is 65535 combination, I just tried,
for 5 min I have never got the same number !? [1sec/num]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.