***************************************************************************
(Este es el post original 48gs256k.txt)
***************************************************************************

(This is the "October" revision of my posting. It is upgraded with
respect to the previous "September '94" version to include some asked
questions)


This document describes how to upgrade your HP48G (or 48S) to 256K Ram
----------------------------------------------------------------------

The main piece of research (for HP48G) is done by Thomas Otten. Thank
you Thomas, great job !!
Other people who contributed are mentioned in the included posting.

This document is written especially for the HP48G, but as far as i can
see the PCB is also usable for the HP48S. In that case you just have to
connect some wires differently, and you don't need the 74HC00. If you are
going to upgrade an 48S, read the special part for the 48S after reading
the global-G text... Warning ! I haven't tried this on a HP48S !

I've created a little PCB (printed-ciruit-board) by using the information
supplied by Thomas. On this PCB are two 128K*8 static ram's, which both
have the normal DIP (dual-in-line) package. They are stacked on top of
each other, and the one on the bottom is mounted on the PCB as if it were
a real SMD device. The PCB itself is connected to the HP48 by 40 tiny
pieces of wire. It's a very rigid construction; no glue needed, and possible
wiring mistakes reduced...
I did my memory upgrade using this PCB somewhere round july 16. 1994, and
it still works great (it's now oct. 16. '94).

Included in the zip-file are the mem-pcb.plt, mem-pcb.lj and mem-pcb.2lj
files. These contain the PCB layout. The *.plt file is a HPGL plotter file,
the *.lj file is a 100% PCL-file and the *.2lj is a 200% PCL-file. The PCL
files can be printed on HP-laserjet or HP-deskjet printers. I created
my PCB by printing the 100% laserjet file on a piece of calc-sheet, and
directly etching the print using this sheet. If your'e going to print
the image on a dot-matrix printer, you better use the HPGL version, set
your software for a 200% copy, and scale the result down. You could use
for example the utility from a Simtel mirror; .../msdos/plot/prtgl140.zip,
a very usefull program which is able to output the HPGL file to many devices
(screen/printer). In other cases you might be able to use Word-perfect,
Draw-perfect or some other graphics programs to print the HPGL file. If you
copy one of the files directly to your printing device (with MSDOS), remember
to use the "/b" switch ! [ copy /b mem-pcb.2lj lpt1: ]
If you want to print on unix systems be sure you use the "RAW" printing mode.
See the manual pages of "lp" or "lpr" for the correct options. Or just ask
someone who knows what to do (system-administrator).

If you can't create the PCB by yourself, just make the printout on paper,
and get it to your local electronic's shop. They probably can do it for
you, otherwise contact a friend who's able to help you... By the way, a
200% printout photographically down-scaled always gives a better result.
Double check the size of the final PCB you create before soldering anything !
The connector-strip on the PCB should allign exactley (pin distance) with the
connector inside your HP48 !

The print should be cut as small as possible, and right next along the edge of
the 40 pin connector. The printed text on the PCB should be readable (i mean
not mirrored ! Probably the small text won't be visible after etching, but
you get the point...) Oh yes, and NO HOLES should be drilled !!! It's an SMD-
like setup (the components are soldered on the side where the traces are...).

Before you start the project i strongly suggest you read all of the included
postings !!! [ Or else you won't be able to open up your HP nicely :) ].

Ok, the things you need are two 681000(ALP)/DIP ram chip's (or equivalent),
a 74HC00/SMD (only for 48G), the PCB, 40 pieces of stripped (hardcore) wire
(i used the ends of some 1/4 watt resitors for this...), 8 pieces of extra
wire (with isolation), soldering stuff, one 1 Meg Resistor and of course a
HP48G (or 48S) with just 32K of memory... :)
Optional stuff for adding a write-protect switch: a little dip-switch bank
with at least 4 switches and one 2K2 Resistor.

==============================================================================
|| Warning ! Watch out for static-discharges ! I actually connected the tip ||
|| of my soldering iron to the negative pole of the HP48 while soldering    ||
|| things inside it... Officially you also should tie yourself and          ||
|| everything else to the ground-level :)                                   ||
==============================================================================

Start by soldering in the 74HC00/SMD (48G only). For information on how to
open up your HP and to find the location for 74HC00 see the included posting
written by Thomas.

Here's a (poor looking) side view of the setup....


          |----------------------|
        |-|        CHIP-1        |-|
        | |----------------------| |
        |                          |
        |                          |

          |----------------------|
        |-|        CHIP-2        |-|
        | |----------------------| |
     ___|                          |___                     Wires for
                                                            40-Pin connector
                                                                  ------|
 ==256K-PCB===========================================================  |
                                                                        |----
========HP48PCB================================================================
<----- Display to the left.....     .....Battery compartment to the right ---->
Keyboard and display facing downwards...

The 256K-PCB also serves as isolation for the added wiring because all of the
copper-wires on this PCB are on the upper-side (if looking at above picture).

You should bend all of the little feet of CHIP-2 as you can see in the above
picture. I actually had to shorten the legg's a little bit, to get them to fit
on their pads on the PCB. Watch very carefully ! You don't want to make any
shortcuts ! If all of the pin's of CHIP-2 are ready, you can solder them all
to the PCB. Pin one of the chip should be in the upper right corner if you
have the PCB with the 40-pin connector pointing at you. But if everything is
ok, you should have a 1 marked on the PCB at the corner which reads 256K HP48.

CHIP-1 has to be soldered on top of CHIP-2. But before you do so, you should
bend out the pins 22, 24 and 30 a little bit. These pins should not be
soldered to the corresponding pins of CHIP-2, as is the case with all others.

Connect pin 30 (chip-1) to pin 32 (chip-1/2) with a little piece of wire.
Attach seperate wires to pin 22 (chip-1), 24 (chip-1) and to the solder island
on the PCB at pin 32 (chip-1/2). These will go to the HP48 system-board.

Now prepare for a nasty piece of soldering.... the 40 pin connector...
Put the PCB on top of the HP48 system board, and allign the two connectors.
The 256K-PCB is not completely lying flat on the HP because of some components
on the HP under it. But that's no problem, just keep the 40 pin connector part
flat on the board. Now bend 40 tiny pieces of wire in the right shape, and
solder the two PCB's together... Be very carefull or you will solder two
neighbour-connector pads together !!! I actually didn't bend 40 pieces of wire
in the right shape in advance. A better way to do this is to take one long
piece of (hard-core) wire, and bend one end of it in the right shape. Then
solder this end to the two PCB's, and cut it off. Of course you may skip pads
which aren't connected to anything... I used the ends of a couple of 1/4 watt
resitors as wire, perfect for this purpose !
Be sure you connect the PCB to the part of the 40-pin connector which is
located away from the battery case. (Some pin's are split in two, see posting).

By this time your PCB should rigidly be connected to your HP. No glue needed
as you see, and no big wire mess... [ Although a bunch of wires will also work
perfect... no PCB needed, but i think it looks nice... :) ]

Now use a needle (and iron :) to de-solder two pins of the internal 32K chip.
Be very carefull, not too much heat, and don't force the pin's, they just
have to be bend a little up in the air to get rid of their contact with the HP.
The pin's are 20 and 22 of the M5M5256BFP-15L or what ever 32K chip they used
inside your HP. Just read the included posting from Thomas if you can't find
the right chip (you should read it anyway to open up your HP, and to learn how
all this magic works !).

Connect the wire of pin 22 of chip-1 to pad 20 of the HP-board. Yes, the one
from which you just desoldered a pin. Same for pin 24/chip-1 to 22 on HP.
The wire from the solder island at pin 32/chip-1/2 should be connected to the
VCC pin of the internal 32K, which is pin 28. I actually connected this wire
two pads further near the battery case, but if your'e not sure which pin i
mean by this, just connect it to 28 of the 32K ram. Be sure that the two
desoldered SMD pins do not touch the newly connected wires. The two floating
pin's of the SMD should also be connected to the VCC (pin 28 of ram). Don't
use wires which are too short for this purpose, in future these two pins have
to be connected somewhere else, to enable the 32K as extra port-memory !

Almost ready, just two resistors left, and a dip-switch bank...
One end of the 1 Meg resitor has to be soldered on pin 2 of the HP-connector,
the other end goes to pin 32 of chip-1/2. This is the "battery-check" for
the new port-memory.

The dip-switch schematics:


------- "T"-pin-37.
|
|
|           DIP
|        ---------                         ---------
|--1 ----|  SW1  |---- 8-------------------|2k2 res|------ GND
|        |       |                         ---------
---2 ----|  SW2  |---- 7-----> pin 1 of HP connector
         |       |
   3 ----|  SW3  |---- 6
         |       |
   4 ----|  SW4  |---- 5
         ---------

Connect pin 1 and 2 of this switch to the "T"-shaped pad on the 256K-PCB. This
pad is connected to pin 37 of the 40-pin HP-connector. Connect pin 7 of the
dip-switch to pin 1 of the 40-pin HP-connector. Connect a wire to pin 8 of
the dip-switch, and connect this wire to one end of the 2k2 resitor. Connect
the other end of the 2k2 resistor to a GND-wire. A nice position for this
resistor is the leftmost trace on the 256K-PCB. This trace is connected to
GND pin 40 of the HP connector. Just put the resitor vertically (flat) on top
of this trace, and solder one end of it to the trace. The other end is of
course connected to the DIP-switch.

