a Stopwatch for the 50... - Hewlett Packard

This is a discussion on a Stopwatch for the 50... - Hewlett Packard ; I need to time some processes, usually 1-2 minutes, occasionally longer. I only need 1 second or so accuracy. How do I get the hp50 to be a stopwatch for me? On the 48 it displayed seconds in the top ...

+ Reply to Thread
Results 1 to 20 of 20

Thread: a Stopwatch for the 50...

  1. a Stopwatch for the 50...

    I need to time some processes, usually 1-2 minutes, occasionally longer.
    I only need 1 second or so accuracy.
    How do I get the hp50 to be a stopwatch for me?

    On the 48 it displayed seconds in the top of the screen so I could just
    use that and remember the time it started.

    Are there any programs that function as a stopwatch?

    Thanks!

  2. Re: a Stopwatch for the 50...

    In article ,
    steve wrote:

    > I need to time some processes, usually 1-2 minutes, occasionally longer.
    > I only need 1 second or so accuracy.
    > How do I get the hp50 to be a stopwatch for me?
    >
    > On the 48 it displayed seconds in the top of the screen so I could just
    > use that and remember the time it started.
    >
    > Are there any programs that function as a stopwatch?
    >
    > Thanks!


    Try the following program, saved under whatever name you find
    convenient. Once started, it runs, displaying the time in seconds and
    tenths, until any key is pressed until any key (except the ON key) is
    pressed then it leaves the time on the stack:

    \<< TICKS \-> T
    \<< CLLCD STD
    DO TICKS T - B\->R 8192 / 1 RND 1 DISP
    UNTIL KEY
    END DROP TICKS T - B\->R 8192 / 1 RND 1 DISP
    \>>
    \>>
    Note that 8192 is the number of ticks by the HP50 internal clock in one
    second, at least ideally.

  3. Re: a Stopwatch for the 50...

    On Sep 18, 7:53*pm, Virgil wrote:
    > Try the following program, saved under whatever name you find
    > convenient. Once started, it runs, displaying the time in seconds and
    > tenths, until any key is pressed until any *key (except the ON key) is
    > pressed then it leaves the time on the stack:
    >
    > \<< TICKS \-> T
    > * *\<< CLLCD STD
    > * * * *DO TICKS T - B\->R 8192 / *1 RND 1 DISP
    > * * * *UNTIL KEY
    > * * * *END DROP TICKS T - B\->R 8192 / *1 RND 1 DISP
    > * *\>>
    > \>>
    > *Note that 8192 is the number of ticks by the HP50 internal clock in one
    > second, at least ideally.



    Minor correction: You want to delete the last
    1. DISP
    in order for the final time value to be left on level 1 of the stack.
    Otherwise, it is displayed on the screen for a split second before the
    program ends, leaving nothing on the stack.

    \<< TICKS \-> T
    \<< CLLCD STD
    DO TICKS T - B\->R 8192. / 1. RND 1. DISP
    UNTIL KEY
    END DROP TICKS T - B\->R 8192. / 1. RND
    \>>
    \>>

    Great program!

    S.C.

  4. Re: a Stopwatch for the 50...

    In article
    ,
    sc_usenet@hotmail.com wrote:

    > On Sep 18, 7:53*pm, Virgil wrote:
    > > Try the following program, saved under whatever name you find
    > > convenient. Once started, it runs, displaying the time in seconds and
    > > tenths, until any key is pressed until any *key (except the ON key) is
    > > pressed then it leaves the time on the stack:
    > >
    > > \<< TICKS \-> T
    > > * *\<< CLLCD STD
    > > * * * *DO TICKS T - B\->R 8192 / *1 RND 1 DISP
    > > * * * *UNTIL KEY
    > > * * * *END DROP TICKS T - B\->R 8192 / *1 RND 1 DISP
    > > * *\>>
    > > \>>
    > > *Note that 8192 is the number of ticks by the HP50 internal clock in one
    > > second, at least ideally.

    >
    >
    > Minor correction: You want to delete the last
    > 1. DISP
    > in order for the final time value to be left on level 1 of the stack.
    > Otherwise, it is displayed on the screen for a split second before the
    > program ends, leaving nothing on the stack.
    >
    > \<< TICKS \-> T
    > \<< CLLCD STD
    > DO TICKS T - B\->R 8192. / 1. RND 1. DISP
    > UNTIL KEY
    > END DROP TICKS T - B\->R 8192. / 1. RND
    > \>>
    > \>>
    >
    > Great program!
    >
    > S.C.


    Right!, My error from cutting and pasting instead of typing.

  5. Re: a Stopwatch for the 50...

    Hello

    There used to be a great stopwatch program for the 48 series written
    in ML by Hewlett-Packard.
    http://www.hpcalc.org/hp48/utils/time/stpwatch.zip
    Unfortunately it was never ported to the 49 series but hopefully
    somebody at HP could do this ?

    Regards,
    Andreas

  6. Re: a Stopwatch for the 50...

    > On the 48 it displayed seconds in the top of the screen so I could just
    > use that and remember the time it started.
    >
    > Are there any programs that function as a stopwatch?


    Press MODE, select DISP, then downarrow four times and check CLOCK to
    put the clock on the header line just like the 48.

    kiy

  7. Re: a Stopwatch for the 50...

    kiy wrote:
    > Press MODE, select DISP, then downarrow four times and check
    > CLOCK to put the clock on the header line just like the 48.


    Yes, that's true, but it's not very useful as a stopwatch. Because in the
    49 series the clock in the header does not show seconds, you would then have
    to count the flashes of the colon. The 48 series showed the seconds, making
    it a little more useful as a stopwatch.

    Regards,

    Eric Rechlin



  8. Re: a Stopwatch for the 50...

    On Thu, 18 Sep 2008 18:18:10 -0500, steve wrote:

    > I need to time some processes, usually 1-2 minutes, occasionally longer.
    > I only need 1 second or so accuracy.
    > How do I get the hp50 to be a stopwatch for me?


    Right-shift[hold]+TIME (or 94 MENU)

    Press TIME at start.

    Press TIME again at end.

    Press NXT HMS- (and change sign) for time difference (hh.mmss[.ss])

    You can convert hh.mmss to pure elapsed seconds,
    if desired, via HMS\-> 3600 *

    All of above in a menu (also preserves original times):

    { { } TIME { } { "diff:" TEXT }
    { "HMS" \<< DUP2 HMS- NEG \>> }
    { "SEC" \<< DUP2 HMS- NEG HMS\-> 3600 * \>> } }
    TMENU @ or MENU (to save as "custom" menu)

    > Are there any programs that function as a stopwatch?


    You can insert the above into a program, or:

    For all HP48/49/50, in UserRPL (Date: 1997/10/13)
    http://groups.google.com/group/comp....6?dmode=source

    [r->] [OFF]

  9. Re: a Stopwatch for the 50...

    With additional features:

    { { } { TIME \<< TIME "Time" \->TAG \>> }
    { } { "diff:" \<< MEM DROP \>> }
    { "HMS" \<< DUP2 HMS- NEG "hms-" \->TAG SWAP \>> }
    { "SEC" \<< DUP2 HMS- NEG HMS\-> 3600 * "sec-" \->TAG SWAP \>> } }
    TMENU @ or MENU (to save as "custom" menu)

    Press the "diff:" menu key during boring waiting periods,
    to make sure that no "garbage collection" will occur
    when marking the TIME, because "garbage collection"
    causes a brief "freeze," which could throw off the timing.

    Each item is now labeled on the stack.

    The "difference" functions now insert the time difference
    into the stack, between the two (start, end) actual times,
    allowing you to accumulate many actual times on the stack,
    inserting "split" times between each pair.

    The above works on all HP48/49/50

    In the original HP48 series,
    the time is thrown off slightly
    by the fact that the processor is a bit pre-occupied
    while any key (including a menu key) is making contact,
    causing differences in the "dwell time" of keypresses
    to affect the accuracy of the absolute time obtained.

    [r->] [OFF]

  10. Re: a Stopwatch for the 50...

    In article ,
    "John H Meyers" wrote:

    > On Thu, 18 Sep 2008 18:18:10 -0500, steve wrote:
    >
    > > I need to time some processes, usually 1-2 minutes, occasionally longer.
    > > I only need 1 second or so accuracy.
    > > How do I get the hp50 to be a stopwatch for me?

    >
    > Right-shift[hold]+TIME (or 94 MENU)
    >
    > Press TIME at start.
    >
    > Press TIME again at end.
    >
    > Press NXT HMS- (and change sign) for time difference (hh.mmss[.ss])
    >
    > You can convert hh.mmss to pure elapsed seconds,
    > if desired, via HMS\-> 3600 *
    >
    > All of above in a menu (also preserves original times):
    >
    > { { } TIME { } { "diff:" TEXT }
    > { "HMS" \<< DUP2 HMS- NEG \>> }
    > { "SEC" \<< DUP2 HMS- NEG HMS\-> 3600 * \>> } }
    > TMENU @ or MENU (to save as "custom" menu)
    >
    > > Are there any programs that function as a stopwatch?

    >
    > You can insert the above into a program, or:
    >
    > For all HP48/49/50, in UserRPL (Date: 1997/10/13)
    > http://groups.google.com/group/comp....6?dmode=source
    >
    > [r->] [OFF]


    However, if you want to time things over a time interval including
    midnight on the HP's clock, there will be problems.

  11. Re: a Stopwatch for the 50...

    On Fri, 19 Sep 2008 23:31:39 -0500, Virgil wrote:

    > If you want to time things over a time interval including
    > midnight on the HP's clock, there will be problems.


    Thanks for pointing that out, so here's a simple fix
    which can be inserted after each HMS- NEG

    DUP 0 < { 24 HMS+ } IFT

    Time intervals are still limited to 24 hours, however
    (just like many stopwatches

    [r->] [OFF]

  12. Re: a Stopwatch for the 50...

    In article ,
    "John H Meyers" wrote:

    > On Fri, 19 Sep 2008 23:31:39 -0500, Virgil wrote:
    >
    > > If you want to time things over a time interval including
    > > midnight on the HP's clock, there will be problems.

    >
    > Thanks for pointing that out, so here's a simple fix
    > which can be inserted after each HMS- NEG
    >
    > DUP 0 < { 24 HMS+ } IFT
    >
    > Time intervals are still limited to 24 hours, however
    > (just like many stopwatches
    >
    > [r->] [OFF]


    How about multiday timing with T0 containing the starting time and D0
    the starting date and doing:

    TIME T0 HMS- DATE D0 DAYS 24. * +

    Of course it will still come out in hours, minutes and seconds, but is
    certainly not limited to 24 hour periods.

    I make it possible, in theory at least, to time over 100 years this way.

  13. Re: a Stopwatch for the 50...

    On Sat, 20 Sep 2008 00:42:14 -0500, Virgil wrote:

    > How about multiday timing with T0 containing the starting time
    > and D0 the starting date and doing:
    >
    > TIME T0 HMS- DATE D0 DAYS 24. * +
    >
    > Of course it will still come out in hours, minutes and seconds,
    > but is certainly not limited to 24 hour periods.
    >
    > I make it possible, in theory at least, to time over 100 years this way.


    Not really, because calculator "interrupts" and resets internal TICKS
    right at end of its hard-coded 100 year calendar "window"!
    (as I learned from Joe Horn):
    http://groups.google.com/group/comp....f625dfaa7b2712
    http://groups.google.com/group/comp....4a62ddcf573d84
    (for more entertainment, click on "entire thread" links at top of each)

    And of course those 100-year batteries aren't that good

    Or 100 years without AC power loss,
    or 100 WEEKS without keyboard disintegration

    A list with { date time } could of course be "stacked" on each TIME press
    (calculating 24 * DDAYS plus time difference), but a bit messier;
    you would also probably no longer want answer in "seconds" --
    actually, you would probably no longer want just hh.mmss, either,
    but probably need to provide for complete
    years(360/365/366?),days,hours,minutes,seconds (in what format?)

    And what about a stopwatch for Methuselah? (or Bob?)
    http://www.freerepublic.com/focus/fr/623542/posts
    http://en.wikipedia.org/wiki/Methuselah
    http://www.imdb.com/title/tt0103241/

    Finally, isn't it possible for midnight to strike
    between the DATE and TIME commands?

    Mini challenge: first figure out what to do about that,
    before comparing answers with these fraternity house "past exams" files
    http://groups.google.com/group/comp....7fb0ae6a7a82f7
    http://groups.google.com/group/comp....89c8056947160/
    http://groups.google.com/group/comp....d8bb0be7ce09d/

    [r->] [OFF]

  14. Re: a Stopwatch for the 50...

    In article ,
    "John H Meyers" wrote:

    > On Sat, 20 Sep 2008 00:42:14 -0500, Virgil wrote:
    >
    > > How about multiday timing with T0 containing the starting time
    > > and D0 the starting date and doing:
    > >
    > > TIME T0 HMS- DATE D0 DAYS 24. * +
    > >
    > > Of course it will still come out in hours, minutes and seconds,
    > > but is certainly not limited to 24 hour periods.
    > >
    > > I make it possible, in theory at least, to time over 100 years this way.

    >
    > Not really, because calculator "interrupts" and resets internal TICKS
    > right at end of its hard-coded 100 year calendar "window"!
    > (as I learned from Joe Horn):
    > http://groups.google.com/group/comp....f625dfaa7b2712
    > http://groups.google.com/group/comp....4a62ddcf573d84
    > (for more entertainment, click on "entire thread" links at top of each)
    >
    > And of course those 100-year batteries aren't that good
    >
    > Or 100 years without AC power loss,
    > or 100 WEEKS without keyboard disintegration
    >
    > A list with { date time } could of course be "stacked" on each TIME press
    > (calculating 24 * DDAYS plus time difference), but a bit messier;
    > you would also probably no longer want answer in "seconds" --
    > actually, you would probably no longer want just hh.mmss, either,
    > but probably need to provide for complete
    > years(360/365/366?),days,hours,minutes,seconds (in what format?)
    >
    > And what about a stopwatch for Methuselah? (or Bob?)
    > http://www.freerepublic.com/focus/fr/623542/posts
    > http://en.wikipedia.org/wiki/Methuselah
    > http://www.imdb.com/title/tt0103241/
    >
    > Finally, isn't it possible for midnight to strike
    > between the DATE and TIME commands?
    >
    > Mini challenge: first figure out what to do about that,
    > before comparing answers with these fraternity house "past exams" files
    > http://groups.google.com/group/comp....7fb0ae6a7a82f7
    > http://groups.google.com/group/comp....d/28789c805694
    > 7160/
    > http://groups.google.com/group/comp....d/d76d8bb0be7c
    > e09d/
    >
    > [r->] [OFF]


    As I am, myself, extremely unlikely to last for anything like 100 more
    years, it was only speculative.

  15. Re: a Stopwatch for the 50...

    On Sat, 20 Sep 2008 13:22:52 -0500, for Virgil:

    > As I am, myself, extremely unlikely
    > to last for anything like 100 more years...


    But we can still think ahead for millennia to come!

    Wishing you long and fulfilling life
    (at least to outlast 100 calculators

    -[ ]-

  16. Re: a Stopwatch for the 50...

    In article ,
    "John H Meyers" wrote:

    > On Sat, 20 Sep 2008 13:22:52 -0500, for Virgil:
    >
    > > As I am, myself, extremely unlikely
    > > to last for anything like 100 more years...

    >
    > But we can still think ahead for millennia to come!
    >
    > Wishing you long and fulfilling life
    > (at least to outlast 100 calculators
    >
    > -[ ]-


    Thanks, I've only been thru about 12 to 15 HPs so far, so that bodese
    well.

    And, as you may have been through a few more than that, may you outlast
    at least 200 of them.

  17. Re: a Stopwatch for the 50...

    On Sep 18, 4:18*pm, steve wrote:
    > I need to time some processes, usually 1-2 minutes, occasionally longer.
    > I only need 1 second or so accuracy.
    > How do I get the hp50 to be a stopwatch for me?
    >
    > On the 48 it displayed seconds in the top of the screen so I could just
    > use that and remember the time it started. *
    >
    > Are there any programs that function as a stopwatch?
    >
    > Thanks!


    Hello,

    Another approach, if you want to display the seconds:

    << CLLCD DO DATE TIME TSTR 2. DISP UNTIL KEY END DROP >>

    This will display the date and current time, with seconds, in line 2
    of the display until a key is pressed.

  18. Re: a Stopwatch for the 50...

    In article
    <3a1d61f7-0dd8-4128-80d9-2ce584c0a0bc@w39g2000prb.googlegroups.com>,
    Jacob Wall wrote:

    > On Sep 18, 4:18*pm, steve wrote:
    > > I need to time some processes, usually 1-2 minutes, occasionally longer.
    > > I only need 1 second or so accuracy.
    > > How do I get the hp50 to be a stopwatch for me?
    > >
    > > On the 48 it displayed seconds in the top of the screen so I could just
    > > use that and remember the time it started. *
    > >
    > > Are there any programs that function as a stopwatch?
    > >
    > > Thanks!

    >
    > Hello,
    >
    > Another approach, if you want to display the seconds:
    >
    > << CLLCD DO DATE TIME TSTR 2. DISP UNTIL KEY END DROP >>
    >
    > This will display the date and current time, with seconds, in line 2
    > of the display until a key is pressed.


    You would need to save the first and last timestrings, or equivalent
    data, in order to have sufficient data after KEY to determine the time
    interval between starting and ending.

  19. Re: a Stopwatch for the 50...

    On Sep 19, 2:18 am, steve wrote:

    > Are there any programs that function as a stopwatch?


    I hesitate to post this as it's not very good, but a few months ago
    while waxing nostalgic about my 41CX (with built-in time module), I
    wrote a little stopwatch program for my own use. I got it working
    good enough for what I wanted (worse thing that can happen to a work
    in progress), so I never got around to formatting the output, fixing
    the midnight rollover issue, or doing better error checks. However,
    it does do multiple splits and is quite functional.

    Use it at your own risk. I haven't looked at the code in a few
    months. There's a #2DFF4h SYSEVAL (DispMenu.1) used several times, so
    use it only on a 49/50.

    Enjoy,
    -wes


    %%HP: T(0)A(D)F(.);
    @ Stop Watch
    @ Wes Loewer

    \<<
    RCLF RCLMENU 0. 0. 0. 0 \-> flags origmenu splitdisp starttime cumtime
    split
    \<<
    6. FIX
    CLLCD
    0. 1. DISP
    { "RESET" {} {} "START" "VIEW" "SPLIT" } TMENU @ just for labeling
    #2DFF4h SYSEVAL @ DispMenu.1

    @ flag 1 set means stopwatch has run since reset
    1. CF
    @ flag 2 set means stopwatch is currently running
    2. CF

    DO

    WHILE KEY NOT REPEAT
    IF 2. FS? THEN @ no key but clock is running
    TIME starttime HMS- cumtime HMS+
    1. DISP
    END
    END
    TIME @ get time right away
    \-> key time
    \<<
    CASE
    @ put start/stop first
    key 14. == THEN @ start/stop
    IF 1. FC? THEN @ if hitting start for 1st time since
    reset
    time 'starttime' STO
    0. 'cumtime' STO
    1. SF
    2. SF
    { "RESET" {} {} "STOP" "VIEW" "SPLIT" } TMENU @ just for
    labeling
    #2DFF4h SYSEVAL @ DispMenu.1
    ELSE @ stopwatch has run since reset
    IF 2. FC? THEN @ but is not currently running
    2. SF @ and needs to be started
    time 'starttime' STO
    { "RESET" {} {} "STOP" "VIEW" "SPLIT" } TMENU @ just for
    labeling
    #2DFF4h SYSEVAL @ DispMenu.1
    ELSE @ stopwatch is currently running
    2. CF @ and needs to be stopped
    time starttime HMS-
    cumtime HMS+ @ add to previous cumulated time
    DUP 'cumtime' STO @ and store back in cumtime
    1. DISP
    { "RESET" {} {} "START" "VIEW" "SPLIT" } TMENU @ just for
    labeling
    #2DFF4h SYSEVAL @ DispMenu.1
    END
    END
    END

    key 16. == THEN @ split
    IF 2. FS? THEN @ if the clock is running
    time starttime HMS- @ how much time since starting
    cumtime HMS+ @ add to previous cumulated time
    ELSE @ else clock is not running
    cumtime @ just use cumtime for split
    END
    1 'split' STO+
    "SPLIT#" split + \->TAG
    DUP 3. DISP
    END

    key 11. == THEN @ reset
    IF 2. FC? THEN @ only reset if stopwatch is stopped
    1. CF
    DEPTH split MIN DROPN
    0 'split' STO
    0. DUP 'cumtime' STO
    CLLCD 1. DISP
    END
    END

    key 15. == THEN @ view splits
    IF 2. FC? THEN @ if the clock is not running
    IF split 0. > THEN
    -41. KEYEVAL @ HIST key
    CLLCD
    IF DEPTH THEN
    DUP 3. DISP
    END
    cumtime 1. DISP
    #2DFF4h SYSEVAL @ DispMenu.1
    END
    END
    END

    key 25. == THEN
    IF split 0. > THEN
    splitdisp 2. - split MOD 1. +
    DUP 'splitdisp' STO
    PICK 3. DISP
    END
    END

    key 35. == THEN
    IF split 0. > THEN
    splitdisp split MOD 1. +
    DUP 'splitdisp' STO
    PICK 3. DISP
    END
    END
    END
    key
    \>>
    UNTIL 105. == 2. FC? AND END

    CLLCD
    flags STOF
    origmenu TMENU
    \>>
    \>>

  20. Re: a Stopwatch for the 50...

    On Sep 27, 6:15 am, steve wrote:
    > Wes,
    > Thank you for posting your stopwatch code! My son Byrel and I used it as
    > a base and added
    > some things to it. Take a look, maybe you can use some of it, maybe you
    > can suggest better ideas.


    Say, that's pretty good.

    I did think of a few things (and one really good thing), but perhaps I
    should send my code to you directly and we can exchange some ideas and
    then post our final program.

    Look for an email from me.

    -wes

+ Reply to Thread