From: ap@dde.uucp (Allan P. Petersen)
Newsgroups: comp.sys.handhelds
Subject: HP48: Epson RAM card surgery [long]
Keywords: RAM card, Epson, CMT
Date: 20 Feb 91 09:55:47 GMT
Organization: Dansk Data Elektronik A/S, Herlev, Denmark

Epson RAM card surgery ...  or:  All about RAM cards.
------------------------------------------------------------
                by   Allan Petersen
                Dansk Data Elektronik A/S,   Copenhagen
------------------------------------------------------------
 
Shortly after  the introduction of the HP48sx it was mentioned here
on c.s.h. that Epson RAM cards possibly could be used in the 48 and
that  HP RAM cards in fact were custom versions of Epson cards.  It
was later pointed out that the standard Epson RAM cards should  not
be  used  in  the 48 because of different electrical specifications
than the HP custom version.

[ this is definately true - I know of one person who sent their
calc in for "warranty" work after using an unmodied Epson RAM 
card in the '48 - robin ] 

I followed this discussion with interest and later when  I  got  my
48sx,  I  looked  for further info on the specs of Epson cards.  I 
found some specs and studied them carefully;  recently I  found  a 
supplier of cards and asked for prices and delivery times.
 
I  have now got a RAM card,  have made some tests on it,  and have 
made some comparisons to the CMT RAM card and the HP Eq.  Lib. card
(as mentioned recently by a colleague of mine Arne Christensen here
at DDE).
 
Here I will describe the test results; but first the prices:
 
[ note date of Feb 91 - I am not sure if prices are current - r ]

In Denmark the price of the 32k Epson RAM card is 72 $ and the 128k
Epson  card  is  157  $.  Both  prices  are  based on single piece 
quantities and are excl. sales tax.
These  prices  more  or  less  correspond to the EduCalc prices of 
HP/CMT cards but as the 32k/128k Epson card cost  respectively  81%
and 56% of the 32k/128k HP card here in Denmark, I would expect the
Epson cards to be slightly cheaper in the States than the mentioned
prices from here.
However  from  a  cost point of view there is not much to hope for,
the best advice seems to be: Buy from EduCalc.
 
Well, being of a curious mind, I could not resist the challenge and
finally got a 32k Seiko-Epson RAM card (type  no.  RBC032IE10,  the
128k  card  is  called RBC128IE10) hoping to be able to change the 
voltage detect level and/or add some extra RAM chips to  the  card.
Other types (OTP EPROM/EEPROM/Flash EEPROM/MASK) are also available
from Seiko-Epson.
 
It was indeed somewhat of a challenge but so far I have managed  to
change  the detection level,  which I will describe to you a little
later; first concerning the specs:
 
I can in every respect confirm that every piece of  information  on
the  HP  cards given here by Jim Dickie,  Steve Harper and Preston 
Brown  (all  from  HP  Corvallis)   is   in   fact   correct   and 
considered:        
 
I  have  found  that the standard Epson RAM card that I have clamps
the address and control lines to ground until  the  supply  voltage
reaches 4.20 volts and again clamps the lines when the voltage goes
lower than 4.15 volts.
The data lines are not clamped. 
These  measurements were made with the card inserted in an original
Seiko-Epson card socket,  not the 48.
 
The  voltage supplied from my 48 to the card is 4.24 volts when the
48 is  running  programs  (battery  midt-life  or  so,  version  E 
calculator).
 
This  means  that  there is typically  a  chance that the card will 
work if inserted, but the margin is very limited. As earlier stated
here the powersupply of the 48 is stabilized and not very dependent
of battery state; however when the batteries become almost empty at
some  point  the  stabilizer wil not be able to sustain the needed 
voltage and the RAM card will clamp its inputs long before  the  48
stops  operating.  This  has a very high chance of causing a memory
lost (or something worse...) as the clamps are rather effective: On
my  card it takes about 10 mA per line to pull the line to 0,4 volt
and 25 mA to pull to 1 volt.  This corresponds  to  about  40  ohm 
on-resistance,  which  makes  me  guess  that  the controller uses 
on-biased MOSFETs on the inputs in the clamp-state.
 
There is no way the 48 will be able to pull-up all  these  lines,  
therefore:  DO NOT USE A STANDARD EPSON RAM CARD IN YOUR HP48 !!
It may work for a time, but you are on very, very thin ice here !
 
The only way to safely use an otherwise standard Epson RAM card  is
to change the clamp voltage detect level on the card and at the end
of this article I will describe how to do this;  but if you do  not
feel  absolutely  sure  of  what  you  are doing,  I will strongly 
recommend that you order a HP card from eg.  EduCalc (I can  highly
recommend EduCalc for their excellent service,  I speak of personal
experience). The cost saving - if any - on changing a standard card
is  not  worth  the change of a possibly damaged card - or damaged 
calculator :-).
 
BTW:  No,  I have no connection in any way to HP,  I just happen to
      love their products and quality!
 
Some more specifications:
 
The  card  has  of  course the same mechanical dimensions as the HP 
card,  although  it has no plastic handle to help in  removing  the
card  from  the calculator,  it has 40 pin connections on a contact
pitch of 1.27 mm,  pattern width 0.8  mm,  pattern  gap  0.47  mm,  
contacts have min.  0.3 micrometer gold over min.  5 micrometer Ni,
and the shutter mechanism is guaranteed for 10,000 insertions.  The
front  and  rear  are covered  by stainless steel panels to protect 
against statics, noise and shock. The card and connector are keyed,
preventing incorrect insertion.
The data interface is 8 bits wide. 
 
I  have  made some measurements of current consumption,  but I will
not give you any figures,  as there is often a factor of up to  100
between the max. RAM chip current over temp and the typical current
at room temp and it is in fact this current that  will  decide  the
lifetime  of the back-up battery;  the current consumed by the card
at 4.4 volt (or other voltage) from the  calculator  is  irrelevant
from a back-up point of view,  although it in some cases may have a
small influence on the lifetime of the batteries in the  calculator
itself.
 
The main part of the card's standby current consumption from the 48
is probably caused by the controller chip (gate array) in the Epson
card;  the standby current is specified as max.  1.15  mA,  but  a 
current this high is NOT taken from the back-up battery when the 48
is off.  Only the RAM chip data retention current and a very  small
current  for  the  controller to keep its clamps on-biased is taken
from the Lithium battery.
 
The CMT card is claimed to use much less than the 1.15 mA, which is
very  likely,  as  the CMT card is probably designed using standard
CMOS chips, but this difference does not need to have much relation
to the actual back-up currents from the Lithium battery.
 
I agree that the Epson card controller will consume a small current
to keep the clamp MOSFETs on and to bias the  gatearray,  but  this
should not be that significant.
 
The standard Epson card is specified for  a  typ.  data  retention 
periode of 4 years at room temp.
 
When you look down at the gold contacts and hold the battery end of
card away from you, the leftmost pin is pin number one.
 
The pin connections are:
 
PIN:   Signal:                    PIN:   Signal:
1      Power supply input         21     Card enable (active HIGH)
2      Batt. out/ EPROM Vpp       22     Output enable (active low)
3      Addr. 0                    23     Data 0
4      Addr. 1                    24     Data 1
5      Addr. 2                    25     Data 2
6      Addr. 3                    26     Data 3
7      Addr. 4                    27     Data 4
8      Addr. 5                    28     Data 5
9      Addr. 6                    29     Data 6
10     Addr. 7                    30     Data 7
11     Addr. 8                    31     nc     How are these
12     Addr. 9                    32     nc     lines connected
13     Addr. 10                   33     nc     in the 48?
14     Addr. 11                   34     nc     Could really be 
15     Addr. 12                   35     nc     nice to have   
16     Addr. 13                   36     nc     waitrequest here!!
17     Addr. 14                   37     Write prot. out (act low)
18     Addr. 15                   38     Card present out(act high)
19     Addr. 16                   39     Device type (low for RAM)
20     Write enable (active low)  40     Ground 
   
It  can  be  seen  that the card enable signal is active high;  on 
standard EPROMs the enable signal is active low,  so if you try  to
make  an  adaptor for an EPROM programmer,  you need to invert this
signal in your adaptor.
 
Some signal lines are used to indicate card present,  writeprotect,
and ROM/RAM type.  If the writeprotect switch on the card is set to
protect position,  the 48 will not be able to change the card data,
not even in a memory lost/lock-up situation.
 
The card battery voltage is measured via a 1M resistor.
 
And now to the exciting part:    OPENING THE CARD.
   
Remove the battery and use a scalpel to very carefully lift and cut
loose the stainless steel  panel  on  the  upper  side  (the  side 
opposite  to  the  side  where  the  contacts  and the shutter are 
located). Be careful not to damage the inside of the card - or your
fingers :-).
 
Near  one  edge  by  the  battery  there is a metal spring used to 
connect the two steel panels to keep them at  the  same  electrical
potential.  You  will probably damage this spring when you open the
card (so did I).  You must remember to put in a new spring when you
assemble  the  card  again (I used a piece of conductive rubber) in
order to keep the protection against statics.  Also be careful  not
to  damage  the springs for the shutter mechanism;  put a piece of 
tape over them until you assemble the card again.
 
When you have removed the panel, you will (on the 32k card) see the
following:
 
A position for a 2016 Lithium battery (coin cell, not supplied with
the card) and close to this the write protect switch; positions for
4  pieces  of  32k  RAM  chips,  with  one position occupied.  One 
decoder/controller chip (Seiko-Epson proprietary gate  array),  and
another  smaller  chip which is the voltage detector chip.  Several
surface mount capacitors used for  decouplings  and  some  surface 
mount chip resistors. Four gold plated test points.
 
The  PCB  is  of good quality with gold plated contacts and bonding
pads.  Also the plastic card frame and the shutter mechanism  seems
to  be of high quality,  so in my opinion the card will stand up to
the usual high quality that we associate with HP products.
 
There is no plastic handle like the one found on the HP version, so
the card can be difficult to remove if inserted into the 48, but it
is easy to glue some kind of grip onto the card if you wish to.
 
Unfortunately the chips are fastened directly to the PCB, bonded to
bondingpads  on  the PCB and covered with drops of epoxy,  so it is
not possible to use standard small-outline RAM chips to extend  the
memory.  The chips actually used are standard dies (you can see the
familiar bonding pad layout known  from  eg.  27C256  EPROMs  with 
quartz window).
 
You  can't  solder out the detector chip either :-(;  but the test_
point located away from the three others happens to be  the  output
of the voltage detector.
 
If you cut the PCB trace (be careful...) from the smaller IC to the
testpoint,  you can now via the testpoint access the  clamp  enable
input of the gate array!
 
This  is  very interesting,  because you can now add a new voltage 
detector IC and thereby change the detection  level  at  your  own 
choice (provided you can get the correct detector IC).
 
The  detector  IC requires three signals:  Supply voltage from the 
card connector,  ground,  and a detector output, which is connected
to the clamp enable input of the gate array.
The three testpoints close together are ground (closest to the card
edge),  some kind of detector checkpoint,  and card supply voltage.
It is not possible to change the original detector  level  via  the
detector  checkpoint,  but  the detector hysteresis may be changed 
(although this just makes things worse :-)).
 
I know of two types of voltage detectors that can be used:
    Seiko Epson Corp.  type SCI7701YHA  (typ. 3.2 volt)
or  Seiko Instruments Inc.  type S-8053ALR-LJ-X  (typ. 3.25 volt).
 
These are SOT89 surface mount packages and can be connected to  the
required testpoints with thin, isolated wirewrap wire.
 
I do not know the price of the detectors, I just got a few samples.
I have placed the detector in one of the three empty positions  for
RAM  chips  and  with  a  fine  solder tip I melted grooves in the 
plastic frame to make room for the wires.
 
If you can get a detector IC,  you will probably also be  able  to 
find  the  pinconnections  of the IC,  so I will not go into these 
details.
 
You may use a different voltage version of the detector (when using
an  open  drain  version  instead  of  a CMOS version a pull-up is 
required),  but the voltage should be between 3.2 and 3.9 volts for
best  results.  If  the  voltage  is too low,  you may end up in a 
situation where the RAM chips may  take  power  from  the  back-up 
battery  while  they  are  active;  this  will exhaust the back-up 
battery very fast and you may even risk to loose data  memory  when
your main batteries are down.
 
Under  normal  battery  conditions  this will not occur with a low 
detector voltage as the supplied voltage from  the  48  will  drop 
rapidly below the clamp voltage when the 48 is switched off;  so if
you just switch off your 48 immediately when a low main battery  is
detected,  you  can  safely get away with using a detector voltage 
down to about 2 volts. I have tried 2.6 volt with no problems.
 
After these changes carefully glue the panel in place  again,  glue
on a plastic handle, put on some nice labels on the card, install a
2016 lithium battery,  set a  battery  alarm,  and  you  have  got 
yourself a RAM card for your 48.
 
Sounds complicated?     Well,  then  don't do it;  but if you tried
something like the memory expansion of the HP28C  as  described  by
Wlodek, I think you will find this very interesting also.
 
Some comments on the CMT card:
 
I have found that the CMT card does not clamp the signal lines,  so
in this respect you won't get problems. However this could make the
pins more sensitive to static electricity, especially when there is
no shutter mechanism to cover the contacts.  CMT also warns you  to
keep  the  card  in the anti-static bag when the card is not in the
48.
 
It has been claimed that CMT uses tranzorbers on the  signal  lines
for protection; sounds good, that will give you adequate protection,
but then why does CMT put so much emphasis on  the  protective  bag
issue?  I  have  not  tested  the  card  with voltages outside the 
specified normal range,  and I have not seen the inside of the card
(Arne  would  not  let  me open his CMT card :-) :-)) so I can not 
really judge how protection is made.
 
On the other hand I  have  not  yet  seen  commercially  available 
tranzorbers  for  surface  mounting - but I may be wrong here;  if 
someone will give me a CMT card,  I certainly will make  a  closer 
examination :-).
 
The  mechanical dimensions of the CMT and the HP cards are somewhat
different:  the CMT card has a thickness of 2.0 mm at  the  contact
area  and  a thickness from 2.42 to 3.0 mm on the body,  where the 
measures of the HP card are 1.80 mm and 2.3 mm.  Thus the  required
insertion force for the CMT card is rather high.
 
It  is  very difficult to see if the CMT card corresponds correctly
with the connector keying or not,  but when inserted in a  separate
card  connector  you can see that the contact fingers are not fully
depressed,  there is still a clearance of about 0.2 - 0.3 mm behind
them,  so I assume that the contacts themselves will not be damaged
by inserting the CMT card, but I can't see if that is also the case
with the sockets in the 48 itself, as I have not taken the 48 apart
to see if the sockets are standard Epson sockets.
 
The contacts of the CMT card does not seem to be of the same quality
as  on the original cards;  the PCB traces have blurred edges,  not
straight and sharp lines as you usually see on PCB's for professional
use,  but if the traces on the board are intact, you may argue that
these are only cosmetic flaws.
 
After all,  I do not see any really serious reasons why you  should
not use a CMT card in your 48 calculator as long as you mainly keep
the card in your calculator instead of using  it  as  an  exchange 
medium; but I don't like the high insertion force. If you are going
to make a card for the 48,  why not make it  the  same  mechanical 
dimensions as the original cards?
 
I think the price difference is not enough to justify the electrical
and mechanical differences.
 
What is the next project here?     Well,  some form  of  programmer
for Epson EPROM or EEPROM cards,  I guess.  I have noticed that the
HP Equation Library card - and  therefore  also  the  Epson  EPROM 
cards,  I  hope  -  do  not clamp the signal lines on a low supply 
voltage.  It will then be easy to design a  programmer  for  these 
cards and use them in the 48.
 
Some  time  ago HP released a very useful MSDOS program USRLIB that
enables you to build libraries for the 48.
 
However I do not have a PC,  so I was very,  very pleased  to  see 
Frank  Ochoa's  TOOLS.48  that Friedrich Schroeder sent to c.s.h.  
recently.  Very nice. I can recommend the >LIB function. Now we can
build  libraries  in  the  48 itself.  Great.  Then we just need a 
convenient way of programming EPROM/EEPROM cards (I know  that  CMT
has a programmer,  but it is priced at 280 $ ...,  I also know that
EduCalc has a programming service,  but I would like to do this  at
home).
I'll  try to work something out,  so that I can make my own library
cards, so stay tuned.
 
Now,  after  going through all this,  what would I really recommend
you to do concerning RAM cards? In my opinion it goes like this:
 
- You CAN modify standard Epson cards but it is  hardly  worth  the
  effort,  so  buy the HP cards and buy them where you can get them
  at the best price (I can recommend EduCalc).  This will give  you
  the best value for your money in the long run.
 
 
Disclaimer:   Don't blame me if something goes wrong  if  you  use 
              some of my ideas;  these opinions are mine alone, but
              you may have them if you want to :-).
              I do not speak on behalf of anybody else and have no
              connections to HP, Educalc or Epson.
              Even  my  employer  may have opinions different from 
              mine and can not be held responsible either.
 
Allan 
 
-------------------------------------------------------------------
Allan Petersen     HP25/HP19C/HP15C/HP28S/HP48SX/HP??    ap@dde.dk
-------------------------------------------------------------------