This way the dip-switch can be used to switch your memory to write-protected
state, read/write state and invisible state (I actually have no use for the
invisible state, it's just a side effect..). Just don't turn on both switches
SW1 and SW2 at the same time for a long period. This drains your battery.
The proper procedure is: Turn of your HP, change switch positions, and turn on
again. Just keep the two switches always in the opposite position. If you
accidently turn on both switches your HP won't blow up or something like that.
For this reason the 2K2 resitor is installed. It just is going to drain your
battery a little bit faster this way. If you turn of both switches the HP
won't see the extra port memory. By the way, this switch is only used to
protect the port-1 memory. The 128K base is of course always enabled.

You can also skip this dip-switch stuff, and connect the "T"-pin to pin 1 of
the 40-pin connector. This way the memory is always enabled. In this case
you don't need the disp-switch bank and the 2k2 resistor. But i recommend
to anyone who's going to do any sys-rpl programming to install the dip-switch.

Now where should you put this dip-switch bank ???? Just find a nice spot, and
create a hole to access it. I did glue it underneath one of the rubber feet
of the HP. Actually the one nearest the negative power pin of the battery-case.
(Or the one at the same side your reset-button probably is). I took out the
rubber-piece, and created a hole underneath it. If i want to change the memory
state i now just have to remove the rubber-piece, change the switch, and put
the piece back. Very nice, you don't see a thing from the outside !! Just like
the reset button...
Before you glue it inside your HP, be sure you still will be able to close the
HP again ! Of course i flattened all the pins of the dip-switch to safe space.

Why 4 switches ??? Well, that's obvious... The internal 32K is the future
port-2 memory, and i already reserved two switches for this one... (See the
HP48S-part for the connection of the other two switches).

Now you just have to cut a hole into the shielding of the back at the place
where the new ram-bank resides, and close up your calculator.... Ready....
Just add some isolating stuff at the places where you think it is needed, i
only isolated the sharp edges of the hole in the shielding to keep my fingers
alive...

To test new memory inside the HP48G, press ON, then  ON-D to enter test mode,
and after the vertical line(s) apear press the "k" key (arrow up). After this
the display should say "RAM1 OK  128K" and something like "RAM2 90000". The
first "OK" just stays on my display a very short time. Press "k" again to
test it another time if you missed the message... Leave test with ON-C.
To test the new internal 128K (the previous test was an external port-mem
test only), press ON, ON-D, and then EEX. Now wait for a message stating
"IRAM OK  128K". Leave the test with ON-C. Don't be afraid if you see a
"fail 100" or "fail 180" mesasage at the end ! This message was already
present before you upgraded your calculator, and as far as i can see the
"fail 180" means that both port-1 and port-2 memory are missing, and in the
same way "fail 100" indicates the missing port-2 memory (you only installed
port-1). So if everything is Ok, you should see the "fail 100" message after
doing the upgrade.

To get rid of the "Invalid card data" message, type PINIT, or just start
using the port.

One last thing: inside my HP, pin 38 and 39 of the 40 pin connector are not
connected to anything, so i didn't connect them. If they are connected
inside your HP, read the included posting to see what you should do with them.

=================================================================
|| Do the upgrade only if you know you're qualified to do it ! ||
|| Watch out for any Static-discharges !                       ||
|| Of course this upgrade is at your own risk, you lose all    ||
|| waranty, if you had any left......                          ||
=================================================================

I wish everybody good luck on doing the upgrade !
Questions/Comments/Experiences??? Just send some mail, and i see what i can
do for you...

Greetings,
   Thijs Kaper  (thijs@psy.vu.nl)

---------------------------------------------------------------------------
  o   Is it a bird ?............ |  Thijs Kaper, Eindhoven City Centre
~(S)~ ...Is it a plane ?........ |  thijs@psy.vu.nl, thijs@titan.hts.hsa.nl
 / \  ......No, it's aScii-man ! |  Yes ! This is holland speaking...



======SPECIAL HP48S PART========

Again: Warning, untested, but it should work ! The only thing i'm unsure of
is the question if there's enough space to get the PCB to be placed flat
inside your HP. According to information i received from Matthias Krok
(m_krok@tron.gun.de) there should be enough room to place the PCB.

First read all of the above, some things are the same for both calculators.

Ok, no need for the 74HC00 as mentioned before, and no need for some extra
wires...

Create the PCB as mentioned...

Solder CHIP-2 onto the PCB....

Solder CHIP-1 onto CHIP-2, and in this case just leave pin 30 unconnected !!!
You don't have to bend pin 22 and 24, these should be connected to their
corresponding pins of chip-2.
Connect a short wire to pin 30 of chip-1.

Put the 256K-PCB inside your HP, and solder the connectors together with the
small wire-pieces. Again, solder the PCB to the connector part located away
from the battery case.

Connect the wire from pin 30/chip-1 to pin 21 of the 40 pin HP-connector, and
in this case to the part located NEAR the battery case !

Connect BOTH parts of pin 39 to pin 40 (HP-conn).

Connect BOTH parts of pin 38 to pin 1 (HP-conn).

Install the two resitors, and the dip-switch, and duplicate that part for
the side of the connector NEAR the battery case as follows:

------- "T"-pin-37.
|
|
|           DIP
|        ---------                            ---------
|--1 ----|  SW1  |---- 8----------------------|2k2 res|------ GND
|        |       |                        |   ---------
---2 ----|  SW2  |---- 7-----> pin 1 HP   |
         |       |                        |
---3 ----|  SW3  |---- 6------------------|
|        |       |
|--4 ----|  SW4  |---- 5-----> pin 1 HP-conn.
|        ---------
|
---- "NEAR" half op pin 37.

Don't forget an extra 1 Meg resistor for "NEAR" pin 2 (HP). Or just connect
the two parts of pin 2 together.

Don't mess with the on-board 32K chip, no need for it.

Close the case.... and ready....

Check out your HP-manual for a test of the newly installed port-memory.

The main difference between the two setup's is that inside the HP48G you
have to replace the 32K chip by the 128K chip-1 because of the memory
allocation system used. The HP48S works a little differently, and doesn't
need the replacement of the 32K. In this case you just added port-1 and 2.

The opening and closing of the 48S is the same as for the G.

=====================================================
|| Of course this upgrade is at your own risk !!!! ||
|| You lose all waranty, if you had any left...... ||
=====================================================

Good luck !!

Thijs Kaper (thijs@psy.vu.nl)

Please let me know if anything should be changed in this 48S part.


======END OF SPECIAL HP48S PART========



------------Included posting from Thomas (otti@megatel.de)-------------

Newsgroups: comp.sys.hp48
Subject: Expand your HP48G to 256K - here's how
Date: Tue, 13 Sep 94 09:25:21 GMT
Lines: 511

Hi everybody,
I offered to send my "old" posting about expanding the HP48G to 128K or 256K  
RAM to everyone who is interested. Since so much people mailed me I repeat that  
posting here. Maybe it should be added to the FAQ (?).

I'm still happy with the expanded 48. I just had that 'memory lost' problem I  
mentioned some days ago but since I included that daily timer event everything  
is fine. I have forgotten to write that I used RAM chips with DIP package.  
There is enough room in the G.

[Posting about this problem also included at the end of this doc...]

FYI: I wrote that I don't know the meaning of some pins of the card connector  
in the following posting. By now someone told us in this newsgroup that those  
pins contain some video signals on one port. But this doesn't matter for the  
RAM expansion described below.

If you don't are the pioneer kind of hardware hacker (like I'm a little bit)  
just wait before opening your 48. Someone I'm in contact with developed a  
little PCB board for the expansion and I think he'll publish this in the near  
future. You won't have to use that much wire as I did - but on the other hand  
it won't look that daring if you show the internals of your expanded HP to  
someone else ;-) . So if you don't mind some wiring feel free to follow my  
instructions.

