I'm writing a small application which needs a quick and dirty random number generator. Since the number desired will be between 1 and 255, inclusive, it seems to me that a nice way to do it would be just to start one of the timers going (I'm using the 18F452) and read the 8-bit counter at the time I need the random number. Since it will be continually incrementing and overflowing, this would seem to be pretty random. But it seems so easy (really just one instruction) that there must be a catch. :-) Anyone see any? (I'm using Timer0 for something else, but since the F452 has four timers, that is no problem). John -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu