[comp.sys.amiga.hardware] Erpommer Docs

whinery@hale.ifa.hawaii.edu (Alan Whinery) (01/04/91)

Here is the DOC file from the Eprommer project:
(On abcfd20.larc.nasa.gov)


March 23, 1989
                           ABOUT THESE FILES

Eprommer.doc - this file.
Eprommer.pic - the schematic, a dpaint picture.
Personality.pic - schematics for the personality
     modules, a dpaint picture.
Eprommer.bas - The basic program, an ascii file.
Eprommer.run - The compiled program.
Exec.bmap - one of those files you have to have to use
     kickstart routines from basic.
There are also .info files and maybe a batch file for
     renaming files with big names.

                         WHAT ARE WE HERE FOR?

     I designed an EPROM programmer and wrote some software for it. Here
we have the schematics and the source and compiled versions of the
program. I designed this programmer to read and write sound chips for
drum machines and drum pads, so the software has some extra features
that can do some conversion of different data types, as well as raw
AMIGA sound files. Since I've built it, it's been used for other EPROMs
as well. It will read and program 2716 to 27512 EPROMs. It will also
read 24 pin 8k roms as well. Also, it wouldn't take much to modify it
for 32 pin EPROMs up to 4 megabit. The software works pretty well, but
even compiled, it is still written in basic and can't use all the neat
features that C programmers have at their disposal. I promise to learn C
someday. The hardware is first rate. By the way, this whole shebang is
my property and you are only allowed to build it and use the software
personally, no selling or profit-making without my written consent. You
may send the entire arc-ed file to other networks as long as you do not
remove anything from it. I also intend this programmer and the software
for casual use around the house, and can not be responsible for damages
from it, it's use, etc. The EPROMs it makes work fine for me, but don't
put one in a heart-lung machine or an MX missile. Especially not in an
MX missile.(though I have heard that worse parts have gotten into a
few). 

                        WHAT YOU SHOULD DO FIRST

     If you haven't executed the execute.me file, you should do that.
Then you can delete it. Print out the pictures. When you look at them,
the aspect ratio may seem a little squat, but they will print nicely.
The pics are 640x408, 2 color. Set preferences pitch to elite.
(important!) In the dpaint print menu, set margins at 1 and 64, page
height 34 lines, %high=100, %wide=100. Use the old preferences printer
drivers, they glitch less from dpaint. There's one on the boards called
newepson.dri that doublestrikes and looks real good. Print out the .bas
version of the program. It's rather large, but hopefully not so
fragmented and batshit that you won't be able to figure it out with a
little help and understanding of the circuit. Actually, the software is
self-explanatory, you can use it without 
knowing how it's done.

                           ABOUT THE CIRCUIT

     The first part is the power supply. It requires an ac adapter with
a 12vac rating, meaning more than 12v unloaded. Half wave rectification
is used, and a voltage doubler for the programming voltage. There's a
negative 1.2 volt bias supply so the 317 regulator can swing to 0 volts.






The 317 has three transistors attached to it so it can supply three
programming voltages plus either high or low TTL level, depending on
jumper 8-9 on the personality module. The programming voltage is
software selectable. The first 74HCT374 turns on and sets the
programming voltage. It also can set up one of the other 374's for
latching an address. It does it like this: When we make SEL high, the
first 374 latches onto a byte from the parallel port. If the first
bit(loaddr) is low, we have set up the third 374 so that when we then
make SEL low, the third 374 is clocked, latching the lower address. This
all assumes we have been stuffing the appropriate data out the parallel
port. So we go like this: stuff a command out parallel port, clock SEL
high, stuff a byte of the address out parallel port, clock SEL low,
stuff a command out parallel port, clock SEL high, stuff other byte of
address out parallel port, clock SEL low. Now you have the address set
for the EPROM, and you can read or write it. BUSY is hooked to both OE
on the EPROM and DIR on the 74HCT245, so if we want to read the EPROM we
first should make the parallel port tri-state, then we can pull BUSY low
and the EPROM's data will be sent to the port where we can read it. If
we want to write to the EPROM, we would leave BUSY high, set our
programming voltage, and pulse POUT low. POUT is connected to PGM on the
EPROM, so that's all it takes. On 2732 and 27512 EPROMs, some pins do
more than one thing, so we have to change the program slightly for them,
but basically that's it. The personality modules adjust the pinout for
the various EPROM types. By the way, you will notice there are 3 unused
pins on the command 374. You can hook anything you want there, but I  
intended to use them for the extra address lines required by some of the
new jumbo EPROMs in 32 pin packages. Keep your eyes peeled for updates.

                            HOW TO BUILD IT

     I wire-wrapped the thing and put it in a plastic box. I suggest
using a double row header or some kind of connector right on the
perfboard so you don't have a big cable hanging off the end while you
are trying to build it. I also used zero insertion force sockets for the
EPROM and the personality modules. I plugged and glued the ZIF sockets
into wire wrap sockets on the board to get them in the air. I glued all
the sockets to the board. For ICs, you will need three 74HCT374, one
74HCT245, and a 74HCT02. You can probably use LS parts, but HC will
probably not work. You will need a 7805 and a 317 regulator, and if you
use TO-220 packages you won't need to heatsink them. I used a 12 vac,
800ma AC adapter, you can probably use one rated at 500ma. The current
requirements are not steep, but we only half wave rectify plus the
voltage doubler, etc. So much for sentence fragments. Don't substitute
1N4000 types for the 1N914s, we need speed in one place and voltage
drops in another. You must include the .01-5.1k termination on the three
control lines to avoid false clocking when we change data on the
parallel port. I smoked a few EPROMs before I figured that out. I had a
real long cable, and the programming voltage would come on while I was
reading EPROMs. 27512s die when they get 25 volts. You will need some 16
pin dip-type headers to make into personality modules. They are just
jumpers, and most do a couple of EPROM types. 

                           ABOUT THE SOFTWARE

     Pretty much the first thing that happens is the allocation of 64k
of ram. This is a scratchpad area where we can move data in and out, cut
and paste. It is the place where all data tranfers must pass. I used the
system's mem-alloc function to allocate this ram, for two reasons. 1)
Basic arrays are limited to 32767 words, 2 bytes shy of 64k. 2) Basic
moves arrays whenever a new variable is defined, and I feel






claustrophobic if I can't create a new variable when I want to. This
causes at least one problem. You must have Exec.bmap in the same
directory as the program. No biggie. Also, this program will not run on
a 512k Amiga. This may be because I do not fully understand the
mem-alloc function. It is not clear to me if this is because I requested
fastram or because this program is huge. It isn't that big, so I assume
there must be a way of requsting fastram if there is fastram, and chip
ram otherwise. This is not a problem except when I need to use a 512k
AMIGA, something I avoid whenever possible. The program then does the
normal menu action, and you may notice the dorky basic-style file
system. Another reason to learn C, then I could use the slick
menu-driven file handlers. It works if you remember filenames. The meat
of the eprom part of the program is something reminiscent of the C64.
That is, where do I poke for the CIA?  That is right, I poke the
hardware directly. So don't try to print from your word processor while
programming EPROMs. Maybe I will OPEN the parallel port officially in a
later version of this program so we won't have any conflicts. Uh-oh,
another small problem. Timing. I added do-nothing loops to get the
one-millisecond programming pulses right. THE TIMING WILL ONLY BE RIGHT
ON THE COMPILED VERSION OF THE PROGRAM. If you insist on programming
from the basic interpreter, you should take out the do-nothing parts or
else zero them out. Also if you do other things while programming
EPROMS, you are likely to get some longer than normal pulses. This is
not likely to cause any problems, but if you are programming 27512s, you
might be tempted to play workbench lander while you wait, and it will
take even longer to program the chip. It is unlikely that the chip will
be harmed. By the way, a 2764 takes about a minute to program, and a
27512 takes about 12 minutes. 
     The extra features: Two's complement. When going between AMIGA
sounds and, say, E-MU E-DRUM sounds, you must translate 0 to 255 numbers
to -128 to 127 numbers, or vice-versa. That is what Two's complement
will do, take the ram you specify and massage it. By the way, the AMIGA
uses -128 to 127for it's sound files. Expand and compress are not
implemented as of this writing, but they are for translating 12 bits
compressed to 8 bits (such as Linndrum or Drumtraks) into AMIGA samples
or vice-versa. I also intend to include a SHUFFLE routine into this
program, to take alternate address bytes like a 16bit machine into
contiguous bytes like an 8bit machine, useful for data files, not sound
samples.
     By the way, use the pulldown menu to exit the program rather than
the close window dot. The system may not properly close all files and
reallocate memory otherwise. Also, to read 2364A ROMs, tell the program
you are reading a 27128 EPROM, but use the 2364A personality module.
Also you must add 4096 to all EPROM addresses, ie to read an entire
2364A, tell the program to start at EPROM address 4096 and to read 8192
bytes. I did it this way because there weren't enough pins on the
personality socket to include A12.

                            CLOSING COMMENTS

     This programmer works pretty well, but if you'd like to improve it
or the software, please feel free. I would love to hear from anyone with
comments, as well. I have yet to find anyone to share hardware hacks on
the AMIGA with. There are a few other projects I will probably upload
eventually, so keep your eyes peeled. By the way, if you haven't built
electronic projects from scratch before, check with an expert before
attempting to build this circuit. The schematic makes certain
assumptions about your electronic prowess.
     If you would like to reach me, you may send E-mail to PeopleLink,
my handle is BOFFO*BOB. You can also send  E-mail to MCAB-BBS(a local






Amiga BBS) at 707-964-7114 to BOB BLICK (my real name). My address for
real mail is:
Bob Blick
Box 916
Mendocino, CA 95460