Connect with us

Using RTC on its Own

Discussion in 'Electronic Design' started by Nick, Feb 4, 2006.

Scroll to continue with content
  1. Nick

    Nick Guest


    Can i use a RTC on its own and use its alarm feature once in 500hrs.? I
    mean can i program the RTC using microcontroller (for setting the alarm
    time). And then the remove the microcontroller and use the RTC. part
    Maxim - DS1337.

  2. Nick

    Nick Guest


    The DS1337 Datasheet says "Access is obtained by implementing a START
    condition and providing a device identification code, followed by data.
    Subsequent registers can be accessed sequentially until a STOP
    condition is executed".

  3. Geo

    Geo Guest

    I do not see why not - provided the Vcc supply to the RTC is not interrupted,
    and the SDA/SCL lines are pulled up - the RTC will not know if the processor is
    physically there or just not speaking to it any more...
    Easy enough to try.

  4. I have done this with a Xicor RTC a few years ago and it does work.
    Just ensure you leave the pull-up resistors connected from SDA, SCL and
    INTA/B* to VCC and that VCC is not interrupted during or after removing
    the micro. You also need to leave the resonator / crystal in place.
    Your micro will need an I2C interface to talk to the RTC to set the
    alarm time, I generally use an ATMEL AVR ATmega16 for tinkering around
    with this sort of circuit. What is your application? A timer of some
    sort? If anyone is monitoring these groups you might get 'looked at' if
    you do not state an appropriate application.

  5. Precisely what are you trying to infer by that?
  6. Risk of getting reported to the authorities, for preparing a
    timer for a bomb or something. Totally insane of course,
    because such timers always need the 7-segment LED display
    showing the count down. And it needs a bunch of wires, of
    which you have to cut one to make it run 5x faster, and cut
    another to make it stop at 00:00:01. I know that, I've seen
    that in countless movies.
  7. I think he's helpfully suggesting that if the OP is looking for
    information on how to build, say, bomb timers or unjammable remote IED
    triggers he should come up with some kind of fake "appropriate
    application" in order to avoid undue attention from the authorities.

    Best regards,
    Spehro Pefhany
  8. Steve

    Steve Guest

    Hmm. If he *were* using a RTC for that purpose, would he be expressing
    concerns over the ultmate fate of a cheap micro. One suspects not.

  9. Nick

    Nick Guest


    I am using it for Maintanence purpose (Machine Lubrication). My machine
    needs lubrication after 500hrs hours of working. Earlier i thought of
    using an electronic timer but that would cost too much. Hence i thought
    of using the RTC without Microcontroller.

    Thanks and regards,
  10. Donald

    Donald Guest

    Which RTC chip did you say you wanted to use ??

    If its for machine lubrication, then it must be plus/minus 5% or 10 hours.

    Any microcontroller will get that and better.

    So whats the problem ???

    The problems you are looking at trying to avoid (cost) will bite you
    soon enough.

    I do not understand why this is being discussed.

  11. Richard H.

    Richard H. Guest


    Perhaps you think microcontrollers are too expensive? It looks like
    they may be cheaper than the RTC you're using.

    Atmel's ATtiny11 8-pin microcontroller would probably do this fine for
    US$0.54 in quantity-1, and it has built-in clocking. Or ATtiny13 for
    about US$1.40 each if you require NVRAM - see
    and You're likely to spend more for
    the circuit board to put it on.

    Also, if the machine stops and starts, how will your RTC timer allow for
    this? With NVRAM, you could save its timer periodically to survive
    power-down. With a 16-bit counter, 512-bytes of NVRAM, and 100,000
    write cycles, you could save the timestamp every 5 minutes and run the
    machine for 25 years before exceeding the NVRAM specs. And/or detect
    power failing and save to NVRAM then. (You'd need a scheme to write in
    a loop to level the wear on the NVRAM, and scan NVRAM for the highest
    value upon restart.)

  12. Nick

    Nick Guest

    I have to retain the hours counted at power cut, which cannot be
    achieved using a controller as timer will stop totally or remain in
    running state if provided with battery backup. And using a RTC, allows
    me to save the counted hours in case of power fail.
    I can use a microcontroller, but the controller has only the work of
    seing the RTC alarm and giving it to the output. If the use of RTC
    alone does work out i will use the microcontroller.

    Thanks and regards,
  13. Why don't you just keep track of the time with a microcontroller
    running at 32kHz and forget the RTC?
  14. Nick,
    You seem to know a lot about what micros can and can't do, but do you
    really? You are making assumptions about the micro yet forgetting that
    the RTC requires power all-the-time to maintain it's count. Don't you
    think that a micro could operate in the same fashion? I'll tell you now
    that it can and yet it doesn't have to. You only need a capacitor to
    hold up the power long enough for the micro to commit the count to
    eeprom. What a lot of the in-the-know people have been saying to you is
    correct, "use a micro", it's cheaper yet more importantly, far more
    flexible for your application.

    You don't even need to run it at low-frequency or low-power as it only
    needs to run when the machine is working and for a fraction of a second
    thereafter. I have done very similar things maintaining run-time for
    warranty and service issues, and I certainly didn't use an RTC.

    Of course you can use an RTC without the micro, what's the big deal,
    it's not even really a question. The options have been put before you
    and they point in the favor of a micro but somehow you still seem
    determined to use an RTC. However, all being said, you decide for yourself.

  15. SioL

    SioL Guest

    Perhaps he never used them before and prefers a fully HW solution without the
    need to write any SW?
  16. "SioL"
    Maybe so, but it's going to be pretty challenging talking I2C to the RTC
    with pushbuttons. ;-)
  17. SioL

    SioL Guest

    Yep, that's true. :)

    How he is going about all this is strange indeed.

  18. Let's face it, this is a public forum on the subject of electronics
    intended for genuine queries that may be answered by helpful peers,
    which is great. It may also be used by not very bright nutters trying
    to build nasty things as described above. I'm just making sure people
    are fully aware that it wouldn't take a lot for any authority to
    generate a program to search these threads continuously and
    automatically for keywords and flag messages and their comentators for
    review. I am not implying that you cleverly mask your application if it
    is dodgy, I am however saying that genuine users be vigilant for this
    type of activity so as not to give the nutter the information they
    want, or unwitingly get themselves on some sort of 'list'.

  19. Unh, okay. I have this legitimate application wherein I would like to
    photograph "deer". These "deer" are quite skittish and I'd like to
    station myself some distance from the "camera" so they don't detect
    me. There can be quite a bit of electrical interference so I've
    decided a strong IR LED will give me the best chance of getting the
    perfect shot. I know there are many "hobbyists" who would like to
    build this circuit, so it should be made from easy-to-find parts such
    as consumer IR receiver modules and so on. Maybe a wireless camera
    link would allow me to be out of the line of sight of the "deer" while
    I'm waiting patiently to trigger the "shutter" (Bambi sipping from a
    babbling brook or something). Can anyone suggest a schematic?

    Best regards,
    Spehro Pefhany
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day