--- In SynthModules@yahoogroups.com, "grantrichter2001" <grichter@a...> wrote: > Did you notice the CALCRAND subroutine? > > We are free running timer W at 16 MHz and then sampling the > counter "sawtooth" in a non-sychronized fashion. That number is > then used as the seed for the RANDOM function. Yes, I've seen CALCRAND. It's been useful in some of my other programs. And I do appreciate the work you and Mike put into working that out. In this case, though, the seed I'm using is the integer part of a mixed binary number; the lower 12 bits are the fractional part and the remaining bits represent the integer. RANDOM doesn't perform so well here. It's not so much the cycle length as it is the "quality" of the numbers. There are repeating patterns shorter than the cycle length. I'll re-think the problem and see if there's a different approach I can take. In any case, the program does what I wanted. I'm happy. :) For the non-programming types that may be reading this, I feel I should point out that this is not a problem with Brice's design or anyone else involved in the design of the PSIM-1. This has to do with the language provided with the AtomPro. And it's not really a problem, just a quirk to be aware of. Woody
Message
Re: Noise functions
2004-03-13 by Woody Wall
Attachments
- No local attachments were found for this message.