30.  Can I make my own cable for use in downloading aplets from a computer?

Question submitted by: Trevor Gillies, Ocean Reef S.H.S. (plus various others)

Answer: The first point that needs to be made is that there is no point in having a cable if you don't have the software (the Connectivity Kit) but if you have a cable then you can download the latest version of the software from my Utilities page.

However, if you want to try making your own cable then you can certainly give it a go if you have the ability.  (I don't but Trevor says he was successful.)

The wiring diagram can be found at http://centaurus.dee.fct.unl.pt/~ramador/hp38.htm
 
 

31.  Can you use Reverse Polish Notation (RPN) on the HP38/39G?

Question: I like everything about the HP38G except for the fact that it isn't reverse polish.  Has anyone written an aplet or program to accept reverse polish inputs in the home view?
Submitted by: Edward N Pilbrow, CAD Centre, Canterbury University

Answer: No, and I'm afraid I'm almost certain that no-one would write one when you can buy an HP48 to do it for you with no effort (just money). I have used RPN on a 48 and in programming but I'm not an enthusiast despite its advantages.  If you like it then why not just buy the 48 in the first place?  It's a more powerful machine than the 38/39G in any case.
 
 

32.  How can you graph inequalities on the 38/39G?

Question: [...] the work we are covering now requires us to calculate inequailities  ie:  y<3x-4    I have absolutely no idea how to do this, but it seems fairly simple on the Casio machines.
Submitted by: Trevor Gillies, Ocean Reef S.H.S.

Answer: Yes, its a pity the calculator does not have this ability built in. I have written an two aplets which might help you.  The first is an aplet which is very similar to the Function aplet except that it has an extra entry on the VIEWS menu of 'Shade'.  The other will solve Linear Programming problems, which is a topic in Year 12 Applicable Maths in West Australia.  You can download either of these aplets from my web page .
 
 

33.  Why does my 38/39G freeze when evaluating integrals with an ABS value in them?

Question: I have a problem regarding the calculation of the area trapped between the curve y=abs(f(x)). I have tried using the Calculus function (users guide),but this function causes the HP38G to hang up. I would like to know if the HP38G has a built-in routine for evaluating the integral for absolute functions directly.
Submitted by: James Yates

Answer: If you try to evaluate (for example)  then the 38G will indeed appear to freeze.  Actually if you leave it long enough it will answer the question but 2 to 3 hours is a little unrealistic for most of us.  It is possible stop it by pressing the ON button. According to Jim Donnelly, who was part of the 38G design team....
 


.
The answer to this problem is to rewrite the function without the ABS( ) part.  For example, you would rewrite f(x)=x2-4 as 
If you put  F1(X)=X2 - 4 into the Function aplet then the original integral could easily be done in the HOME view using    Similar tricks can be used for areas between curves.  It's not ideal but it's not the end of the world either.
 

34.  Is it possible to adjust the volume of the BEEP or switch it off?

Question: Is in hp38 any possibility to regulate the level of beeper noise? I would like to make it in a low voice or even turn it off?
Submitted by: Jacek Rosiak (Poland?)

Answer: No, unfortunately there is no built in method to switch it off. The beep is caused by a piezzo electric device and therefore its volume cannot be adjusted either.
 
 

35.  What is the origin of the strange number (6.0030000004) on the cover of the 38G?

Question:
I was playing around with one of your aplets and the number 6.0030000004 came up - the number on the cover of HP38 which reminded me that I was meaning to find out what the significance of that number was. I asked my math teacher but he didn't know and its been bugging me for a while now. Do you have any idea what the number is?
Submitted by: Tania Jacob


Answer:   I suggested to Tania that the number might be one from Physics (I think I was remembering Avagadro's Number which is actually 6.0221367x1023) and said that she should talk to her science teacher (it's called passing the buck!).  She replied that she had written to HP and been told.....
 


Many thanks to Tania - a fascinating result & not at all what I expected!
 
 

36.  I've stored some Notes onto my computer and now I can't read them back to my 38G.

Answer: We recently set up a system on our school's library computers which lets our students store their Notes onto the computers.  This is very important for two reasons.  Firstly, if the calculator gives trouble and has to be reset then they will lose their Notes if they have not been saved regularly.  Secondly, we teachers sometimes need to have the students load a large aplet onto their calculators.  If the memory is full of Notes then we need to be able to tell the students to wipe them without getting any arguements.

The problem is that some of the students are reporting that Notes which they saved are now unreadable when they try to retrieve them from the PC. This generally does not happen unless you have done something to interfere with the files.  Although the Mac version of the Connectivity Kit had some initial problems (fixed now - you can download the latest version from my Utilities page) the PC version has always been very stable.

My suspicion is that the problem is usually caused by people editing the Notes in a word processor.  This is NOT a good idea.  Most word processors add extra information to a file regarding paragraphing and formatting and this usually damages the file, making it unreadable by the Connectivity Kit.

This is probably not deliberate.  The Connectivity Kit usually stores the Notes as files with an extension of .000  and if you double click on one of these files then Windows won't know what to do with it.  It will probably pop up a dialog box asking you which program you want to use to edit the file and if you click on OK instead of Cancel then, no matter what you choose, it will probably be wrong and cause damage to the file.  The only program which you might get away with using is Notepad, but I have even known that one to cause difficulties because of the special characters which the 38G uses such as the STO character. If you want to edit a file on the PC then the best idea is to use the aplet Development Kit (more on this later).

The other way that you might damage the files is to double click on them in the Connectivity Kit window instead of clicking on the 'Connect' button.  If you do this then the Connectivity Kit tries to let you edit the files in a word processor and, as we've already discussed, this is not a good idea.

So..... how do you fix things if you have some damaged files?   The process is not all that simple and I would not advise trying it unless you feel reasonably confident in working with Windows and saving & copying files.  If you want to have a go then you'll need the aplet Development Kit (ADK) which lets you edit Notes, Programs & aplets.

Step 1:    Download a copy of the ADK and install it.
If the Aplet Development Kit (ADK) is not on your computer then you will need to install it.  You will need to get the ADK for the HP38G and the ADK39 for the HP39G or HP40G. The ADK and ADK39 are free software from Hewlett Packard and can be downloaded here.

Step 2:    Transfer a copy of the damaged files.
You may want to put a copy of the set of Notes you are working with (all of them, not just the damaged ones) into a directory inside the directory into which the ADK was installed.  It's easiest to work on them in that location and it's also best to work on a copy rather than the originals in case something goes wrong.  If you're confident you know what you're doing then you can work on them wherever they are currently.

Make sure that the two special files called HP38DIR.CUR and HP38DIR.000 go with them.  These two files contain a record of the Notes - their filenames & their names as they appear on the 38G - and they are what we're going to be trying to repair.  From now on I'm going to refer to this as the 'Notes directory'.

Step 3:    Assess the damage.
You need to know which files are damaged so that you can repair them.  You may already know.  If not, there are two ways you can find this out.  The first (and slowest) is to use the Connectivity Kit and try to download each one.  Write down the names of the ones that fail.  The faster way is to run the ADK and use the File - Open command to try to open each of the files in the directory (except the two special files HP38DIR.000 and HP38DIR.CUR).  Make a note of the ones which don't open.  Close them all when you're finished.

.
Step 4:    Collect information prior to repair.
You need to know that the name that a Note is given on the 38G is not likely to be the same as the filename it is given on the PC.  For example, a Note with a name of 'Chem Formulae' on the 38G would appear as CHEMFORM.000 on the PC.  A name of 'Maths' would appear as MATHS000.000  The Connectivity Kit removes any spaces and then gives it a name which is 8 characters long, padding it with zeros if needed or else chopping characters, and puts a .000 on the end.  The Connectivity Kit & the ADK are not Windows 95 programs and do NOT understand long filenames, so don't try to use them.

For each of the damaged files we need the filename and the name under which it appears on the 38G.  This information is contained in the special files HP38DIR.CUR & HP38DIR.000  We will use the ADK to examine them.  DO NOT edit these special files in any other way!

On the File menu of the ADK you will see an entry called 'Aplet Library'.  Choose this and the dialog box below will appear.

I created a set of four Notes to illustrate the process and then deliberately damaged the one called 'Chemistry Essays'.  You can see that the name isn't fully visible but it really doesn't matter - you can create the repaired version with any name you want, it's just best to aim for a similar one to the original for convenience more than anything.  Presumably you know by now which ones are damaged.  You need to record the filename (CHEMISTR.000) and the Object Name (Chemistry Essays) for later use.   Click on the Done button when you have finished.

Step 5:    Repair the file.
The process of repair involves creating a new Note, then opening the old Note in Notepad and copying the contents of the new Note into it.

Create a fresh Note on the calculator.  You will probably want to give it a similar name (best if not identical) but you can call it anything you want.  Use the Connectivity Kit to copy this fresh, undamaged Note up into the same directory in which you're working.

Run Notepad from the Start menu in Windows (click on the Start button - it's usually found in the Accessories menu but you might have to look for it).  Use its File - Open command to open the damaged file (my file was called CHEMISTR.000).  Remember that you're looking for the name of the file, not the name of the Note.  Notepad usually only shows text files (.TXT) and so you'll need to change this to 'All Files (*.*)' before the .000 files will be visible (see below).

Use the Edit menu to Select All and then to Copy.  Close the file and Notepad.

Now run the ADK and open the fresh Note which you created earlier and transferred to the computer.  Paste the text from the damaged file into this new Note.  There will probably be extra characters in it but don't muck around trying to edit the result at this stage.  You can always do that later - we just want to get it working first.

Now save the Note (File - Save) and close the window containing the Note you have saved.

Step 6:    Check that it now transfers to the HP38G successfully
You should now find that the Connectivity Kit will successfully transfer the Note to your 38G.  If you want to you can now erase the old damaged files.  When you transfer the file to the 38G it will probably need some repairs but at least the major portion of it should be intact.

Step 7:    Repair the Note
As I mentioned earlier, the problem with this rebuilding process is that the repaired Notes will probably have garbage in them.  The first of this is at the top of the file.  You will probably see something like 'HP38 AscC 16 Chemistry Essays'.  This is the record of the file's name and so forth - you can delete this immediately since your repaired file will have its own.  Normally this is hidden by the ADK and the 38G but when you open it with a word processor it becomes visible. If you were to look at your repaired file with a word processor (DON'T!) you would find that this line now appeared twice.  Damaging this info is the simplest way to make a file unreadable.

The other damage you will see is caused by the special characters which the 38G uses, such as the STO character, the negative sign (different to the subtract sign), the squared sign etc.  These are stored in the Note using special codes and when you look at the file with a word processor you see the codes rather than the characters.  Cutting and pasting doesn't restore them, they still come through as strange codes.

The pictures below show 'before & after' examples of codes becoming visible.

You can repair the Note on your HP38G (the simplest option if you're not sure what you're doing) or you can use the ADK (the faster option).

Open the Note using the ADK (or on your HP38G).  The header information of 'HP38AscC 5 Maths' can be deleted.  The codes for the special characters can be seen scattered through the rest of the Note.  Basically you need to fix each one.  If one of the codes appears in multiple places (such as the \178 above) then you can use the Edit - Replace command in the ADK to replace all of them at once.  If you're working on the calculator you'd need to do each one separately.  There is a button on the ADK tool bar  which gives you access to all the special characters in the same way as the CHARs button on the 38G.  Just replace one of the codes with the  button, then highlight and copy it.  Go to the Edit - Replace command, put the special code into the find box and paste the replacement character into the replace box, then click on Replace All.  Don't forget to save regularly in case something goes wrong.
 

If you are not sure what a code stands for, I have created a full list of all the codes. I've shown the first third of the codes below so that you can see what to look for. I would suggest going to the page showing the full list and printing it out if the damage is any more than just one or two characters.  Good luck!




 

37.  How do you convert complex numbers to polar form?

Question: ¿How can i change from polar coordinates to rectangular or rectangular
to polar?  For example, if i have
            6+j7  = 9.21  _ 49.4°
            4+j4  = 5.65  _ 45°
Submitted by:  Juan Manuel

Answer: When converting rectangular to polar, the simplest way in the HOME view is....
    1.  STO the complex number in Z1 (or Z2, Z3....)
    2.  ABS(Z1) will give the modulus and ARG(Z1) will give the argument. Remember to set the
        angle type to DEG or RAD in HOME MODES before you do this.
If you have the Connectivity Kit and cable to download from your computer to your 38G then you might like to use a little program that I wrote for my students called 'Rcis'.  You can download the program from the Miscellaneous section of my aplets page. You need to download this program into the Programs Cataloge (not the LIB
view) and then RUN it.  It asks you which of Z1...Z6 the number is stored in and gives you the number back in polar form.
Converting back from polar to rectangular - it's probably easiest to just enter it in r cis form.  For example, 5 cis 30°  would be entered as 5(COS(30),SIN(30)) and the calculator will then convert and display as rectangular.
Update:  I recently discovered a much neater way to convert polar to rectangular.  If you look in the CHARS view you will find the character .  If you wanted to convert 5 cis 30°  then just enter (5, 30) and the calculator will return the rectangular form.

38.  What other ON+Key combinations are there?

The information below applies to the HP38G.  I may update this eventually for the HP39G.

You are probably already aware of the full reset and partial reset key combinations.  In addition to these two there are a number of others.  The information below was provided by Detlef Muller and came originally from information provided on an HP48 FAQ page by Dave Arnett, a member of the HP48 development team.  The explanations are his not mine.
Note:    1. These key combinations are for an HP38G.  The HP39G may be slightly different.
            2. SK1 is the left-most menukey (SK=SoftKey), SK6 the right-most:

ON+SK1+SK6
This is the manual Coldstart.  It will break out of almost any hung program, and resets the operating system. Note that this is your next-to-last resort in a lock-up, so don't do this unless you really want to clear memory.

ON+SK2
This is the Oops! key for ON codes.  For many ON sequences, this cancels the operation, so long as you press the SK2 before releasing the ON key.  Try it sometime, if you must, just so you remember it.  It can be a life-saver, in case of an accidental ON+SK1+SK2 in process, or even accidentally hitting ON during a plotting routine.

ON+SK3
This will initiate a Warmstart (or soft reset).  You'll lose at least the HOME History, maybe some other VARs too. But it will often get you out of a locked up program or 'hanging' due to mis-matched statistical data, without the whole memory being lost.
Note:  Poking a paperclip into the hole on the back of the calculator is the same as doing ON+SK3.

ON+SK4
Enters interactive test mode.  Don't enter this mode without saving anything which is important but then you can playaround.  Exit this test mode with Warmstart, ON+SK3.  When you first press ON-SK4, your HP will beep and you will see 3 vertical lines, one on each side of the screen and one in the middle. The tests are:
 

ON+SK5
Starts a looping self-test mode.  Kinda dull after the first five minutes, but it keeps a rather solid tempo.  Exit with Warmstart, ON+SK3. When the HP38 is in test mode (ON-SK4 or ON-SK5), the test results that are displayed on the screen are also sent to the serial port at 9600 baud, 8 bits, no parity, 1 stop bit. This does explain, why the I/O annunciator lights up so much during the self test.

ON+[1]
Screen dump utility.  See my instructions on how to capture screens for use in a word processor.

ON+[+]
ON+[-]
Adjusts display contrast.

ON+[,]
Initiates Coma Mode and clears Warm Start Log.  In Coma mode, all the clocked activity is halted.  The battery power drain is basically the few nano-amps [nA] necessary to sustain your RAM contents.  The Warm Start Log is a nearly bullet-proof area of memory which keeps track of the last four hazardous events. View it using the command WSLOG.  This log is one of the few things not cleared by a Coldstart.  But it is cleared by ON+[,].  Enter Coma this way if you want to clear the Warm Start Log, if you are planning to study crystal healing in Tibet for a few years and want to keep your pirated version of Tetris alive, or you just have a low power fetish.  Exit Coma mode with the ON key (tough to remember, huh?), and plan to find your stack cleared out.
Two additional notes on this Coma stuff.  First, I'm not gonna try to list the log codes in WSLOG.  Sorry!  Second, if your machine is on, and you drop the batteries out, you will usually end up in a coma mode to preserve power.  WSLOG will not be cleared.  Instead, you will find a code 1 entry there.  Some people are paranoid and want to be in Coma when they change batteries, just in case they have a sudden emergency call from the Prime Minister and don't get back to their battery change for a half hour.  If you are one of these...  shall I say, weenies?  No, that would be unprofessional ...users, then I recommend you use the ON+[,] entry route, rather than the kamikaze method of dropping batteries with the machine running.  Myself, I just turn the machine OFF, like the manual says. Now, a Coma story... sort of.  During the G/GX development, Imaintained a small number of units on which I changed ROM chips as incremental code releases came out.  This was so folks like Bill Wickes and Jim Donnelly could have fully-real hardware to test, instead of just the EPROM handsets some of you may have seen.  We always backed up anything of importance in the machine before we did this.  But I got into the habit of using ON+SPC (Coma on a '48) before I opened up the calculator.  Better than half of the time, I could remove the batteries, open the case, desolder the old surface-mounted ROM chip, solder down a new chip, and reassemble the machine... with all of RAM intact! When I pressed ON, I'd come right back up without a "Try to Recover Memory?" prompt.  Pretty good, huh?  The folks who put that mode into the machine certainly weren't in a coma.
 

39.  Why are programs on the 38/39G larger than those on the Casio?

Question: I've been wondering why the HP programs use so much memory. The actual text files containing the programs should only be at most 500 bytes as they are only a page long. When I put them onto my calculator and run them the first time they take up approx 5k or more. Why? And is there another programing language I can use so that these simple short programs don't take up all my space. (I have a friend who uses the Casio and almost identical programs only use 50-100 bytes on his calculator).
Submitted by:  Alan Benn

Answer: The answer comes in two parts.  The first question is answered by Jean-Yves Avenard of HP - a guru programmer on the 38G.
   

Hosted by www.Geocities.ws

1