[42S] Electrical Engineering Solutions

Contributions to this software library are always welcome. Please ensure that you post program listings rather than .raw files. They give a reasonable idea of what your program does without having to load them into a DM42 and you can also include comments in your code. Check out the following link for a decoder/encoder: http://www.swissmicros.com/dm42/decoder/

You can then copy/paste the listing and post it in "code" tags.
Post Reply
dlachieze
Posts: 131
Joined: Thu May 04, 2017 10:20 am
Location: France

[42S] Electrical Engineering Solutions

Post by dlachieze » Fri Mar 09, 2018 8:02 pm

Here are the different programs from the HP 42S Electrical Engineering Solutions book. You need the book to know how to use them, and you can find it on the hpmuseum document set.

The programs are available as source files (.TXT) and as binary files (.RAW) that can be loaded in Free42 and the DM42. A complete state file for the DM42 is also provided with all programs already loaded and ready to be used. They are organized according to the book chapters:
  1. Circuit Calculations
    • Voltage Division ("V÷")
    • Current Division ("I÷")
    • Power Triangle ("PWR3")
    • Frequency Response of Transfer Function ("FQRS")
    • RC Timing ("RC")
    • Delta-Wye Conversions ("DY")
  2. Network Analysis
    • Circuit Editor ("CIRCT")
    • Mesh Analysis ("MESH")
    • Nodal Analysis ("NODAL")
    • Impedance of a Ladder Network ("LADDR")
  3. Filter Design
    • Active Filter Design ("AF")
    • Butterworth Filter Design ("BF")
  4. Transmission Lines
    • Transmission Line Calculations ("LINE")
    • Transmission Line Impedance ("TLI")
  5. Amplifier Analysis
    • Transistor Amplifier Performance ("TAP")
    • Transistor Amplifier Bias Optimization ("BIAS")
  6. Truth Tables
    • Writing a Logical Expression as a Program (“EXMPL”)
    • Printing a Truth Table ("PTTBL")
    • An Interactive Truth Table ("ITTBL")
  7. Utilities
    • Circuit Calculation Utilities
      Impedance of an Element ("C->Z" and "L->Z")
      Combining Parallel Impedances ("ZP")
      Entering Radian Frequency ("FQ?")
    • Circuit Element Input Utility ("EL?")
    • Function Name Utility ("FCN?")
    • Yes/No Utility ("Y?N")
    • Product Over Sum Utility ("P/S")
    • Size Utility ("SIZE?")
All programs have been tested on the DM42 v3.4a with the examples provided in the book. Please report any issue you may have with these programs.

Some programs have two versions: the original one and a DM version. The DM version is the one loaded in the DM42 state file.
The reason for a specific DM42 version is the bigger display: within some programs the results are presented with an Alpha string on the top display line and the value on the bottom line:
Image
While this works well on a two line display such as the 42S one, it is not very nice on the DM42 display where the top and bottom lines are far apart:
Image
So the DM version includes the result value on the top line with a ARCL ST X instruction to have the program interaction on the top line:
Image

One more thing about the DM42 state file: it has been created with my settings (date format, stack layout, status bar …), so I recommend that the first action after loading it should be to check and update the settings to your preference and then save again the state file. This way if you have to reload it, it will have already the right settings for you.

Electrical Engineering Solutions.zip
(46.83 KiB) Downloaded 114 times
DM42 SN: 00425

mcc
Posts: 168
Joined: Fri Jun 23, 2017 3:10 am

Re: [42S] Electrical Engineering Solutions

Post by mcc » Sat Mar 10, 2018 5:28 pm

Hi,

GREAT ! Thanks a lot!!!

...slowly (or not so slowly :) ) we need the directory structure for the flash in the firmware... :)

Cheers!
Meino
DM 42 - SN: 00373, Firmware v.:3.9.1 / 3.9.1 as compiled by SwissMicros

rprosperi
Posts: 365
Joined: Mon Apr 24, 2017 5:48 pm
Location: New York

Re: [42S] Electrical Engineering Solutions

Post by rprosperi » Sat Mar 10, 2018 8:27 pm

