WP 34S: Beware!


We are busily working on several topics so the most recent updates to the SVN tree are most probably NOT WORKING! Revision 2830 is the latest to be trusted.

Pauli is redesigning the solver as a keystroke implementation (with some support from native code) to save space. I'm wasting the space gained with an attempt at IR printing. Stay tuned! :-)


Thanks for the warning.

I have been updating both of my units so frequently I live in fear of toasting the flash memory before its time.

I look forward to giving the machines a break while you fellows work your magic.



an attempt at IR printing.

I'm curious what will come next: BlueTooth, WLAN, ... ? ;-)



I'm curious what will come next: BlueTooth, WLAN, ... ? ;-)

We'll probably add a DVD drive... ;-)



Wow; IR printing would be great! I hope your investigations go well!



I don't have the transmitter built yet but the pulses on my scope look promising. I'm using the pin marked RS232ON in the schematics which is connected to TIOA0, a timer output capable of driving 4mA. Moreover, the pin is routed to a pad where a transistor and a resistor can be soldered. (This was originally conceived to power a level converter chip.) This seems to be the ideal place to add an IR diode. The pulses are being generated by the timers 0 and 1 which are chained in a way that TC1 gates the clock of TC0 to generate a sequence of bursts of 7 pulses each. A single interrupt at a reasonable rate (32KHz/14, one half bit time) suffices to create a variable pattern of bursts. I have high hopes that the printer will be happy. :-)


IR printing (HP82240) would be most useful! Hope it works.





And I've just got some new paper rolls for my HP82240B, so I'm ready to go! :-)


Couldn't resist ;-)


Just a humble opinion:

As the HP IR printer has been discontinued long ago, and as it's not very frequent or easy to have one handy (or to buy one for that matter) and, even for those who have it already, it seems not easy to fix or maintain, and since it's output is rather limited for current standards, and...

If you really want to put some I/O (or at least the /O part of it) into the WP34S, would you consider a standard IR protocol like IRDA (serial IR), instead of the HP proprietary protocol, which is 25 years old, and has been implemented in only one product (printer, I mean).

Just my 0.10 AR$


While the HP82240B was discontinued some time ago, it's still available new at several on-line stores. For example:






There are also a few old emulators for the printer, but I haven't tried them.

While this is ancient technology it's still used not only for calculator output but for all sorts of portable instrumentation printing. I think that there are other similar printers that will function like an HP82240 too. Perhaps these:




Interesting alternatives, considerably more expesive than the HP ones though.

You listed one UK shop, here are some other UK/Europe online stores that stock the HP82240B:





IRDA is too complicated in my opinion. And the pin I'm using is not connected to any UART device, either. I'll stick to the HP protocol for the time being.

Edit: IRDA would need an input making the necessary modifications even more complicated.

Edited: 21 Apr 2012, 5:24 a.m.


As the HP IR printer has been discontinued long ago, and as it's not very frequent or easy to have one handy (or to buy one for that matter) and, even for those who have it already, it seems not easy to fix or maintain, and since it's output is rather limited for current standards, and...

If you really need a portable printer there's probably a case
to be made for it. Otherwise except for experimentation or
nostalgia I don't quite see a practical motivation.

The problem I have with that protocol is the effective throughput
yielding about 78 bytes/sec which is abysmally slow. The error
correction is a little unconventional although that doesn't
affect the task here, for it to scale an a generally useful
interconnect more receivers are necessary. [Incidentally I've
seen some pretty sloppy timing generated (eg: substantial jitter)
from saturn devices where I had to resort to an averaging
data slicer to reliably recover the data stream.]

In any case without the ability of bidirectional communication,
unrecoverable error detection and recovery requires human intervention.

My approach would probably be to place an outboard US$3 IRDA
module driven by a US$1 uC to deal with the timing and protocol,
and conserve every possible byte of that scarce sam7 flash.
This would also scale to end users better from both mechanical
and retrofit complexity perspectives.


I agree! However, I will consider trying to buy an HP IR printer...

About the protocol throughput: I think that those 78 bytes per second were appropriate for a character-oriented, battery-powered thermal printer.


Okay, we have a new solver. About half a kilobyte of flash saved for other purposes.

I managed to get Ridder's steps in as well as the others from the C solver (quadratic interpolation, secant method and bisection) which seems to assist with some functions, but not really hurt with others I've tried.

Of course, this means lots and lots of new solver bugs. Please let us know if any oddities are found.

Additionally, I've put the solver source code into a library file in case people want to try to improve it or submit bug fixes.

- Pauli

Edited: 21 Apr 2012, 12:53 a.m.


I've rebuild everything. It would be nice if someone would start testing the new code on both the device and the (classic) emulator. The Qt emulators aren't affected yet.



Better still debug the code for me ;-)

- Pauli


Where are the latest versions available? Latest files available for direct download from Sourceforge still have dates April 12 & 14.



You need to go to the SVN tree. Directions are on the site.


OK, I'll try to figure it out. Thanks.


In addition to doing Ridder's steps if able, the new solver has an updated termination condition -- if the bounds surrounding the solution are with 5 ULP of each other, a final estimate is made and that is returned. If the bounds produce function values of opposite sign, the final estimate is guaranteed to be within the 5 ULP interval, otherwise, it is likely. This is better than the approximately equal bounds I'd used before I think.

The display mode is still used for the approximately equal to zero test, but this only really matters in FIX modes.

The maximum number of iterations has been increased, although this doesn't seem necessary all that often, quadratic interpolation and Ridder's method both converge very rapidly.

I'm also toying with forcing extra bisection steps instead of secant ones occasionally to bring Ridder's method more into play. Since it requires the interval mid-point function evaluation, it can only be applied after a bisection step.

- Pauli


Pauli, when moving the statistical code to XROM as planned, will the inverse distribution estimates we have discussed here continue to be refined via their own dedicated Newton routines, as we see in the newton_qf() routine in stats.{c,h}, or can space and time be saved by using the calculators own solver? I just ask because the improvements have meant the TVM program finally works when computing an interest rate from other parameters instead of throwing a "no root found" error, so I thought it might be up to the job.



At this stage I don't know. I'd likely start with the special Newton solver -- it takes advantage of the derivative (the pdf) of the cdf being solved and has a few adjustments to help avoid problems -- jump limiting, domain limiting. I also don't much like the approximate tests in the solver when I'm attempting to get full accuracy.

It would be possible to find out if the updated solver is up to the task or not -- write a user program that returns the cdf and solve that. Anyone care to give this a try?

- Pauli


I have kept up to 2864 on both my units so far and nothing has blown up yet!


Possibly Related Threads...
Thread Author Replies Views Last Post
  [WP-34S] Unfortunate key damage with update to V3 :( svisvanatha 5 943 12-10-2013, 11:37 PM
Last Post: Les Bell
  WP-34S (Emulator Program Load/Save) Barry Mead 1 530 12-09-2013, 05:29 PM
Last Post: Marcus von Cube, Germany
  DIY HP 30b WP 34s serial flash/programming cable Richard Wahl 2 749 12-04-2013, 11:14 AM
Last Post: Barry Mead
  WP 34S/43 ?'s Richard Berler 3 676 11-10-2013, 02:27 AM
Last Post: Walter B
  My FrankenCulator (wp-34s) FORTIN Pascal 4 690 11-09-2013, 06:18 PM
Last Post: FORTIN Pascal
  WP 34S Owner's Handbook Walter B 5 907 11-09-2013, 05:34 PM
Last Post: Harald
  wp 34s overlay and programming. FORTIN Pascal 6 924 11-08-2013, 01:28 PM
Last Post: Nick_S
  m.dy in display of WP-34S Harold A Climer 3 577 11-05-2013, 11:28 AM
Last Post: Andrew Nikitin
  WP 34s : An old problem coming back Miguel Toro 2 523 11-05-2013, 03:00 AM
Last Post: Marcus von Cube, Germany
  [WP 34s] Pressure Conversion Factors Timothy Roche 8 1,019 11-04-2013, 07:17 PM
Last Post: Dave Shaffer (Arizona)

Forum Jump: