- This topic has 1 reply, 2 voices, and was last updated 7 years, 10 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Microcontroller › 8051 › Seed setting for Rand() function using DS1307RTC
Hello,
I want to generate random no. for my project. I need to access the the current time from DS1307 and then need to set seed for rand() function.
I have not worked with RTC.. If anyone can help me, plz reply to this post…
Thank you..
Hi there
If your main focus is on randomizing stuff then you can use any ADC pin, instead of a RTC, for the same task. What I mean is read values from any ADC pin and then process it to give you the seed for rand( ). You need not to connect that ADC pin with anything alse, not even GND; well this will be the reason why you would get randon analog values. Try it out.