dlachieze wrote:
Fri Mar 09, 2018 8:02 pm
Here are the different programs from the HP 42S Electrical Engineering Solutions book. You need the book to know how to use them, and you can find it on the hpmuseum document set....
@Didier - Very nice package Didier, very complete providing programs in multiple formats, but I also had never considered distributing programs by sending out a DM42 State File with all programs loaded. After the recent bug tracking Thomas did, where you submitted the State File as a way to preserve all contents, that got me thinking about how useful the State File can be for such purposes, but I honestly didn't carry the idea all the way through to a program distribution method. Innovative, clever and dead simple to use, I expect this approach will spread quickly. Bravo!

@Walter & Pauli - The ability to save and select State Files to load would be an excellent feature to add to the 43S specs, for all the reasons discussed above; I hope it can be accommodated in the current conceptual design.
--bob p

DM42: β00071 & 00282

User avatar
Walter
Posts: 727
Joined: Tue May 02, 2017 9:13 am
Location: Close to FRA, Germany

Re: [42S] Electrical Engineering Solutions

Post by Walter » Sat Mar 10, 2018 8:43 pm

rprosperi wrote:
Sat Mar 10, 2018 8:27 pm
@Walter & Pauli - The ability to save and select State Files to load would be an excellent feature to add to the 43S specs, for all the reasons discussed above; I hope it can be accommodated in the current conceptual design.
There are commands provided for saving and recalling configurations (i.e. mode settings, formats selected, and user assignments all in one): STOCFG destination and RCLCFG source. Destination can be any register or variable. Source should be a register or variable used as destination before. I'm uncertain about the contents of a DM42 State File - that seems more like a RAM dump, isn't it?
DM42 SN: 00041 --- Follower of Platon.

HP-35, HP-45, ..., HP-50, WP 34S, WP 31S, DM16L

rprosperi
Posts: 365
Joined: Mon Apr 24, 2017 5:48 pm
Location: New York

Re: [42S] Electrical Engineering Solutions

Post by rprosperi » Sat Mar 10, 2018 10:49 pm

Walter wrote:
Sat Mar 10, 2018 8:43 pm
There are commands provided for saving and recalling configurations (i.e. mode settings, formats selected, and user assignments all in one): STOCFG destination and RCLCFG source. Destination can be any register or variable. Source should be a register or variable used as destination before. I'm uncertain about the contents of a DM42 State File - that seems more like a RAM dump, isn't it?
Yes, exactly, it's a dump of all RAM contents (programs, variables, settings, key assignments, statistics registers, etc. ). While intended primarily to allow one to have essentially multiple "machines" that you switch between (e.g. one with Stats programs, another with Data collected for another project, another with a fresh-reset configuration, etc.) for different uses, the side-effect is one can extract a State File and:

a. Share it with another user
b. Send it to the Dev. team or another experienced user to examine when bugs or unexpected behavior occurs
c. Let one load a series of long, or difficult to enter programs and then share that with other users, as a 'super program download'
d. etc.

Of course such a capability requires 'extra' flash storage space to hold the various State Files, but the target platform seems to have enough for at least some; perhaps there would need to be a limit of 3 or 4 State Files, but this will be dictated by the 43S' memory requirements. The good news is available memory (and LCD) are huge when compared to the extremely limited resources available to the 34S; this State File feature seems to be a universally good way to use some of it.
--bob p

DM42: β00071 & 00282

dingebre
Posts: 7
Joined: Wed Mar 14, 2018 8:01 am

Re: [42S] Electrical Engineering Solutions

Post by dingebre » Wed Apr 04, 2018 4:55 pm

Thank you for sharing this.
David

Collision Forensics & Engineering, Inc.
www.CFandE.com

Analogue Realities
Analoguerealities.com

Logan
Posts: 17
Joined: Sat Jul 08, 2017 11:03 pm

Re: [42S] Electrical Engineering Solutions

Post by Logan » Fri Apr 06, 2018 3:22 pm

Now I feel bad that we duplicated this work. I entered all this into my calculator back in December but wanted to write up the basic instructions for each of the programs before I shared it, got lazy and now you've done it as well. I even did the same modification to the display line. Regardless, I feel bad for not sharing sooner and thank you.
DM42 SN 210

Post Reply