Great suggestions guys - thank you.
I will look at the POT/RCTime commands and choose wide tolerance components or random values to achieve the desired variation.
Cheers
Barry
VK2XBP
Great suggestions guys - thank you.
I will look at the POT/RCTime commands and choose wide tolerance components or random values to achieve the desired variation.
Cheers
Barry
VK2XBP
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
![]()
Bookmarks