Greetings and good luck,  Thomas

============== start of old posting ============

My calculator started to shout "expand me" and I went out to get some meat (did  
you see "Little Shop of Horrors"?). And when I turned it on today it happily  
said "Mem available: 256440 Bytes"

Credits: 
1) Like my first posting this text is based on a text by Holger Meyer
   ( 85348@NOVELL1.RZ.FHT-MANNHEIM.DE )
   by simulating one or two RAM cards. The pictures of the pin layouts are his
   art work and only modified by me.
2) Carl Raffa (ccraffa@cotton.vislab.olemiss.edu) who opened his HP48GX and
   told me about the missing chips.
3) Paul Smith (akcs.n2kyw@hpcvbbs.cv.hp.com) who wrote the text about opening
   the 48 that is included in this posting.
4) Everyone who replied to any of my first postings

In my first posting one week ago I described how to expand the HP48G to 128K  
RAM. I wrote that I couldn't connect it as port memory. Later I got the  
information about the missing chips in the G and was able to simulate a RAM  
card. I tried to reactivate the 32K internal RAM. This was possible but I could  
use the extra 128K only as port memory (not as merged user memory) afterwards  
(I posted this, too). Now I bought a second 128K chip and my G has no problems  
to merge both chips to a total of 256K. It should be possible to include a  
third chip (as port 2) and expand to 384K. Only the space needed for that chip  
could be a problem.


Now for the instructions:

1) Opening the case
--------------------
This text is written by Paul Smith:
++++++++++++++++ start forwarded text ++++++++++++++++++
Disassembling the hp48sx 
(may or may not correspond to the 48s, but probably will to some 
extent)
 
Sufficient numbers of people (more than 1) have requested information 
on how to disassemble their hp48.  Despite the fact that that's pretty 
scary, I will entail what I know here.  Thanks to David Holmes for 
taking the first step and helping make my attempt more informed.
 
None of the information that follows came from hp, so if what I say 
starts to sound rather official, it's not.
 
For the few folks out there who've actually had to send their hp48 
back to hp for service, you probably ended up with an entirely new 
unit.  I suspect the reason for this, aside from some labor cost 
savings on the part of hp, is that they really aren't much fun to take 
apart.  You can draw your own conclusions as to why it was designed 
that way.
 
0.  Backup your memory.  You will need to remove the batteries for 
awhile to disassemble the unit, and you may have them out long enough 
to cause memory loss (although in my case, even 2 days didn't wipe 
anything out).
 
1.  Remove the tin key overlay.  The overlay is attached with double-
sided tape of some sort.  A little care and patience will allow you to 
remove it only slightly warped, and it is fairly easy to straighten 
out later.  I took a small jewelers screwdriver and started prying 
near the "ON" button, and worked upward toward the screen.  When you 
get near the screen, try to preserve the shape of the overlay because 
that portion is a bit more difficult to properly straighten later.  
Once the overlay is removed, put it in a container or somewhere away 
from dust.  The double-sided tape should stay with the overlay (mine 
did, at least) and will gather dust and stuff making it less sticky if 
left out in the open.  48sx owners will need to remove the little hp 
logo insert above the screen as well.
 
