[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: https://technical.swissmicros.com/decoders/dm42/

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

[42S] Electrical Engineering Solutions

Post by dlachieze »

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 912 times
DM42: 00425 - DM41X: β00066 - WP43: 00042
mcc
Posts: 277
Joined: Fri Jun 23, 2017 5:10 am

Re: [42S] Electrical Engineering Solutions

Post by mcc »

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 release v.:3.22. / DMCP 3.24. as compiled by SwissMicros
rprosperi
Posts: 1703
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: [42S] Electrical Engineering Solutions

Post by rprosperi »

dlachieze wrote:
Fri Mar 09, 2018 9: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, DM41X: β00071 & 00656, DM10L: 071/100
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: [42S] Electrical Engineering Solutions

Post by Walter »

rprosperi wrote:
Sat Mar 10, 2018 9: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?
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
rprosperi
Posts: 1703
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: [42S] Electrical Engineering Solutions

Post by rprosperi »

Walter wrote:
Sat Mar 10, 2018 9: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, DM41X: β00071 & 00656, DM10L: 071/100
dingebre
Posts: 7
Joined: Wed Mar 14, 2018 9:01 am

Re: [42S] Electrical Engineering Solutions

Post by dingebre »

Thank you for sharing this.
David

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

Analogue Realities
Analoguerealities.com
Logan
Posts: 34
Joined: Sun Jul 09, 2017 1:03 am

Re: [42S] Electrical Engineering Solutions

Post by Logan »

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:00210
DM41X SN:00014
User avatar
giubin
Posts: 36
Joined: Fri Aug 13, 2021 5:57 pm
Location: Italy

Re: [42S] Electrical Engineering Solutions

Post by giubin »

Awesome! Thanks for sharing.
SwissMicros DM42
SwissMicros DM16L
HP 50g
HP 48GX
HP Prime G2
TI-89
TI-Nspire CX-II CAS
Sharp EL-506P; EL-512; EL-5020; EL-5120; PC-1360
DA74254
Posts: 193
Joined: Tue Oct 03, 2017 11:20 pm
Location: Norway/Latvia

Re: [42S] Electrical Engineering Solutions

Post by DA74254 »

Thank you for sharing. :)
This will be put to good use in my work and in my electronics hobby.
Esben
DM42 SN: 00245, WP43 Pilot SN:00002, DM32 SN: 00045 (Listed in obtained order).
Post Reply