Showing posts with label HP 67. Show all posts
Showing posts with label HP 67. Show all posts

Saturday, June 6, 2026

RPN: Solving T * w + Z = Y * w + X (featuring DM42, HP 67)

RPN:   Solving T * w + Z = Y * w + X  (featuring DM42, HP 67)


Introduction and Code



This is inspired in part by the new Casio fx-92 being released where it has added the linear equation:

ax + b = cx + d



( https://tiplanet.org/forum/viewtopic.php?p=280173&sid=2174c3a99692ac8898ff3957db84031a#p280173 (in French), retrieved February 6, 2026)



Solve the equation for w:

T * w + Z = Y * w + X


where the solution is w = (Z – X) ÷ (Y – T)


The values for T, Z, Y, and X are taken directly from the four-level classic RPN stack.



HP 42S/DM42/HP 41C (programmed with a DM42) Code


LBL “TZYX1”

x<>y

R↓

-

R↓

-

R↑

x<>y

÷

RTN



HP 67 Code


001: LBL A; 31, 25, 11

002: x<>y; 35, 52

003: R↓; 35, 53

004: -; 51

005: R↓; 35, 53

006: -; 51

007: R↑; 35, 54

008: x<>y; 35, 52

009: ÷; 81

010: RTN; 35, 52



Stack Results:


Start

Finish

T

Z - X

Z

Z - X

Y

Y

X

(Z – X) ÷ (Y – T) = W (solution)



Examples


Example 1: 5 * w + 20 = 10 * w + 30


T: 5

Z: 20

Y: 10

X: 30


Solution: w = -2




Example 2: 3 * w – 18 = -2 * w + 16


T: 3

Z: -18

Y: -2

X: 16


Solution: w = 6.8




Example 3: 5 * w + 3 = w + 2


T: 5

Z: 3

Y: 1

X: 2


Solution: w = -0.25




Eddie


All original content copyright, © 2011-2026. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, April 25, 2026

TI-84 Plus CE: Beam Pattern for Uniform Array

TI-84 Plus CE: Beam Pattern for Uniform Array




Introduction



The following formula calculates an antenna’s normalized beam response in decibels given the following:



* the number of sensors of an antenna

* the wavelength of the beam pattern

* the angle incident of the wavelength from the ground, in degrees.

* the steering angle of the array, in degrees; which is measured from the zenith, starting directly upwards with the angle going downwards.



The program calculates the response in from a range of incident angles.



R(ΘI) = [ sin(180 * n * d * (sin(ΘI) – sin(ΘS) ÷ λ ] ÷ [ n * sin(180 * d * (sin(ΘI) – sin(ΘS) ÷ λ ]

If the denominator is 0, then the response is 0 dB.



Variables:

n = number of sensors

d = spacing between sensors

λ = wavelength

ΘI = incident angle

ΘS = steering angle



TI-84 Plus CE Code: BEAMPTN



ClrHome

Degree

Disp “BEAM PATTERN”, “BY STEPHEN A HERTZ”, “(HP 67 ANTENNAS)”

Input “NO. SENSORS? “, N

Input “INTERIOR SPACING? “, D

Input “WAVELENGTH? “, L

Input “STEERING Θ°? “, S

Input “STARTING ΘI? “, I

Input “NO. PTS? “, K

Input “CHG Θ°? “, J

For(Θ, I, I+K*J, J)

180 * D / L → A

sin(Θ) – sin(S) → B

N * sin(A * B) → R

If R=0

0 → R

Else

sin(N * A * B) / R → R

20 * log(abs(R)) → R

End

ClrHome

Disp “ΘI=”, Θ, “R (DB)=”, R

Pause

End



Example



Input:

n = 6

d = 36 ft

λ = 100 ft

ΘS = 0° (steering angle)

Range: ΘI = starting at 0°, 5 calculations, in increments of 5°



Results:

K =

ΘI =

R(ΘI) =

0

0

0

1

5

-0.4983317822

2

10

-2.056358346

3

15

-4.9617921711

4

20

-9.809670689



The negative response signifies that there is a reduction of signal strength.



Source



Hertz, Stephen A. “Beam Pattern for Uniform Array” HP-67/HP-97: Users’ Library Solutions: Antennas. Hewlett Packard. Corvallis, OR. Rev. D. April 1979. pp. 24-27




Eddie


All original content copyright, © 2011-2026. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, March 28, 2026

Casio fx-4000P: Antennas

Casio fx-4000P: Antennas



Vertical and Horizontal Bandwidth


Given the height (h) and length (l) of an antenna plate, along with wavelength (λ) given from the antenna, the vertical and horizontal bandwidth, in degrees is calculated as:


Vertical Bandwidth:

ßv = (k * λ * 180) ÷ (h * π)


Horizontal Bandwidth:

ßh = (k * λ * 180) ÷ (l * π) = h * ßv ÷ l


The constant k is the antenna taper factor, which in the original program assigned the constant as k = 1.4.


Casio fx-4000P Program Code (Prog 0)


“HEIGHT” : ? → H :

“LENGTH” : ? → L :

“WAVE. L.” : ? → W :

“VERT-BAND=” ◢

252 × W ÷ H ÷ π → V ◢

“HOR-BAND=” ◢

H × V ÷ L → Z


Example 1:

Input: H: 2.4 ft (height), W: 12.4 ft (width), λ: 0.18 ft (wavelength)

Results:

Vertical Bandwidth: 6.016056849°

Horizontal Bandwidth: 1.1643981°


Example 2:

Input: H: 3.8 ft (height), W: 3.6 ft (width), λ: 0.05 ft (wavelength)

Results:

Vertical Bandwidth: 1.05544857°

Horizontal Bandwidth: 1.114084602°



Convert from Frequency to Wavelength


This program converts frequency (Hz) to wavelength (ft).


λ = c ÷ f


Using c as the speed of light in a vacuum (299,792,458 m/s), a conversion is required (1 m ≈ 3.28084 ft).


Casio fx-4000P Program Code (Prog 1)


“FREQ” : ? → F :

“WAVE L.=” ◢

299792458 ÷ F × 3.28084



Example 1:

Input: freq = 6200 MHz (6200E6)

Results: 0.158640498 ft



Example 2:

Input: freq = 8500



Equivalent Antenna Area



The equivalent area given the gain of the antenna in decibels (dB):



Ae = (λ² * 10^(G ÷ 10)) ÷ (4 * π)



Casio fx-4000P Program Code (Prog 2)



“GAIN” : ? → G :

“WAVE L.” : ? → W :

“AREA=” ◢ W² × 10^(G ÷ 10) ÷ 4 ÷ π → A



Example 1:

Input: gain = 28 dB, λ = 0.12 ft

Results: 0.7230238578 ft²



Example 2:

Input: gain = 49 dB, λ = 0.19 ft

Results: 228.1903833 ft²



Source


Hewlett Packard. HP-67/HP-97: Users’ Library Solutions: Antennas. Rev. D April 1979. pp. 32 – 26.



Eddie


All original content copyright, © 2011-2026. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Thursday, October 30, 2025

HP 67 Programs… Almost 50 Years Later

 HP 67 Programs… Almost 50 Years Later


Both downloads are in PDF format. This is for use for the HP 67 and its emulators, or really almost any RPN scientific calculator. Enjoy!



Volume 1:


https://drive.google.com/file/d/114H4D0hcOjxDj_MHQNvwDBUJV3chlpdC/view?usp=sharing


Countdown of HP 67 "seconds"

Random Numbers

Snell's Law

Circle: Area and Circumference

Sphere: Surface Area and Volume

Angle Between 2 Lines with Slopes x and y

Sum of Powers

Adding Complex Numbers

Multiplying Complex Numbers

Complex Number to a Real Power

Permutation

Combination (with duplicating X and Y stack values)

Speed of Sound Approximation (in meters per second)

Finance: Present Value Annuity Factor (including setting N and I% with monthly payments)

Distance Between Two Points (x,y) and (z,t)

Horizontal Curve


Volume 2:

https://drive.google.com/file/d/1RPK2C879JeiyReox1SOTeAOQc_7QYdUN/view?usp=sharing

Sigmoid Function

Logit Function

Solving Linear Equations

Solving Monic Quadratic Polynomials (real roots only)

Intensity of a Spherical Light Source

Determinant of a 2 x 2 Matrix

Air Density of Dry Air

Time Dilation Factor

Simple Interest

Calculus: Area Under the Curve of a Linear Function

Horizontal Curve Solution given Radius and Central Angle

Freezing Altitude Levels: Dry and Wet

HP 67 Solvers:

Temperature Conversions

Cost-Sell-Margin

Decibel Gain/Loss




Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.


Friday, October 10, 2025

Retro Review: HP 67

Retro Review: HP 67


I won a HP 67 from the HHC 2025 Conference in Orlando, Florida last September. Be on the lookout for a list of videos by the hpcalc.org's YouTube page soon. It's always a good time.


Bruce Gordon donated the HP 67 to the conference and I'm grateful and appreciative. I love the box, the calculator, the leather cover, and the manuals.









Quick Facts


Company: Hewlett Packard

Years: 1976 - 1984

Type: Scientific, RPN (Reverse Polish Notation)

Memory: 20 memory registers, 224 steps


Batteries: originally Ni-Cad, there are battery packs that can use AAA batteries (Ebay seller: waterhosko, https://www.ebay.com/usr/waterhosko)


DISCLAIMER:  I am not page for referring the website on eBay, nor I do not guarantee that inventory is available.  


Features:


* Trigonometric, logarithmic, exponential functions

* Probability: n! (the factorial function only accepts positive integers)

* Integer part, fractional part, absolute value, round to fix settings

* Polar/Rectangular, Degree/Radian, Hours/Hours-Minutes-Seconds (HMS) conversions

* Percent and percent change


Non-Continuous Memory


The memory on the HP 67 is not continuous. When the calculator is turned off, all memory is lost. The only way to save the memory registers and the steps require the use of thin memory cards and the built-in card reader. Each card has two sides, which can hold 112 steps per side. With decades-old calculators like the HP 67, the card reader has stopped working. It can be repaired and when I get the chance, I will leave it to the repair experts.


Memory Registers


There are 20 memory registers but they are split up: 10 primary registers and 10 secondary registers. The set of registers can be switch by pressing [ f ] (P<>S). This really comes into play when working with statistical data (see next section).


Statistics


The HP 67 has the standard statistics functions including sums, means, and standard deviations. When calculating statistics, the following stored on the secondary registers:


RS9 (19): n

RS8 (18): Σxy

RS7 (17): Σy^2

RS6 (16): Σy

RS5 (15): Σx^2

RS4 (14): Σx


Clearing these registers require this key sequence: [ f ] (CL REG) [ f ] (P<>S). To access the statistics registers after entering the data, start by pressing [ f ] (P<>S).


The mean function, [ f ] (x-bar):

Y: average of y-values

X: average of x-values


The standard sample deviation, [ g ] (s):

Y: sample deviation of y-values

X: sample deviation of x-values


Programming


As mentioned before, the HP 67 can hold programs up to 224 program steps. Steps involving shift keys [ f ], [ g ], and [ h ], along with [ GTO ] and [ LBL ], are merged with the next key press to help save space. However, each press of the digit keys and the decimal point take one step each. For instance, 475.2 takes five steps ([ 4 ], [ 7 ], [ 5 ], [ . ], [ 2 ]) while sequences such as [ GTO ] [ 1 ] and [ f ] (√x) take one step each.


Always available are five user keys that double as ten lettered labels: A, B, C, D, E, a, b, c, d, and e. The lower case labels are shifted of their capital letter counter parts. There are also ten numerical labels, 0-9, available for use.


There are eight comparison tests:


Gold tests (use the [ f ] shift): x=0, x≠0, x<0, x>0

Blue tests (use the [ g ] shift): x=y, x≠0, x≤y, x>y


The registers I and (i) are used for indirect addressing. We have special functions to store to Register I, the ST I and RC I functions. The DSZ and ISZ only work on register 1.


DSZ: Decrease register I by 1 and skip the next instruction if the result is I=0.

ISZ: Increase register I by 1 and skip the next instruction if the result is I=0.


There are four flags. Flags 0, 1, and 2 are user flags. Flag 2 gets cleared automatically when tested. Flag 3 is the entry flag, which is set automatically when a number is entered or a data card is read. Like Flag 2, Flag 3 is cleared automatically when tested.


For more details, here is an excellent article on HP-67 (and the similar HP-97) programming by the MoHPC (Museum of HP Calculators) web page: https://www.hpmuseum.org/prog/hp67prog.htm


As mentioned before, when the calculator is turned off, all memory is reset. When available, save your programs to a data card first.



Program Collection


Download here:

https://drive.google.com/file/d/114H4D0hcOjxDj_MHQNvwDBUJV3chlpdC/view?usp=sharing



List of Programs (all programs on the file are relatively short, less than 35 steps):


Countdown of HP 67 "seconds"

Random Numbers

Snell's Law

Circle: Area and Circumference

Sphere: Surface Area and Volume

Angle Between 2 Lines with Slopes x and y

Sum of Powers

Adding Complex Numbers

Multiplying Complex Numbers

Complex Number to a Real Power

Permutation

Combination (with duplicating X and Y stack values)

Speed of Sound Approximation (in meters per second)

Finance: Present Value Annuity Factor (including setting N and I% with monthly payments)

Distance Between Two Points (x,y) and (z,t)

Horizontal Curve


When the HP 67 is Turned Off


* All memory is cleared

* The display setting is reset to FIX, DSP 2 (display 2 digits)

* The angle setting is reset to Degrees


Notes


* The number format and the number of decimal points displayed are set separately. For format, the HP 67 offers fixed (FIX), scientific notation (SCI), and engineering format (ENG). For this calculator, do not enter a number after FIX, SCI, or ENG. Setting the number of digits require the use of the display (DSP) key. For instance, if I want to set the HP 67 to fixed setting with 4 decimal places, the keystroke sequence required would be [ f ] (FIX) [DSP] [ 4 ].


* It takes getting used to use a shift key [ h ] before swap (x<>y) and roll down (R↓). Usually they are primary key functions.


* The card reader did not operate, but for machines that are now 50 years old, it's understandable because they do break down. If I get it repaired, I'm leaving it to the professionals.


* There are no internal guard digits. The HP 67, as it seems to be the case for the entire Classic series and possibly later series such as the Voyagers, carries out calculations to fit the 10 digit screen and that's it.


Example:


Set FIX, DSP 9.


2 √ 1.41 - 100 ×


Result:

HP 67 (DSP 9): 0.421356200

HP 45 (FIX 9): 0.421356200

HP 15C CE (FIX 9): 0.421356200

HP 42S, original (ALL): 0.421356237



* This is the only calculator I know that stores the six statistical sum results in secondary registers. I'll have to remember to do the P<>S command first. In later models the registers are not split in this fashion, and that I am grateful for.


* The display is nice, clean, and I do get a small thrill from working with red LED displays.


* There is also a learning curve when all of the shifted functions are listed BELOW the primary keys:

[ primary function ]

        h (black)

g (gold) b (blue)



It's a classic for a reason and I love it. The keyboard is clean and the keys are responsive.


Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, November 11, 2023

HP 42S/DM42 Programs in the Style of HP 65/67 Cards

HP 42S/DM42 Programs in the Style of HP 65/67 Cards


Programming Cards


In the 1970s, a programmable scientific calculators stored programs on magnetic cards.   The magnetic cards were then loaded on to calculator.   Two such calculators that used magnetic cards are the legendary HP 65 and HP 67, both from Hewlett Packard.    


The aim of these programs is to simulate classic programs from the HP 65 and HP 67 as they are stored on the cards, with prompts and messages to enhance the user experience.

The HP 65 had five user-definable keys A-E, while the HP 67 adds five additional user-defined labels a-e through a shift-key combination.

The MENU command on the HP 42S* creates a user key menu within a program, up to six keys.   I use this command to simulate running programs from loading cards.

(*and Free42, Plus42, Swiss Micros DM42)

The file included in the link below include four programs that are ported from various application books (pacs) of the HP 65 and HP 67.   


Demonstration Program:  demo.raw


When the program is run, a card is "simulated".   


I usually have the card in this format:

Left keys:  inputs, will sometimes give outputs

Key 4 (or 5): labeled CALC, get outputs

Key 6:  EXIT.  Exits the program.  Simulates removing the card.  


Demonstration


Key 1:  enter X coordinate

Key 2:  enter Y coordinate

Key 4:  calculate the norm

Key 6:  exit the program



Notes:  before GTO 30,  I have a pause command (PSE) so the menu returns.  

If I have multiple outputs, I have a stop command (STOP).  


Message convention: 

Prompts with a colon:  (:)  input

Prompts with an equals sign:  (=)  output


#  comments


00 { 134-Byte Prgm }

01▸LBL "DEMO"

02 "VECT NORM/ANG"         #  short description of the program

03 AVIEW

04 PSE                                        #  pauses the screen (allows for print)

05 "BY EWS"

06 AVIEW

07 PSE

08▸LBL 30                           # label 30 starts the menu

09 "→X"

10 KEY 1 XEQ 21

11 "→Y"

12 KEY 2 XEQ 22

13 "CALC"

14 KEY 4 XEQ 24

15 "EXIT"

16 KEY 6 XEQ 26

17 MENU                       # menu setup

18▸LBL 00

19 STOP

20 GTO 00                     # repeats the menu unless a menu key is pressed

21▸LBL 21                   # enter X

22 STO 01

23 "X:"

24 ARCL ST X   

25 AVIEW

26 PSE

27 GTO 30

28▸LBL 22                # enter Y

29 STO 02

30 "Y:"

31 ARCL ST X

32 AVIEW

33 PSE

34 GTO 30

35▸LBL 24            # calculate

36 RCL 02

37 RCL 01

38 →POL

39 "NORM="

40 ARCL ST X

41 AVIEW

42 STOP

43 "ANGLE="

44 ARCL ST Y

45 AVIEW

46 PSE

47 GTO 30

48▸LBL 26       # exit routine

49 CLMENU

50 EXITALL

51 .END.


Sample Output:


VECT NORM/ANG

BY EWS

X:5.7500

Y:6.8500

NORM=8.9434

ANGLE=49.9894


Program Space vs. Information Labels


When messages and alpha strings are added, along with the necessary AVIEW, PSE, and STOP commands, the program space requirements increase.   I put these messages to make the program as user friendly as possible.  



What's Included in the Zip Drive


Five programs:


Demonstration Program:  demo.raw

Sight Reduction Table:  str.raw

Physiologic Shunt and Fick:  phsy.raw

1-D Normal Shocks for Ideal Gases:  shock.raw

P and S Seismic Wave Velocity:  seismic.raw


PDF file of instructions and program listing



Download here (zip file):  

https://drive.google.com/file/d/1_0F_DHCGxcLbmCtrhMQbKShjrpBUgB7i/view?usp=share_link


Enjoy and please let me know, I plan to create another volume of these style of programs.  



Note:  The next blog entry will be on November 18, 2023


Eddie 


All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Saturday, July 29, 2023

DM41 and HP 41C: Lagrangian Interpolation

DM41 and HP 41C:  Lagrangian Interpolation



Introduction


The program LARG estimates a point (x, y) using the Lagrangian interpolating polynomial below:


y =

  y0 * (x - x1) * (x - x2) ÷ ((x0 - x1) * (x0 - x2))

  + y1 * (x - x0) * (x - x2) ÷ ((x1 - x0) * (x1 - x2))

  + y2 * (x - x0) * (x - x1) ÷ ((x2 - x0) * (x2 - x1))


The polynomial has three set points that defined points (x0, y0), (x1, y1), and (x2, y2).  


This program is based off the Interpolations program for the HP 67 and HP 97 calculators.  (see source below)



Swiss Micros DM41/HP41C Program LARG


01  LBL ᵀ LARG

02  SF 27

03  CF 00

04  STOP


05  LBL A

06  STO 01

07  x<>y

08  STO 04

09  RTN


10  LBL B

11  STO 02 

12  x<>y

13  STO 05

14  RTN


15  LBL C

16  STO 03

17  x<>y

18  STO 06

19  CF 00

20  RTN


21  LBL D

22  STO 00

23  FS? 00

24  GTO 15

25  RCL 04

26  RCL 05

27  -

28  RCL 04

29  RCL 06

30  -

31  *

32  ST/ 01  

33  RCL 05

34  RCL 04

35  -

36  RCL 05

37  RCL 06

38  -

39  *

40  ST/ 02

41  RCL 06

42  RCL 04

43  -

44  RCL 06

45  RCL 05

46  - 

47  *

48  ST/ 03

49  SF 00


50  LBL 15

51  RCL 00

52  RCL 05

53  -

54  STO 07

55  RCL 00

56  RCL 06

57  -

58  STO 08

59  *

60  RCL 01

61  *

62  RCL 00

63  RCL 04

64  -

65  STO 09

66  RCL 08

67  *

68  RCL 02

69  *

70  +

71  RCL 09

72  RCL 07

73  *

74  RCL 03

75  *

76  +

77  STOP


78  LBL E

79  CF 27

80  CF 00

81  END



Memory Registers Used:


R01 = y0

R02 = y1

R03 = y2


R04 = x0

R05 = x1

R06 = x2


R07, R08, R09


Flag 0 is used to allow for multiple calculations.


Flag 27 is the User keyboard flag.   


Label 15 is a local label.  Any labels 15-99 are local labels that can be placed anywhere in the program.  


ST/ is STO÷.


STOP is the R/S key.  



Instructions


The program LARG is set up to use the USER keyboard as follows:


Key A ([Σ+]):  Enter the point (x0, y0).  Type x0, press [ENTER], type y0, press [Σ+].


Key B ([1/x]):  Enter the point (x1, y1).  Type x1, press [ENTER], type y1, press [1/x].


Key C ([√]):  Enter the point (x2, y2).  Type x2, press [ENTER], type y2, press [√].


Key D ([LOG]):  Calculate y.   


Key E ([LN]):  Exits the program and turns off the user keyboard.




Example



An estimated polynomial runs through the points (1, 7), (3, 9), and (5, 4).   Estimate the point at x = 2 and x = 6.


XEQ LARG


1 ENTER 7 [Σ+] (A)

3 ENTER 9 [1/x] (B)

5 ENTER 4 [√] (C)


2 [LOG] (D) returns about 8.8750


6 [LOG] (D) returns about -1.1250


When done, press [LN] (E) to exit or turn off the user keyboard.



Source


HP 67/97 Math Pac I.  Hewlett Packard.  Corvallis, OR.  1976



Eddie 



All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


The MU Key on a Four Function Calculator and Programs for the DM42/HP 42S

  The MU Key on a Four Function Calculator and Programs for the DM42/HP 42S Not too long ago, I purchased this very colorful, four funct...