This is mostly a "mind experiment" because I don't have a current need but, is there a way to obtain a truly random (8-bit is good enough) number on an AVR? I'm not talking "random" in the statistically pure sense, just non-deterministic. I'm only thinking of using it on startup. Sampling a "noisy diode" would be great but I want to do it without having to add external hardware or dedicate an I/O pin to the effort. All I can think of is something like setting up one of the analog inputs as 'free floating', turning the gain all the way up, and violating all the "how to avoid ADC noise" rules and taking a sample. I don't think the timers would be helpful because these would tend to be deterministic and, by nature, run in sync with any code that would be sampling them. Ideas?
Message
Random Number Generator
2011-01-08 by Chuck Hackett
Attachments
- No local attachments were found for this message.