|
From: | Leon Heller |
Subject: | Re: [avr-gcc-list] rand() |
Date: | Sun, 14 Jul 2002 06:20:55 +0000 |
From: Torsten Hahn <address@hidden> To: "AVR GCC List" <address@hidden> Subject: [avr-gcc-list] rand() Date: Wed, 10 Jul 2002 10:20:05 +0200 Hi,has somebody still implemented an random number generator on the avr ? May be, it would be nice such a function in the avr-libc. Random number routines are not the problem i think but how to generate a "seed". On a pc you can use thetime() function. Has somebody an idea how to do it on avr ?
You could force the user to press a button after the device has booted, and use the time difference as a seed.
Leon -- Leon Heller, G1HSM Tel: +44 1327 359058 Email:address@hidden My web page: http://www.geocities.com/leon_heller My low-cost Altera Flex design kit: http://www.leonheller.com _________________________________________________________________MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx
avr-gcc-list at http://avr1.org
[Prev in Thread] | Current Thread | [Next in Thread] |