I can't help thinking there would be some noise on the power you'd see with ADC.
Interference between ADC pins has always been a problem...
I can't help thinking there would be some noise on the power you'd see with ADC.
Interference between ADC pins has always been a problem...
I am not sure how I would go about un-tapping the noise to produce a random output.
Would you care to expand your idea for me?
Cheers
Barry
VK2XBP
If the device is mains powered there's a 50/60Hz clock on the transformer secondary
the way old LED digital clocks used to keep time from mains signal.
If you are looking at that with a pic that has an independent clock the results will vary.
If you can run an ADC from internal RC clock
and the pic from xtal, and look at any clock or output signalCode:DEFINE ADC_CLOCK 3
generated by the pic program with ADC the results will differ as clocks lose sync.
I would try the resistor Cap network first (timing cap discharge via resistor).
(Never done this)
What about reading a resistor on analog pin? A high value, maybe 100K, would that produce a reasonably wide range of seeds?
Robert
Edit: since no 2 resistors are exactly alike, the voltage should vary.
Last edited by Demon; - 15th October 2013 at 19:55.
It sounds like it would work.
That would be the first thing I'd try now, nice one.
.. and if not, then tapping the centre of a divider (two resistors from +ve to Gnd).
Still cheaper than timing a cap discharge.
I can't say I've tried to make two devices produce a different result,
just one device from one launch to the next.
Even better, use a LED and 330R resistor. You're bound to get different voltages and it serves as a power indicator.
Robert
![]()
Hi Guys,
All great ideas - thank you.
I have decided to program each PIC separately making subtle differences to LED flash rates and "off-time" periods to give an overall effect of randomness.
This is a one-off project that I am doing as a labour of love for my company. As such, I just want to get in and get out as quickly as possible
Cheers
Barry
VK2XBP
Hi,
One possible issue with using the ADC is that the 12F508 being mentioned in the first post doesn't have one....
/Henrik.
Bookmarks