HP 15C

Revision as of 04:25, 18 December 2022 by Phoenix (talk | contribs) (added the final quad speed mod result)

The HP 15C is a high-end scientific programmable calculator of the HP Voyager series.

HP 15C
TypeScientific
Introduced1982
Discontinued1989
CPU
ProcessorHP 1LF5, 1LM2, 1LQ9
Programming
Other

Features

Introduced in 1982 and discontinued in 1989 in favor of the Pioneers, it shares the shirt-pocket sized portrait housing with its Voyager siblings. Due to the limited keys available, this model utilized double shifts, marked as f and g and indicating functions printed in yellow and blue respectively, making most functions two-key combinations, with indirection for less used functions like matrix operations and conditional tests.

The backplate details the battery configuration, loop behavior of ISG and DSE, and the common metric to imperial conversions on the first row. On the second row, register usage breakdown for statistical functions, two-argument functions behaviors, error codes, program conditionals and matrix operations are provided. In the bottom right corner is an FCC legal disclaimer.

A ten digits plus negative indicator LCD without contrast adjustment. 7 mantissas (8 when exponents are positive) can be displayed at once, or 10 digits of decimal, depending on format setting (FIXed point, SCIentific notation, ENGineering notation). Five alphabetical labels (A-E) double as both matrix descriptors and programming labels.

Functionality wise, it is unique in all HP calculators in having a "complex stack". Complex numbers are stored in the cartesian form, with the real part in the X register. When in this mode HP 15C does math in radians mode save for coordinate conversions (which obeys the selected mode). CHS and stack clearing operations do not apply to the complex stack, and values can only be entered by appending the complex part with an I or using the Re<>Im swap function. Notably, SOLVE, integration and matrices only take account of the real stack. Other complex operations that have multiple solutions return one along a defined principal branch. behaviors This behavior is toggled by flag 8 and lights the C annunciator. To exit this mode user has to manually clear flag 8.

The HP-15C features 448 bytes of user-available RAM, allowing at most 64 numeric registers, or 224-448 lines of code each of two or one bytes. As a general rule of thumb, functions that use indirection or have a register as argument takes up two bytes as well as integration. User can DIMension the boundary of the register space, leaving memory to be allocated to program steps or in support of advanced functions as necessary. SOLVE function takes up 5 registers from the unallocated pool, 23 for numerical integration, but only 23 if used together. Toggling flag 8 to put calculator into complex mode takes another 5 and matrices cost 1 per matrix element. Enough memory must be available, or the calculator will raise an error. Ten flags, flag 0 to 9 are available (however no indicators are provided except flag 8 or 9).

The user can address 20 registers directly from R0 to R9 and then R.0 to R.9 (counting as 10-19). Two registers R0 and R1 are always available (DIM 2). The indirect register (i) can be used to address registers (such as STO, RCL, X<>), address matrices (in concert with value stored in R0 and R1, matrix elements), transfer program execution (negative value indicate line numbers), set flags and display formatting. according to the value stored in the I register. 10 tests and matrix operations (detailed on the backplate) can be called using their respective functions plus a numbered argument.

As with period HP calculators, numbers are stored as 7 bytes (56 bits), 10 digits decimal mantissa plus two digits exponent Binary Coded Decimal (BCD). Internally 13 digits are used for higher accuracy, but the result is always rounded to 10 digits when delivered to the X register.[1] In practice this results in a at worst 9th digit correct result for built-in functions, and at worst 5th digit correct result for individual components of complex result.[2] Numerical overflow will toggle flag 9, stop program execution (if any), return +/-9.999999999E99 and start blinking the display. Underflow is silent and return a 0. Flag 9 can be used standalone for blinking the display under program control without execution interruption.

Matrix math is implemented for up to 8x8 and supports common operations like LU decomposition, transpose and inversion. Singular matrices are perturbed slightly to avoid singularity. Euclidean (or Frobenius) norm and element wise absolute max can be calculated. Even complex matrices can be solved, expressing a complex matrix as a real matrix up to twice its size, as outlined below:

For the 2x2 complex matrix:
| a1+ib1 a2+ib2 |
| a3+ib3 a4+ib4 |

Partitioned form (4x2):                 
      | a1 a2 |                     Complex-like form (2x4):                     
      | a3 a4 |        Cy,x->              | a1 b1 a2 b2 |            
A^P = ---------                      A^C = | a3 b3 a4 b4 |                          
      | b1 b2 |        <-Py,x                                        
      | b3 b4 |

   /|\     MATRIX2
    |         |
 MATRIX3     \|/ 

Symmetry form (4x4):                                            
     | a1 a2 | b1 b2 |
     | a3 a4 | b3 b4 |
 A~ = ----------------
     | b1 b2 | a1 a2 |
     | b3 b4 | a3 a4 |

Which exploits the following relations:
For inverting: 
(Z^(-1))~ = (Z~)^(-1)
For multiplication:
(YX)^P = Y~X^P

Repair & Modification

Later models of HP-15C, powered by a 1LM2-0001 processor derives its clock signal from a parallel LC oscillator. Roughly around 1986 this circuit changed from throughole components mounted on the screen side of the PCB to using SMD components on the backside of the PCB. This allowed easy modification as only four rubber pads and four screws are required for access to it. For machines made in the transition period with provisions for both SMD and throughole construction, it is possible to cut the traces leading to the original capacitor or inductor, and solder new ones in place on the SMD pads. This mod is also applicable to the earlier machines as success has been reported on 1LF5 machines, which the screen and ICs are mounted on a separate PCB which is connected to the keyboard through a flexible link, although the exact procedure is not know.

