The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

WP 34S: Beware!
Message #1 Posted by Marcus von Cube, Germany on 20 Apr 2012, 11:12 a.m.

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! :-)

      
Re: WP 34S: Beware!
Message #2 Posted by Les Wright on 20 Apr 2012, 11:17 a.m.,
in response to message #1 by Marcus von Cube, Germany

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.

Les

      
Re: WP 34S: Beware!
Message #3 Posted by fhub on 20 Apr 2012, 11:55 a.m.,
in response to message #1 by Marcus von Cube, Germany

Quote:
an attempt at IR printing.
I'm curious what will come next: BlueTooth, WLAN, ... ? ;-)
            
Re: WP 34S: Beware!
Message #4 Posted by Marcus von Cube, Germany on 20 Apr 2012, 12:08 p.m.,
in response to message #3 by fhub

Quote:

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


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

      
Re: WP 34S: Beware!
Message #5 Posted by W. Bruce Maguire II on 20 Apr 2012, 12:43 p.m.,
in response to message #1 by Marcus von Cube, Germany

Marcus:

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

Bruce.

            
Re: WP 34S: IR printing.
Message #6 Posted by Marcus von Cube, Germany on 20 Apr 2012, 1:54 p.m.,
in response to message #5 by W. Bruce Maguire II

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. :-)

                  
Re: WP 34S: IR printing.
Message #7 Posted by Thomas Chrapkiewicz on 21 Apr 2012, 9:57 a.m.,
in response to message #6 by Marcus von Cube, Germany

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

TomC

                        
Re: WP 34S: IR printing.
Message #8 Posted by Geoff Quickfall on 21 Apr 2012, 11:20 a.m.,
in response to message #7 by Thomas Chrapkiewicz

Salivating!

                  
Re: WP 34S: IR printing.
Message #9 Posted by Bart (UK) on 21 Apr 2012, 11:47 a.m.,
in response to message #6 by Marcus von Cube, Germany

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

      
Beware! Beware! Beware of the lightning there!
Message #10 Posted by Walter B on 20 Apr 2012, 3:43 p.m.,
in response to message #1 by Marcus von Cube, Germany

Couldn't resist ;-)

      
Re: WP 34S: Beware!
Message #11 Posted by Andrés C. Rodríguez (Argentina) on 20 Apr 2012, 7:25 p.m.,
in response to message #1 by Marcus von Cube, Germany

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$

            
Re: WP 34S: Beware!
Message #12 Posted by Katie Wasserman on 20 Apr 2012, 9:38 p.m.,
in response to message #11 by Andrés C. Rodríguez (Argentina)

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

http://commerce.hpcalc.org/82240b.php

http://www.calculatorsource.com/hp-82240b.html

http://internationalcalculator.com/hp82240b.html

http://shop.wfsleath.co.uk/hp-82240b-infrared-printer-for-hp17bii-hp50g-stock-available-4--266-p.asp

http://www.customcraftcorp.com/printer.htm

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:

http://www.sjdiscounttools.com/mdta087.html

http://www.drillspot.com/products/99057/Bacharach_24-1400_Wireless_Infrared_Printer

                  
Re: WP 34S: Beware!
Message #13 Posted by Bart (UK) on 21 Apr 2012, 11:42 a.m.,
in response to message #12 by Katie Wasserman

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:

http://www.calculatorsdirect.co.uk/ProductDetail.aspx?ProductId=319

http://www.thecalculatorstore.com/epages/eb9376.sf/en_GB/?ObjectPath=/Shops/eb9376/Products/%2282240B%20-%20new%22

http://www.calculators-online.co.uk/prod/4514/accessories/HP/HP-82240B_Infrared_printer/Hewlett_Packard_HP-82240B_Infrared_Printer.htm

            
Re: WP 34S: Beware!
Message #14 Posted by Marcus von Cube, Germany on 21 Apr 2012, 1:58 a.m.,
in response to message #11 by Andrés C. Rodríguez (Argentina)

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.

            
Re: WP 34S: Beware!
Message #15 Posted by uhmgawa on 21 Apr 2012, 2:04 p.m.,
in response to message #11 by Andrés C. Rodríguez (Argentina)

Quote:
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.

                  
Re: WP 34S: Beware!
Message #16 Posted by Andrés C. Rodríguez (Argentina) on 21 Apr 2012, 7:35 p.m.,
in response to message #15 by uhmgawa

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.

      
Re: WP 34S: Beware!
Message #17 Posted by Paul Dale on 21 Apr 2012, 12:27 a.m.,
in response to message #1 by Marcus von Cube, Germany

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.

            
Re: WP 34S: Beware!
Message #18 Posted by Marcus von Cube, Germany on 21 Apr 2012, 5:23 a.m.,
in response to message #17 by Paul Dale

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.

                  
Re: WP 34S: Beware!
Message #19 Posted by Paul Dale on 21 Apr 2012, 5:33 a.m.,
in response to message #18 by Marcus von Cube, Germany

Please.

Better still debug the code for me ;-)

- Pauli

                  
Re: WP 34S: Beware!
Message #20 Posted by Eduardo Duenez on 21 Apr 2012, 2:04 p.m.,
in response to message #18 by Marcus von Cube, Germany

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

Eduardo

                        
Re: WP 34S: Beware!
Message #21 Posted by Marcus von Cube, Germany on 21 Apr 2012, 2:35 p.m.,
in response to message #20 by Eduardo Duenez

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

                              
Re: WP 34S: Beware!
Message #22 Posted by Eduardo Duenez on 21 Apr 2012, 3:35 p.m.,
in response to message #21 by Marcus von Cube, Germany

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

            
Re: WP 34S: Beware!
Message #23 Posted by Paul Dale on 22 Apr 2012, 12:24 a.m.,
in response to message #17 by Paul Dale

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

                  
Re: WP 34S: Beware!
Message #24 Posted by Les Wright on 23 Apr 2012, 8:30 a.m.,
in response to message #23 by Paul Dale

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.

Les

                        
Re: WP 34S: Beware!
Message #25 Posted by Paul Dale on 23 Apr 2012, 5:42 p.m.,
in response to message #24 by Les Wright

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

      
Re: WP 34S: Beware!
Message #26 Posted by Les Wright on 23 Apr 2012, 8:25 a.m.,
in response to message #1 by Marcus von Cube, Germany

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

Les


[ Return to Index | Top of Index ]

Go back to the main exhibit hall