wp34S TIME Function


Hi Guys,

I know that the TIME function recalls the time from the internal clock, and I also believe that neither the 20b nor the 30b have a crystal. Yesterday I used SETTIM to set in the time of day in my 20b running wp34s, then checked back around 12 hours later and it was off by an hour and a half. (I kind of expected this....) Assuming that none of the available HP hardware platforms have a crystal to assure even modest accuracy, I wonder about the merits of having the TIME function occupying a precious position on the keyboard (even if it is on an h-shifted position), as opposed to being in the "X.FCN" menu like SETTIM, DATE and SETDAT. If this function is not going to be accurate, wouldn't one expect that no experienced user will ever press that button, and therefore something more useful could be "promoted" to the shifted keyboard?




Even with a crystal installed, the clock will only be more accurate if the firmware actually uses the additional hardware. If users here are interested, I can prepare a special version of the image with the crystal oscillator enabled.


Intention of TIME was using it for runtime measurements, i.e. for typical intervals of seconds to minutes.



A user is interested :-)

A separate file would be fine for me, but if it's inconvenient to provide/update perhaps the switch could be included as an X.FCN (something like "XTAL"). Downside is I think it will crash the calculator if executed without the appropriate hardware.

Other less crash prone possibilities:

- Use an X.FCN and prompt for confirmation, or

- Enable the crystal if a particular key is held down while coming out of a reset. This would need some kind of confirmation that it worked, though, after boot. Perhaps a message or number on the stack?

Having fun with the WP-34. Thanks for your efforts.


Edited: 26 Apr 2011, 7:39 p.m.


For anyone reading this who isn't as versed in the 20b/30b hardware...Remember, the base 20b / 30b does not have a crystal at all, which means you would have to physically add one to the unit before using a 34s image that sees the added hardware.

I think that's correct.

Edited: 26 Apr 2011, 7:44 p.m.


Can't we detect if the oscillator is present?

Either start using it and rely on the watchdog to recover enough to not use it if it isn't installed or insist on an extra solder connection is made to an IO pin when the crystal is installed. If you are already soldering two tiny capacitors and a crystal onto the board, one extra wire link isn't asking too much.

- Pauli


Both ideas are worth investigating. I start liking the watchdog idea.


i second this.

fwiw, i also think there should be a FIN (finance) menu. eg put L.R. into STAT and put FIN menu on h6. put TVM into the FIN menu.

would also like a way to use TVM (and other finance functions not yet implemented) without writing a program for the solver.

also CLP has no function outside of program mode (or does it?) perhaps this key (ie h-E) could do something else in normal mode.


A finance menu is quite improbable. We offer a scientific calc, we don't want to cannibalize HP's successful line of "business calculators". The few financial functions implemented (all starting with the letter % and thus easily accessed in X.FCN) may well vanish if we need the space for something important. And TVM was only added on my request, since IMHO it's one of the few advanced financial function being of use for common (wo)men. For more, please turn to the controller you trust in ;-) and his HP :-)



Ah, but I am busy sometimes. :-)

Seriously, one thing that would help with TVM the way it is now (which is fine to me) would be a flag that could detect digit entry, like flag 22 on the HP 41.

Is such a thing possible? Sorry if it is in the PDF already, but I didn't see it.


I don't think it is. I second the flag idea because it's useful in its own right. Clear the flag an a HALT and set it with any key that is not R/S or SST. We could even add a new conditional command ENTRY? So there is no need for the programmer to remember a numerical flag.


Like Flag 22 on the HP 41.

Marcus suggested an "ENTRY?" conditional that is essentially a flag test.

How does that sound as an enhancement?

Good for games (ha).

Would make coding a routine for the TVM command MUCH easier. Prompt. FS?22? sequence for example.

Although, I would only set the flag after a PROMPT or a R/S if a 0-9 or CHS has been pressed.

Edited: 26 Apr 2011, 3:51 p.m.