2.  Defeat the 10 plastic rivets.  Believe it or not, these rivets 
aren't all that critical to holding the unit together, so you can be 
as careful or as reckless as you want (I prefer reckless, because I 
hate plastic rivets).  A good way to carefully remove the rivet heads 
is to use a flat head screwdriver that is the same width as the 
recessed rivet hole (4mm?) and "drill" the head away by hand with the 
screwdriver.  The head is about 2mm deep, so stop "drilling" there to 
leave the keyboard material shoulder intact for easier reconnection 
later.  There are 6 rivets near the number keys and four above the 
screen.  These rivets above the screen perform more of a holding 
function than the others, and you may want to consider using some 
screws and small washers to replace them when you re-assemble.
 
3.  Separate the lower half from the upper half.  The upper half of 
the calculator contains almost all of the components except for the 
piezo "beeper" element, and there are no interconnecting wires between 
halves.  The only obstacle is the snap-together "hooks" that David 
Holmes refers to. These hooks are positioned near the [A], [F], [SIN], 
[1/x], [ON], [+] and [.] keys (the one by the [.] key is a real 
bugger!).  Refer to the cutaway diagram below for details.
 
 
 
 
Key overlay here ___
                    \     ____________
                     \   |            |
             ____________|    ______  |
                             |   _  | |  <--- Upper section.
                             |  | | | |
             ________________|  | | |_|
                             |  | |___  
  Circuit board and other    |  |     |
  components (affixed to     | /      |  <--- Lower section.
  upper section)             |/__     |        Has a lip which 
                             |   |    |        engages with metal 
           Metal "hook" ---> | / |    |        "hook" from upper 
                             |/  |    |        section.
                             |   |    |
             ________________|   |    |
                                 |    |
 
 
To separate the two sections, you will need to push the lower section 
out and down around the hooks.  You can't do this from the outside 
because the upper section hangs over the lower, so you have to go from 
the inside.  Luckily, the six slots in the keyboard (used by the 
separate user-overlays that fit over the original overlay) near the 
[MTH], [ENTER], [blushift], [NXT], [backspace] and [-], come in handy 
for this.  These slots are not exactly lined up with the hooks, but 
are close enough.  You can insert something in these holes (I used a 
jewelers screwdriver, flat head) at an angle that is mostly down and 
somewhat out, to a depth of about 5mm, and come in contact with the 
lower section.  Push the lower section out about 2mm (this will take a 
bit of force), while wedging something in the outside gap to separate 
and hold the sections apart while working on the other hook positions ( 
a wooden matchstick works).  I recommend starting with the [A] or [F] 
positions first, working down whichever side you started with, then do 
the other side, and leave the [.] position for later (there is no 
helpful slot there).
 
4.  Remove the battery cover and the batteries.  The two battery 
contacts which come through the case will need to go back through the 
case when the sections separate.  The upper contact is hooked on a 
plastic boss, and needs to be freed from it.  Just pop it off with 
your finger or a screwdriver.
 
5.  Very carefully pull the two sections apart at the top (above the 
screen).  If you have freed all the hooks, the case should sort of 
hinge at the bottom edge.  This is due to the last hook (near the [.] 
key).  Some careful twisting and working of the sections should free 
this hook as well. You should now be able to completely separate the 
two sections.  I recommend at this point that you take a pair of 
pliers and flatten that last hook so that it will not hold next time.  
It is really not needed anyway, as the other six hooks hold the unit 
together just fine.
 
 
Now you can poke around and explore things.  Be careful what you 
touch, I'm not sure how sensitive the insides are to static discharge 
from your fingers, etc.  If you're interested in adding stuff, some 
open real estate can be found in the areas between the battery 
compartment and the card receivers, and in the cavities in the lower 
section below the tin shielding on either side of the card ports (this 
is where I put some jacks).  If you own a 48s, you may find a lot more 
space.
 
If you want to disassemble the unit further, like removing the circuit 
board from the upper section, you have a considerably tougher job on 
your hands, and you're on your own.  Also, if you separate the screen 
from it's circuit board, you will disturb the rubber conductors (there 
are two) which provide electrical connection to the lcd rows and 
columns (zebra strips).  Upon reassembly of the screen, you may find 
that you have lost some rows or columns in the display (not permanent, 
just a zebra strip alignment problem) and will have to keep 
reassembling and perhaps cleaning until it comes out okay.  I haven't 
done this to my hp (yet) but I have done it to other cheap calculators 
and it wasn't fun.
 
As to questions about what exactly is inside, I can only guess.  David 
Holmes had some observations, and there are apparently a lot of people 
out there in netland that know a lot more about the insides already.
 
 
Reassembly-
 
Putting it back together is much easier.  You may need to clean up the 
remains of the rivet heads so they will easily reinsert into their 
holes.  Make sure the battery connections align with their respective 
holes, and snap the unit together, applying pressure where the six (or 
seven, if you left that one near the [.] key alone) hooks are.  You 
will probably want to hold the case together at the top with one or 
two of the rivets there.  If you can find a wood screw with a flat or 
thin head, you can screw it into the body of the rivet and let the 
head hold the upper section surface.  You may need a small washer for 
this.  A machine screw will probably work as well, but will strip the 
plastic easier and not hold as well.  I have only one screw holding 
mine together and it works fine.
 
You will probably need to re-shape your tin overlay, as it probably 
took a beating during removal.  I removed the sticky tape from mine, 
but it's probably better not to (unless it really wont stick anymore).  
Put wax paper over the tape and put the overlay face down on a hard 
cover book.  Grab a hammer with a smooth and somewhat flat head, and 
pound away.  DONT pound away on the part that surrounds the screen 
(beveled part).  You can probably use your fingers and a little 
massaging to fix that area.  With a little care you can end up with an 
overlay that looks like new.  Press the overlay in place and hope it 
sticks.  If not, a little rubber cement wouldn't hurt.
 
 
Have fun!
 
Paul Smith
v055qmd6@ubvms.cc.buffalo.edu
++++++++++++++++ end forwarded text ++++++++++++++++++

2) Connecting the RAM chips
---------------------------
You have two choices for your configuration:
(A) Replace internal RAM by 128K
    You need one 128K RAM chip.
(B) Replace internal RAM by 128K and simulate a chip card in port one by one
    more 128K chip.
    You need two 128K RAM chips, a 74HC00 with SMD case and a 1MOhm resistor.

I already described configuration (A) in an earlier posting. So if you just  
want to do that better use the old posting since there is a lot of unneccessary  
stuff for you in this one.

It's not very useful to only add 128K as port memory because the HP48G (at  
least with my ROM version K) can't merge 32K and 128K. And 32K user memory and  
128K port memory is something most people don't need.

You have to use static RAM chips organised 128K * 8. I don't know the excact  
access time needed but 100ns works in my G.
HM628128 (HITACHI) for his HP48S, I found a 681000 working. Carl Raffa told me  
this is the chip that is in his GX so my choice can't be wrong (only differnce:  
it's in an SMD case in the GX). I think all chips with 128K * 8 have the same  
pin assignments (but I'm not sure!). You should use low power chips (marked  
with a L) to extend your battery live.
Since some people asked: I paid ca. $25 for one 128K*8 chip in a local store.  
The mail order price in Germany is about $18.

If you have a look on the circuit board you will see a row of pins that connect  
to the chip card slots of the 48GX. Most pins are connected in the G, too. If  
the battery case points to you the pins are numbered RIGHT TO LEFT. You can  
verify that if you know that the pins 2,21,37,38 and 39 are devided for the two  
card slots. These are the pins.

PIN:   Signal:                    PIN:   Signal:
1      VCC (only if HP48 is ON)   21     Card enable (active HIGH)
2      RAM Battery measure        22     Output enable (active low)
3      Addr. 0                    23     Data 1
4      Addr. 1                    24     Data 2
5      Addr. 2                    25     Data 3
6      Addr. 3                    26     Data 4
7      Addr. 4                    27     Data 5
8      Addr. 5                    28     Data 6
9      Addr. 6                    29     Data 7
10     Addr. 7                    30     Data 8
11     Addr. 8                    31     ??
12     Addr. 9                    32     ??
13     Addr. 10                   33     ??
14     Addr. 11                   34     ??
15     Addr. 12                   35     ??
16     Addr. 13                   36     ??
17     Addr. 14                   37     Write prot. in (act low)
18     Addr. 15                   38     Card present in (act high)
19     Addr. 16                   39     Card type (low for RAM)
20     Write enable (active low)  40     Ground

Notes:
1. In the G(X) the pins 31 to 36 aren't NC like they are in the S(X) but I  
don't know their meaning. They are connected to an empty chip place on the  
board. I assume they are needed to address the larger RAM cards (up to 4MB) and  
provide additional card enable signals. Carl Raffa told me there is a HC174 in  
the GX but if you don't plan to connect a RAM expansion box to your 48 or have  
really small RAM chips you don't need it. The G with ROM version K will not be  
able to use that at all since the command PINIT is missing in that release  
(thanks to James H. Cloos, Jr. for that info).

2. Pin 22 leads to a second empty chip place (on the right side above the  
battery case). Thanks to Carl Raffa I now know that this place has to be filled  
with an 74HC00 (costs ca. 50 cents) to decode the OE (output enable) pin for  
simulating a RAM card in the 48G.

So according to Note 2 it's your first task to solder in the 74HC00 in that  
empty place if you choose my configuration (B). The marked pin 1 has to point  
_away_ from the battery case (validate that pin 7 is connected to ground, then  
you're right). The RAM and ROM chips point to the battery case!


This is the pin layout of the 128K RAM chips:
                 __                  __      __
     Vcc A15 CE2 WE  A13 A8  A9  A11 OE  A10 CE1 D8  D7  D6  D5  D4
  ____I___I___I___I___I___I___I___I___I___I___I___I___I___I___I___I____
  I  32  31  30  29  28  27  26  25  24  23  22  21  20  19  18  17   I
  I                                                                   I
   \                                                                  I
    I                                                                 I
   /                                                                  I
  I   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16   I
  I---I---I---I---I---I---I---I---I---I---I---I---I---I---I---I---I---I
     NC  A16 A14 A12 A7  A6  A5  A4  A3  A2  A1  A0  D1  D2  D3  Gnd

And this is for the built in 32K chip. In my G it's labeled M5M5256BFP and is  
located just above the battery case (the left one of the two chips located  
there before you inserted the HC00).
                 __                  __      __
             VCC WE  A13 A8  A9  A11 OE  A10 CE1 D8  D7  D6  D5  D4
           ___I___I___I___I___I___I___I___I___I___I___I___I___I___I____
           I  28  27  26  25  24  23  22  21  20  19  18  17  16  15  I
           I                                                          I
            \                                                         I
             I                                                        I
            /                                                         I
           I   1   2   3   4   5   6   7   8   9  10  11  12  13  14  I
           I- -I---I---I---I---I---I---I---I---I---I---I---I---I---I--I
              A14 A12 A7  A6  A5  A4  A3  A2  A1  A0  D1  D2  D3  Gnd

As you can see the layout is nearly the same. Not for the pin numbers but for  
the pin places if the chips are right assigned.

I would recommend to glue the RAM just in the middle of the circuit board with  
it's upper side down and to bend all pins to the middle. If you want to get  
configuration B you can solder the first RAM chip just to the second one. Just  
leave the following pins unconnected: 22 (CE1), 24 (OE) and 30 (CE2). So you  
end up with a RAM sandwich.


These are the connections:

    128K    128K     card slot      32K chip 
    chip1   chip2    connector      (on board)

Pin  1 ----  1          ( NC )
     2 ----  2 ------- 19
     3 ----  3 ------- 17
     4 ----  4 ------- 15
     5 ----  5 ------- 10
     6 ----  6 -------- 9
     7 ----  7 -------- 8
     8 ----  8 -------- 7
     9 ----  9 -------- 6
    10 ---- 10 -------- 5
    11 ---- 11-------- 4
    12 ---- 12 -------- 3
    13 ---- 13 ------- 23
    14 ---- 14 ------- 24
    15 ---- 15 ------- 25
    16 ---- 16 ------- 40 
    17 ---- 17 ------- 26 
    18 ---- 18 ------- 27  
    19 ---- 19 ------- 28  
    20 ---- 20 ------- 29  
    21 ---- 21 ------- 30  
    22 ----------------------------- 20    see Note 1
            22 ------- 40                  see Note 4
    23 ---- 23 ------- 13
    24 ----------------------------- 22
            24 ------- 22                  see Note 4
    25 ---- 25 ------- 14
    26 ---- 26 ------- 12
    27 ---- 27 ------- 11
    28 ---- 28 ------- 16
    29 ---- 29 ------- 20
    30 ----------------------------- 28
            30 ------- 21  
    31 ---- 31 ------- 18
    32 -----32 -------------------+- 28
                                  I      
                                 +++     
                                 I I     
                         1 M Ohm I I     
                                 +++     
                                  I      
                         2 -------+        (simulate card battery since the 48
			                    measures this) 

                        1 ----+         
		              | 
		       37 ----+         (set write protect to VCC => not write
		              |          protected)
  		       38 ----+         (set "card present")
		  
                       40 ----+
		              | 
		       39 ----+         (set card type to "RAM")
		 
Note 1: Pin 20 of the 32K RAM has to be connected to VCC to disable that chip.
        So you have to desolder it. Use a small needle to bend that pin up a
	little while heating it. Connect it to pin 28 of the same
	chip. Now pin 22 of the 128K RAM chip 1 can be connected to the place
	pin 20 of the 32K was connected before. I hope someone can understand
	that description. ;-)
	
Note 2: Output enable (pin 24) of chip 1 is connected to the corresponding pin
        of the 32K RAM.
	
Note 3: Pin 1 of the card slot connector is switched by the power of the HP so
        you can't use it to supply the RAM chips (the RAM cards that normally
	are connected there have their own backup batteries). To keep the
	contents of the RAM chips pin 32 (VCC) has to be connected to pin 28 of
	the internal RAM that is always connected to the battery.

Note 4: Chip 2 (the optional chip for simulating the RAM card in slot 1) is
        connected to some pins of the card connector where chip 1 is connected
	to the internal RAM chip. The pins 2,21,37,38 and 39 of the card
	connector are devided for the two card slots. For all those pins you
	have to use only the part of that pins that has more distance from the
	battery case. This is the part for card slot 1. If you want to try to
	expand your 48 even more you can use a third chip and
        connect it like the second one except for that pins (you guess: you
	have to connect them to the part of the pins pointing to the battery
	case. Yes, you're right). The second part of the pins 2, 37, 38 and 39
	has to be connected like the first part. I never tried to use port 2 so
	it's up to you to verify this!

General note: Thijs Kaper (thijs@psy.vu.nl) gave the recommendation that
              you can swap the address lines if you want. So you can swap all
	      from A0 to A16 as you want to keep the wires short. For example
	      swap A0 and A3. You can do the same with the data lines. The HP
	      won't mind if D2 is connected to D7 at the RAM chip if all
	      address lines end up at address pins and all data lines end up
	      at data pins. I didn't do it but if it helps you...

              [ I did use this swapping on the PCB... Thijs. ]

I think this all has to sound confusing. But take some time to understand it.  
If you know a little about computer logic and addressing it's really easy.

You have to cut some of the shielding metal in the case of the HP to get space  
for the new chip(s). The metal at the battery case has to be connected to the  
rest of it (for the beep and the reset button to work). Use some cable to  
reconnect it if necessary.

Be sure to isolate everything. I glued some paper to the back side of the RAM  
chips to keep it away from the shielding. A little sheet of paper between pin  
20 of the 32K and it's former connection keeps these pins apart.

3) Closing the HP
-----------------
This is covered in the text by Paul Smith I included above. Pay attention to  
the "plus" battery connector: it has to snap back into its place or you will  
get a nice shortcut!

4) Testing
----------
Turn on the HP. If it asks "revover memory" answer with no. If it doesn't ask  
use ON-A-F to force it since it won't recognize the 128K otherwise. Press  
MEMORY NXT SIZE and have a look at that nice number.
Use ON-D to enter test mode. Press EEX and wait for "IRAM OK    128K". Press  
ON-C to leave test mode.

If you did configuration (B): either store something to port 1 or merge port 1  
to get a total of 256K user memory. If you don't merge port one that memory  
will even survive a ON-A-F without memory recovering (like a RAM card would,  
too). So it's nice to use it as backup memory if you do sysrpl or assembler  
programming. Maybe you can even insert a switch to write protect it.

The time you have to exchange batteries will now be less than before since  
there is only a electrolyte condensator (is this the right name?) that supplies  
the RAM when the batteries are out. I didn't test the maximum time but it's  
enough time to exchange batteries. My G has to supply 3 RAM chips now since the  
32K is disabled but it's still powered.

Please be aware of the ROM version L bug (that should be in the K, too) about  
loosing memory when the clock is in the display. Read about that in the FAQ!

My next idea is to reenable the 32K as port 2 memory. I will try it in some  
days. If you're daring you can try that if you should decide to expand your G  
before. This way that chip isn't useless.

Maybe I should think about adding a hard disk after that... no, just kidding.


IMPORTANT:
==========
I don't know if this works for anyone except me. I don't give any warranty on  
this text. It's your risk. You will at least loose your warranty, maybe you  
loose your HP. I expanded my HP on 05/28/94 to 128K and today (06/07/94) to  
256K. If you want to wait for a long time test feel free to mail me in a month  
or so. Wait at least some days until some people have read this text and  
thought about it. Try to understand the reason for the wiring I used and  
validate it before you try to expand yout G.

I would be happy if I get some mail about this posting. The mail I got the last  
time was really nice.

Greetings,  Thomas

--

Thomas Otten      otti@megatel.de (NeXTmail welcome)      
                  megatel GmbH * Wiener Str. 3 * 28359 Bremen * Germany
                  Voice: ++49-421-22095-0     FAX:++49-421-22095-16                                      

------------------------End of included Posting-------------------------------

And here's the posting about the solved "problem"....
------------------------------------------------------------------------------
Newsgroups: comp.sys.hp48
From: otti@megatel.de (Thomas Otten)
Subject: Experiences with memory expansion
Date: Mon, 12 Sep 94 09:58:04 GMT
Lines: 29

Richard Cox asked me about experiences with the memory expansion for the
HP48G I posted some months ago. Since his replay address bounces (sorry  
Richard) and this may be interesting for some of you I'm posting it "to the  
world":

The memory expansion of my 48G works quite well.

I just had one problem: I lost memory twice after the HP stayed turned off for  
some days. I think this is caused by my use of rechargeable batteries since  
they don't have as much current as normal batteries (HP warns about using them  
but I don't like spending much money for batteries). The solution that works  
for me is rather simple: I entered a timer repeating once a day executing  
simply a "off" statement. This seems to be sufficient to refresh the ram. The  
HP has a device that transforms the battery power to 5V (and some other  
currents for the LCD...) no matter how low the batteries are. This device  
doesn't work when the HP is turned off so the memory just gets what the  
batteries deliver. Maybe my new ram chips work near their current limits when  
powered by rechargeables. This way the 48 surviced my four week vacation  
without harm to the memory. I never had any problems ever after.

I can't guarantee what I describe was really the problem but since my  
workaround works...

Does anybody who tried the expansion use rechargeable batteries, too?

--
Thomas Otten      otti@megatel.de (NeXTmail welcome)      
                  megatel GmbH * Wiener Str. 3 * 28359 Bremen * Germany
                  Voice: ++49-421-22095-0     FAX:++49-421-22095-16                                      

------------------------End of included Posting-------------------------------