In addition, for older HP-15C with throughole components, the bypassing capacitor that filters the powerline, and provide standby power for retaining RAM content while changing battery, is a 22uF electrolytic capacitor mounted inside the cutout under the battery compartment. For SMD type, this is replaced with a surface mounted 22uF mounted under the X-key position, far from the LC. This should ideally be replaced with a smaller capacitor near the LC and a larger one on the other pad, for both better filtering and longer standby time with increased standby current draw at higher clock rate.

As delivered, this circuit is composed of a 180uH inductor and 180pF capacitor. Since the oscillating frequency of a LC circuit is determined by f = 1/[2 x pi x sqrt( L x C )], swapping in a smaller capacitor or inductor will expectantly increase the clock frequency of the HP-15C, achieving an overlock. This procedure is also applicable to similarly constructed Voyagers. A caveat, however, is a 12-20pF (value of 15pF has also been reported) parasitic capacitance has been reported as a result of the circuit design, with the larger value likely a result of manual soldering of SMD components. This, as well as component variability, especially for small capacitor and inductors sourced through internet, should both be factored into when considering such a modification.

The quality factor of a series RLC circuit is Q = 1 / R x sqrt( L / C ), and ideally, care should be taken to maintain a similar (if not larger) L:C ratio for modifications. The resistance of inductors tends to be smaller given smaller inductance, due to the shorter coil length, all things being equal. A high quality factor indicates a less damped oscillator that dissipates less energy per cycle and oscillates more consistently around its central frequency.

Some modifications have been reported in literature, and we report some of the known speedups achieved:

Gerson W. Barbosa reported, in Septermber of 2006, on an earlier machine with throughole front mounted machine where the traces to the original capacitor was cut and new ones mounted. He reported a 12pF parasitic capcaitance, and reported speedup by timing execution of the self test (ON+X):

Gerson W. Barbosa's Reported Speed Gains
CPU Modification L Part Used C f / f0
1LM2 Replacement

of capacitor

180uH 100pF 1.27
82pF 1.38
50pF 1.7
47pF 1.75
39pF 1.88
33pF 2.00
27pF 2.15
22pF 2.30

Ken Sumrall reported, in around 1990, of attaching an additional inductor in parallel with the original. The reported speedup is determined by timing the execution of the self test (ON+X):

Ken Sumrall (brouhaha.com) Reported Gains on 1LM2
CPU Modification Part Used L C f / f0
1LM2 Addition of

parallel inductor

180uH 90uH 180pF 1.45
100uH 64uH 1.75
82uH 56uH 2.0
47uH 37uH 2.43
33uH 28uH 2.75
28uH 24uH 3.05
22uH 20uH 3.3
15uH 14uH 4.0
10uH 9.5uH 4.8
8.2uH 7.8uH 5.3
Ken Sumrall (brouhaha.com) Reported Gains on 1LF5
CPU Modification Part Used L C f / f0
1LF5 Addition of

parallel inductor

82uH 56uH 180pF 1.8
47uH 37uH 2.2
33uH 28uH 2.5
12uH 11uH 4.0

Karl Schneider followed the above method for a HP-11C with 1LF5 and reported ~2.5x for 33uH.

Takayuki Hosoda (Lyuka) reported in October of 2009, conducted comprehensive measurement and modification on 1LM2 machines and replaced both the inductor and capacitor. The speedup factor is derived by runtime required to solve the nqueen problem. The baseline performance is a time of 79:10.

Lyuka's Reported Gains on 1LM2
CPU Modification Part Used L Part Used C f / f0 note
1LM2 Replacement of both

inductor and capacitor

47uH 68pF 3.156 25:5
47pF 3.405 23:15
33pF 3.862 20:30
27pF 4.077 19:25

In addition, an bypass capacitor between 1 and 10uF, preferably the MLCC type is recomended to be added near the LC to the powerline for stable operation. The main bypassing capacitor is also recommended to be replaced with a 100uF capacitor for longer memory retention time during battery swap, and a protection diode of the BAT43 type across the battery terminal.

In September of 2022, Phoenix followed Lyuka's recommendations and derived an larger 20pF parasitic capacitance. The performance gain was measured using a pocket scope:

Phoenix's Reported Gains
CPU Modification Part Used L C f / f0 note
1LM2

(855kHz)

SMD

Replacement of both

inductor and capacitor

27uH

68pF

27uH 68pF 3.801 3.25MHz
47uH

68pF

47uH 68pF 2.959 2.53MHz
Replacement of inductor 47uH 47uH 180pF 1.942 1.66MHz
1LM2

(831kHz)

thruhole

Addition of inductor 27uH 23uH 180pF 2.852 2.37MHz
47uH 37uH 2.292 1.90-1.91 MHz

See also

References

  1. Eric A. Evett, Paul J. McClellan, and Joseph P. Tanzini: Scientific Pocket Calculator Extends Range of Built-In Functions, HP Journal, May 1983
  2. HP-15C Owner's Handbook, June 1987, Edition 1