Although, I would only set the flag after a PROMPT or a R/S if a 0-9 or CHS has been pressed.

I disagree. What about values you've stored in registers before?


Then it would no longer be a digit entry flag :-)

- Pauli


Ah, let me rephrase. :-)


something like that. What was I thinking? Ha!


How about:


The prompt automatically clears the flag for you. So does anything else that stops program execution.

- Pauli


Sure. The only thing I would ask is to try making it work as much like the 41c as possible. Whatever set flag 22 on the 41c should set the ENTRY? flag on the 34s.

By the way... what about a pause? Does Pause allow for a digit entry? (yes, I know I could check it :-) but my 34s is not at hand!)


PSE does not allow digit entry, it just gets interrupted by a key press so you can shorten a programmed pause by pressing any key.



PROMPT is the command designated for digit or alpha entry. Good ol' STOP does it, too, but without message output. PSE may be used for message output, but doesn't allow for input. That's it IIRC.


P.S.: We are not featuring INPUT yet (as employed in HP-42S).

Edited: 27 Apr 2011, 10:55 a.m.


We don't have this feature.

I like the ENTRY? conditional test for this.

Will have a think about this.

- Pauli


There are several things being confounded:
Was a key pressed? (I'm doing my thing, user wants to provide input.)
Was a prompt answered? (I asked and wait.)
Was a number pressed? (are . or eex numbers?)
Was a digit pressed? (what about hex digits?)
Was a shift key pressed? (which?)
Which key was pressed?
Should the shift state change?

If the user wants to interrupt, I'm not into this project enough to provide input.

If the user has been asked,
would seem sufficient, if it waits and returns a value indicating which key was pressed. There are two especially handy things to return, a numeric value which indicates a key (0..99, zero meaning no key and we timed out waiting) or a set indicating a key (an array of bits, KEY, zero other than that bit that corresponds to the key; useful with boolean operations to branch depending on the values. If KEY and DIGITS then ... If KEY and HEXDIGIT then ...)


I'm with Walter here. No financial catalogue. Ever.

This is a scientific device. We barely have space for the scientific functions we want to include. We certainly don't have space to do even a half hearted financial function set as well let alone a proper financial implementation.

Doing TVM properly will require a lot more space than the current pathetic implementation. We'd actually have to care about accuracy and probably use different solving methods for each of the different parameters. I really don't want to go there -- this is not simple stuff to get right.

If you want a financial calculator, don't reflash your 20b / 30b :-)

CLP does what CLP does on many vintage HPs in run mode.
Watch the BEG annunicator carefully.

- Pauli


In addition we can program TVM and other financial calculations if so desired. That's the beauty of a programmable calculator.


We can probably find a suitable program for the common financial functions in the Museum's own program listing - or adopt and port a program from any of the HP's manuals.

Edited: 27 Apr 2011, 10:13 p.m.


We considered this one long and hard and the poor accuracy was mentioned several times. I certainly agree that the clock is hopeless as it stands. However, both the 20b and 30b have pads on the circuit board for a crystal (& two capacitors) the addition of which would make the time keeping (more) reasonable.

Personally, I don't mind if the time functions are kept or removed (not the date ones of course). This would save a small amount of code but not a great deal. It would free up one of the most precious of resources -- a key.

For program timings we've got the TICKS command which is basically as good or better.

- Pauli


Speaking for Jake here, but perhaps it is the keyboard spot being used for TIME that is a higher concern, given its limited utility?

Since it may only be used sparingly, perhaps placement in X.FCNS and something else brought out to the keyboard might be more useful?

Just a thought.


Speaking for Jake here, but perhaps it is the keyboard spot being used for TIME that is a higher concern, given its limited utility?

Agreed. It is not that the TIME function is included - by all means, I would NOT vote to have it removed from the firmware. I would only vote to swap it off the keyboard with something more useful on a day-to-day basis with something else in a catalog.



What Jake says!


Hi again,

I was just thinking how I miss the "LAST X" function not being on the keyboard. Perhaps that would be a worthy replacement for "TIME", should the decision be made. Then, pressing CPX LASTx would preform the complex version as well.



Last X is actually invoked by RCL L. Well designed IMO, but I would have preferred RCL ENTER for Last X. Seems more natural for a RPN, again IMO.


... I would have preferred RCL ENTER for Last X. Seems more natural for a RPN, again IMO.

Understand. But no way to get L there :-) And ENTER is the only key wide enough to take CONST.



