> > Your solution would be valid but you will be reading some analog input > and this will introduce significant delay to each cycle. Your > application might not be time-critical but you mention about powering > the thing from batteries where using analog inputs will probably > result as reduced battery life. > > This might be worth looking at ; > http://www.piclist.com/techref/microchip/rand8bit.htm This is the link I forgot to include on my post earlier, but the idea is you could store the output of the random function to use for the next seed. This way the you'll always have a new random number, but two devices will always act alike unless you purposely seed them differently at program time. Also, you could use the timing information from a button press (if you have any) as an additional source of randomness to seed a generator. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .