▼
Posts: 3,283
Threads: 104
Joined: Jul 2005
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! :-)
▼
Posts: 1,368
Threads: 212
Joined: Dec 2006
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
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
an attempt at IR printing.
I'm curious what will come next: BlueTooth, WLAN, ... ? ;-)
▼
Posts: 3,283
Threads: 104
Joined: Jul 2005
Quote:
I'm curious what will come next: BlueTooth, WLAN, ... ? ;-)
We'll probably add a DVD drive... ;-)
Posts: 180
Threads: 23
Joined: Apr 2012
Marcus:
Wow; IR printing would be great! I hope your investigations go well!
Bruce.
▼
Posts: 3,283
Threads: 104
Joined: Jul 2005
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. :-)
▼
Posts: 263
Threads: 42
Joined: Aug 2007
IR printing (HP82240) would be most useful! Hope it works.
TomC
▼
Posts: 1,083
Threads: 126
Joined: Sep 2006
Posts: 850
Threads: 10
Joined: Mar 2009
And I've just got some new paper rolls for my HP82240B, so I'm ready to go! :-)
Posts: 4,587
Threads: 105
Joined: Jul 2005
Posts: 1,193
Threads: 43
Joined: Jul 2005
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$
▼
Posts: 1,477
Threads: 71
Joined: Jan 2005
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
▼
Posts: 850
Threads: 10
Joined: Mar 2009
Posts: 3,283
Threads: 104
Joined: Jul 2005
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.
Posts: 384
Threads: 18
Joined: Sep 2010
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.
▼
Posts: 1,193
Threads: 43
Joined: Jul 2005
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.
Posts: 3,229
Threads: 42
Joined: Jul 2006
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.
▼
Posts: 3,283
Threads: 104
Joined: Jul 2005
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.
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
Please.
Better still debug the code for me ;-)
- Pauli
Posts: 56
Threads: 10
Joined: May 2006
Where are the latest versions available? Latest files available for direct download from Sourceforge still have dates April 12 & 14.
Eduardo
▼
Posts: 3,283
Threads: 104
Joined: Jul 2005
You need to go to the SVN tree. Directions are on the site.
▼
Posts: 56
Threads: 10
Joined: May 2006
OK, I'll try to figure it out. Thanks.
Posts: 3,229
Threads: 42
Joined: Jul 2006
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
▼
Posts: 1,368
Threads: 212
Joined: Dec 2006
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
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
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
Posts: 1,368
Threads: 212
Joined: Dec 2006
I have kept up to 2864 on both my units so far and nothing has blown up yet!
Les
|