WP 34S adding own conversions


Dear All,

Working in a electronics testlab i use a lot of conversions like:
Log <-> Linear Voltage, Log<->Linear Power and RF related, Field Strength & Power Density conversions.

I examined the source code and tried to add a dBuv <-> Volts conversion to both compile_cats.c and compile_consts.c

This works fine but i only see the dB part dBuV in the display,
is seems only two characters are permitted in the left part of the conversion.

Next challenge is to get a short calculation like:
V=10^((dBuV-120)/20) called when executing this conversion..

I used to make short programs for each conversion, but it would be nice to have them under the conversions in the WP 34S.

To get more room in the upper graphical screen i removed at line 1395 of display.c "\177\006\006" now the up down arrows are gone..

Some ideas to get this realized ??

Best regards,


I pondered the same thing a month ago, but I found it didn't make sense to add the conversions I wanted for a couple of reasons:

  1. for quick conversions I don't want to press the extra keys so I preferred to write a set of routines and have them called from A,B,C,D so it's one key press. Plus it meant I could tailor it for my needs (e.g. print out 1530.33 instead of 1.53033E-7)
  2. for calling from other programs, it's just as convenient to have my own conversion program routines in the massive flash space.

Generally from a design perspective W&P avoid adding conversions that are just specializations or combinations of existing conversions.


Conversions that are simply a scale factor can be added to compile_cats.c and compile_consts.c You have to add the conversion twice to compile_cats.c (once for each direction) so you were close. These conversions have a two character limit on the left side in the definition and six (I think) on the right. This is hard coded but the arrow in the middle is free.

To add a conversion that isn't a simple multiplication or division, things get a lot more involved. You have to add a (presumably) monadic function or two. The new function IDs got in xeq.h, the function itself can live anywhere that seems sensible & the appropriate header file also needs a prototype line. Then you'll have to add the definitions to commands.c and finally put the extra catalogue entries in compile_cats.c. Not exactly for the faint of heart :-) Probably the easiest would be to follow one of the existing weird conversions e.g. one of the temperature conversion routines (OP_DEGC_F & convC2F). Oh, conversions done this way have a six character hard limit for their name (no free arrow).

As for that line in display.c, we added the up/down arrows on the left to make it completely clear you were in a catalogue and the extra pixels they consumed didn't seem to impact anything -- relatively few catalogue entries drop to the smaller font. Each to their own of course.

- Pauli


Hi Pauli,

Thanks for all the information.

I totaly overlooked excisting Ar to dB conversion now i understand how to add my own!



And there also exists a power ratio to dB conversion :-) Just for your information ...

Possibly Related Threads...
Thread Author Replies Views Last Post
  [WP-34S] Unfortunate key damage with update to V3 :( svisvanatha 5 1,071 12-10-2013, 11:37 PM
Last Post: Les Bell
  WP-34S (Emulator Program Load/Save) Barry Mead 1 594 12-09-2013, 05:29 PM
Last Post: Marcus von Cube, Germany
  DIY HP 30b WP 34s serial flash/programming cable Richard Wahl 2 865 12-04-2013, 11:14 AM
Last Post: Barry Mead
  HP Prime: adding an entry to a vector Alberto Candel 12 1,613 12-02-2013, 01:18 PM
Last Post: Alberto Candel
  WP 34S/43 ?'s Richard Berler 3 769 11-10-2013, 02:27 AM
Last Post: Walter B
  My FrankenCulator (wp-34s) FORTIN Pascal 4 805 11-09-2013, 06:18 PM
Last Post: FORTIN Pascal
  WP 34S Owner's Handbook Walter B 5 1,042 11-09-2013, 05:34 PM
Last Post: Harald
  wp 34s overlay and programming. FORTIN Pascal 6 1,089 11-08-2013, 01:28 PM
Last Post: Nick_S
  m.dy in display of WP-34S Harold A Climer 3 668 11-05-2013, 11:28 AM
Last Post: Andrew Nikitin
  WP 34s : An old problem coming back Miguel Toro 2 612 11-05-2013, 03:00 AM
Last Post: Marcus von Cube, Germany

Forum Jump: