![]() |
WP-34s clock program - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: WP-34s clock program (/thread-244779.html) |
WP-34s clock program - Andrew Nikitin - 06-06-2013 I wrote this program to display internal clock. LBL'CLK'Exit interrupts program and leaves time on stack.
I take extra effort to avoid unnecessary screen updates (update screen only when time changes) and also I use PSE 09 to reduce amount of busy wait. LBL'CLK'
Edited: 6 June 2013, 11:02 p.m.
Re: WP-34s clock program - anetzer - 06-08-2013 Did I get something wrong? I only had Time showing on the Display after changing the VIEW[alpha] to VW[alpha]+.X
Before that the Display only showed "TIME" in the upper line and three hyphens in the numeric section.
Re: WP-34s clock program - Andrew Nikitin - 06-08-2013 Quote:Like in T, I, M, E? 4 characters? Here is what it looks like on my calc: ![]()
I do not show rX contents because it is the same time, just formatted as decimal fraction.
Re: WP-34s clock program - Andrew Nikitin - 06-08-2013 Here is what my entire time program look like.
Instruction: Nothing fancy, really.
LBL C Re: WP-34s clock program - Marcus von Cube, Germany - 06-09-2013 anetzer, you must have entered the word TIME in alpha mode. There is a command in the alpha catalog the formats the X register as a time value and puts the result the alpha register. Use this instead.
Re: WP-34s clock program - Marcus von Cube, Germany - 06-09-2013 Andrew,
always avoid using busy waits on the WP34s (and similar machines). A tight loop runs at the full processor speed quickly draining the batteries (at a rate of about 30 to 40 mA). A PSE command, on the other hand, puts the processor in a low power sleep mode consuming only a few micro A.
Re: WP-34s clock program - anetzer - 06-09-2013 You're so right. I took "[alpha]TIME" as instruction to input an alpha string. The following seems to work and leave the stack in order:
001 LBL C And if we drop the power-hungry loop?
001 LBL C Re: WP-34s clock program - Walter B - 06-09-2013 I can see no difference in power consumption between your two programs here - you just drop two dispensable steps IMHO.
d:-)
Re: WP-34s clock program - Andrew Nikitin - 06-09-2013 Marcus, thank you for explanation. I will use it as a guidance.
|