The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

Touch periodic table on HP Prime - revisited
Message #1 Posted by Terje Vallestad on 23 Nov 2013, 7:31 a.m.


The thread about Mic's Periodic Table program went cold a few weeks ago. However, it seemed at the time that it was not always easy for users to get it to work on neither the emulator nor the calculator. Maybe by now, everybody who is/was interested have sorted this out and got the program to work in both environments. However, in case there are still a few stragglers like me, the information below may be of use to some.

First of all, at least on my calculator and emulator, you have to have both the ELEMENTS program and the HP_ELEMENTS installed if you want to run the Touch version. Without ELEMENTS you get a Syntax Error when trying to run the Touch (HP_ELEMENTS) version. You apparently also have to have Integers set to Hex.

After having downloaded both programs and eventually got them working on the emulator, when I was trying to "Send" them directly from the emulator to the calculator (without having the Connection Kit running as advised in the Forum) the files arrived on the calculator in a corrupted state. Mostly this corruption happened around line 113 or so. Looking in the file (editing) it just displayed "Gobbledygook" symbols from that line onwards so no wonder it didn't work.

I then tried to use Erwin Ried’s PrimeComm v0.5 USB utility to send the files. Doing this and trying several times (firstly learning to use the utility by transferring some smaller files) I was finally able to send the ELEMENTS across. The file showed up lowercase in the Program Catalog with its full 22kB size.

I could now try that program on the calculator and it worked fine.

But however many attempts I did, I could not transfer the larger HP_ELEMENTS across. PrimeComm either hung or the file got corrupted during transfer every time. As a last resort I copied the HP_ELEMENTS program into the "MyCalc" folder associated with the Prime Connectivity Kit “C:\Users\YOURNAME\Documents\HP Connectivity Kit\Calculators\MyCalc” and when starting the CK, HP_ELEMENTS was visible in the Programs section of the Content tab. I then right clicked on the program and used "Send to Class". BINGO! The program transferred almost instantly and with no errors.

I cannot offer any insight into why this was the only method I could successfully transfer the file or whether it was just pot luck at the time. However, as a further trial, I renamed the ELEMENTS program on the calculator (didn’t want to lose it after all this trouble) and transferred a new copy from my computer, again using the Connectivity Kit and “Send to Class”, again no errors in the transfer (but now the file name was uppercase in the Program Catalog). So it might be that there is some difference in the transfer protocols used when using “Send” in the emulator and “Send to Class” in the Connectivity Kit.

In any event I will certainly keep in mind using this method of file transfer at least for large program files in the future. The “Touch” program could now also be run on the calculator; it’s a real pleasure to use and well worth the effort.

Thanks for reading and apologies for my laborious and longwinded explanations but hopefully it is clear enough to be of use to some, Thanks,


Edited: 23 Nov 2013, 7:41 a.m.

Re: Touch periodic table on HP Prime - revisited
Message #2 Posted by Ralf Fritzsch on 23 Nov 2013, 10:16 a.m.,
in response to message #1 by Terje Vallestad

A remark not really related to Touch periodic table, but rather to the comments about the HP Connectivity kit: The first two weeks with my new HP Prime were full of strange freezes, "Gobbledygook" symbols left by the input parser, the need to switch the HP Prime on by paperclip reset, and so on. After a reset to factory defaults, all was fine, and still is until today.

But what did I change in the between, after the reset? I did not connect my HP Prime any more to the HP Connectivity kit! The only use of the USB input was for charging the device.

I have the strong suspicion that the HP Connectivity kit messes things up, and until now I did not found a proof of the contrary.

Just my 0.02 Ralf.

Re: Touch periodic table on HP Prime - revisited
Message #3 Posted by Mic on 23 Nov 2013, 11:47 a.m.,
in response to message #1 by Terje Vallestad

I am correcting the issue with left scrolling in the program. If somebody finds a way to stop left scrolling when the user is at the beginning of the table and correct white screen got with BLIT_P command :

 DIMGROB_P(G1,320,220); RECT(G1);
 local x:=startX-offset,y:=startY,i,j;
 local tablePos=1;

for j:=1 to 10 do for i:=1 to 18 do if tablePos:=position(j,i) then RECT_P(G1,x,y,x+width,y+height,RGB(0,0,0),m1(m2(tablePos))); if selEl== tablePos then RECT_P(G1,x+1,y+1,x+width-1,y+height-1,RGB(0,0,0),RGB(0,0,0,255)); end; TEXTOUT_P(tablePos,G1,x+2,y+1,1); TEXTOUT_P(symbol(tablePos),G1,x+8,y+10,1); end; x:=x+width; end; x:=x-18*width; y:=y+height; end; x:=2*width-offset+width/4+startX; y:=7*height+startY;


if size(touch(1)) then //something in our mouse case if touch(1,5)==0 then //touch local el:= FindEl(touch(1,1),touch(1,2)); if el then selEl:=el; DrawTable(); end; end; if touch(1,5)==1 then "incomplete" end; if touch(1,5)==2 then //drag offset:=touch(1,3)-touch(1,1); DrawTable(); end; if touch(1,5)==3 then return "stretch"; end; if touch(1,5)==4 then return "rotate"; end; if touch(1,5)==5 then return "long click"; end; end; end;

For now I've improved this :

* each element page is now static : press HOME button to go back to the table

You can download the new version here :

*** coming soon ***

Procedure to send the program to your calc :

Edited: 23 Nov 2013, 12:05 p.m.

[ Return to Index | Top of Index ]

Go back to the main exhibit hall