Shop OBEX P1 Docs P2 Docs Learn Events
Could some one tell me after run this routine with the input ON for about five — Parallax Forums

Could some one tell me after run this routine with the input ON for about five

sam_sam_samsam_sam_sam Posts: 2,286
edited 2009-07-14 21:19 in General Discussion
The project code is below

What I mean by freezes is that the seconds are stop the display light is ON

This happen when you have a power loss and power up the Basic Stamp and Input at the same time

The display light is on when the input = 1 and seconds should be counting

If I turn·OFF the input = 0 and back ON· the Input = 1 then the second start running again


I have an idea that I may have to start the·clock at power up I will see tomorrow when I get home if this is cusing the problem

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

·
·
·
·
Sam

Post Edited (sam_sam_sam) : 7/14/2009 1:41:40 AM GMT

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-07-14 04:23
    Sam,

    At first glance I have some questions…like why are you clearing the write protect register on startup? The DS1302 Demo does this because you keep changing data. Normally when you’re not setting the time or writing data you’d want it in protect mode. But the commands you’re sending right after aren’t clear. They’re listed in binary and have no comment.

    I see you commented out a section that was supposed to start the clock, but just so you know that is only necessary when the DS1302 has completely lost power. If you’re using a battery backup you wouldn’t do that.

    It’s hard to tell because your code does a bit of jumping about…but it looks like in certain cases you may be exceeding the number of nested GOSUB commands you can have.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2009-07-14 21:19
    Chris

    It looks like in certain cases you may be exceeding the number of nested GOSUB commands you can have.

    Thank You for point this out to me I will see if I can put two routine together and only have four GOSUBs

    What do you do if you can not·put two routines·together and you have more than four GOSUBs what can you do in that case

    Can you give an example


    Thanks for the Info

    The DS1302 Demo does this because you keep changing data.
    ·Normally when you’re not setting the time or writing data you’d want it in protect mode.

    This was something that I was trying from one of the Demo that was in the Stamp Works and forgot to take it out

    ·But the commands you’re sending right after aren’t clear.
    They’re listed in binary and have no comment.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
Sign In or Register to comment.