I was just thinking how I miss the "LAST X" function not being on the keyboard. Perhaps that would be a worthy replacement for "TIME", should the decision be made. Then, pressing CPX LASTx would preform the complex version as well.

We had it there for a very long time, however RCL L (RCL EEX) serves the same purpose and also requires two keystrokes -- there is no way LASTx will get an unshifted position. You can do CPX RCL EEX for the complex lastx.

We've still got the code for last x and complex last x in the firmware image. I guess I should remove them since they cannot be accessed anymore.

- Pauli


RCL L is good for lastX.


You can do CPX RCL EEX for the complex lastx.

As long as complex "RCL L" (or RCL EEX) recalls both L *and* I registers. It is kind of a misnomer to call it "CPX RCL L" in that case; complex "Last x" is closer to the actual meaning IMHO. I understand the thinking, however.



To make it crystal clear: The command is called LASTx. The keystrokes are RCL L. In complex domain, the command is CLASTx and the keystrokes are CPX RCL L. All this is readily readable in the manual. According to the bible: "Those having eyes for reading, read!"

HTH (but doubt it)


Edited: 27 Apr 2011, 1:56 p.m.


All this is readily readable in the manual.

Okay okay.... and Bill Wickes had a great proverb of his own: "Never piss off a volunteer". I am sorry, Walter, we have supported your efforts for a bunch of years now, but you are getting a bit too pompous for us volunteers.



... but you are getting a bit too pompous for us volunteers.

AFAIK this whole project is a work of volunteers, mainly of two of that kind being mad enough to pursue it for some 30 months. In the last few weeks the number of volunteers has increased steeply. Please note that a lot of thought went into that project in those months before, when many volunteers of today volunteered elsewhere. They are free to do this, of course, but then they should please show a little respect for the work done - be it only by reading thoroughly before claiming anything.

On topic again: Math is mainly about terms and definitions and then playing with them. So it's important IMHO not confusing things, for the sake of math.


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP50g: Writing a function that returns a function Chris de Castro 2 822 12-10-2013, 06:49 PM
Last Post: Han
  [HP Prime]How to get Discrete-Time Fourier Transform uklo 0 585 11-18-2013, 08:02 PM
Last Post: uklo
  Date/time formats R. Pienne 4 892 11-01-2013, 12:43 PM
Last Post: Marcus von Cube, Germany
  How to set the Date.Time etc on a WP34S Harold A Climer 4 846 10-29-2013, 09:32 PM
Last Post: FORTIN Pascal
  Prime: Exam mode (possible duplicate after funny response first time) Paul Townsend (UK) 1 553 10-24-2013, 03:09 PM
Last Post: Tim Wessman
  Date/time programs for the HP 35s R. Pienne 0 433 10-03-2013, 02:37 PM
Last Post: R. Pienne
  Nothing like passing the time away... Eddie W. Shore 2 539 03-21-2013, 08:23 AM
Last Post: Eddie W. Shore
  New compile-time options for WP-34S Nigel J Dowrick 15 1,790 01-29-2013, 03:25 PM
Last Post: Stephan
  [WP34s] RSD function Dieter 11 1,340 01-29-2013, 08:58 AM
Last Post: Walter B
  Date & Time disappear on WP 34S René Franquinet 16 2,103 12-10-2012, 08:24 AM
Last Post: Walter B

Forum Jump: