
                  pp65 - a 24C/LC65 programmer

                    Version 0.1b - 1995-06-26

              Luca Bertagnolio <berta@dsi.unimi.it>


This simple program can be used to program Microchip SEEPROMs 24C65
and 24LC65 from a standard PC parallel port.  It is based on David
Tait's PIC 16C84 programmer (called pp) code.  I felt that keeping
almost the same name was kind of a thank to David who wrote such a
nice piece of software, releasing the C source too.

I am releasing the source code myself, so that anyone interested can
add or modify it.  It is quite rude, I am no C programmer so I struggle
to get things working at last!  Please be kind if you modify and redistri-
bute parts of this code;  keep a note in the source and a thank in the
documentation!

The hardware needed to program the SEEPROMs is the same used for pp
and for the similar PIC programmer by Henk Schaer.  The code and EXE
found in this archive use the pinout from Henk's design;  I use both
pp and PIC.EXE, so I modified the original pp code in order to use
the different pins found in Henk's design.  Of course one can change
the defines in pp65.c to his own needs, but be careful and don't blame
me if things go wrong and you smell smoke!  The PIC programmer also
uses a +12V line, which 24C/LC65 don't like very much.

The adapter cable I use to connect the 8-pins SEEPROMs to the 18-pins
PIC socket is built this way:

   PIC socket     SEEPROM socket
  ------------   ----------------

   pin 5 Vss       pins 1-2-3-4
                  A[012] and Vss

   pin 12 RB6        pin 6 SCL

   pin 13 RB7        pin 5 SDA

   pin 14 Vdd        pin 8 Vcc

I made this cable out of some spare flat cable with a couple of sockets.

The use of the software is very easy;  it uses binary files, as I use
them for my projects, but can easily be modified to use HEX files;
just take the corresponding functions out of pp.c and modify pp65.c
accordingly.

I tested this software on a 486DX2/50 machine, and got it working quite
well;  sometimes some verify fail, but after another programming cycle,
everything is fine;  if anyone wants to dig better in timing problems,
be my guest!  There are some timing constants in the code, just play
around them and see if things improve.  I found this very little annoying,
so I decided not to lose time on it.  It takes just about 40s to program
a SEEPROM, and just seconds to read or verify it.

I used Borland C 3.1 to compile pp65, but I am sure that things can work
under any compiler.

And last, some thanks.  First to David Tait <david.tait@man.ac.uk>
who wrote almost all of the code which I modified in order to give birth
to pp65.c (!), to Henk Schaer <henks@cistron.nl.mugnet.org> whose interface
design is the one I built, to Tibor Bosnar <tbosnar@public.srce.hr> who
inspired me in the first place, and last to Mimmo Pitasi <mpitasi@micronet.it>
who helped me programming the 24C65 before I wrote pp65;  he will now no
longer see me so often, bad (maybe) for him but sure good for me, since he
lives on the other side of the town!

This archive contains:

  pp65.c    - the source code
  pp65.exe  - the Borland C 3.1 compiled EXE
  david.txt - David Tait's design for the interface
  henk.txt  - Henk Schaer's design for the interface
  readme    - you're reading it

Please, let me know via Email if you use this software, and what you
like or dislike.  Suggestions are always welcome, and I will consider
further improvements time permitting.

Luca Bertagnolio <berta@dsi.unimi.it>
Milan, Italy
