EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / Seed setting for Rand() function using DS1307RTC

Seed setting for Rand() function using DS1307RTC

|

Microcontroller › 8051 › Seed setting for Rand() function using DS1307RTC

  • This topic has 1 reply, 2 voices, and was last updated 8 years, 5 months ago by GANEEV SINGH.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • October 8, 2011 at 8:52 pm #1302
    Manoj B
    Participant

    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..

    December 29, 2016 at 5:37 am #14302
    GANEEV SINGH
    Participant

    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. 

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • PIC KIT 3 not able to program dsPIC June 23, 2025
  • Fun with AI and swordfish basic June 23, 2025
  • Is AI making embedded software developers more productive? June 23, 2025
  • Microinverters and storeage batteries? June 22, 2025
  • FFC connector white June 22, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise