Friday, May 27, 2005

 

Eproms.....

What is an Eprom?

Computers, fruit machines, household appliances, in fact all sorts of electrical equipment these days use microprocessors to run. These processors need to be told what to do, and these instructions need to be stored somewhere permanent.

This is where the eprom comes in, it stands for
Eraseable Programable Read Only Memory

To keep it simple, its a memory chip, that you can erase, program, use.
You can then upgrade the program, by erasing it again and reprogramming it.

This makes them ideal for any device that needs updates from time to time.



Above is a picture of a eprom, notice the little window in the middle of it?
This is a quartz window, and if you shine Ultra Violet light through it for long enough, the contents of the eprom will be erased. Even sunlight contains enough UV to erase an eprom (but it could take days or weeks), so normally a small sticker is placed over the window to stop any light from entering and accidently erasing it.

Special devices called Eprom Erasers (original name eh) are available to erase eproms in a reasonable amount of time, normally the contain a UV lamp controlled by a timer which you can set between 0 and say 1 hour, depending on the eprom being erased.

Datasheets are availabe (free of charge) for eproms, which tell you all the info you need to know about the eprom in question, including how long you need for it to erase, how to program, etc.

If you want to learn more about how a eprom actually works, internally, then do a quick google search, there are plenty of links that explain the physics of it better than I ever could :)

How to program an eprom.

Well the easiest way is to buy an eprom programmer, there are countless available ranging from low end simple ones, to ones costing thousands that can program everything apart from the kitchen sink.

I recently purchased one on ebay, so I will give a quick run down of how I made a backup copy of the eprom in my fruit machine.

I chose the fruit machine as it is quite old now, and I could see a real result once I had burned the eprom, making it all the more worthwile.
Note the pictures in this post are not of the eprom I programmed, nor the card from the fruit machine. I could not be bothered to take the old machine to bits again, so I just used a card from another machine that was already sitting on my desk for the photos.

The Programmer.

The programmer I purchased on ebay, is a ART-EPP2 programmer.
It is discontinued now, but the manu still supports it enough to offer software downloads for it. I got hold of it cheap, but I did take a gamble as it was untested. Thankfully the gamble paid of, as it works fine!



As you can imagine, with an eprom having many tiny legs on it, they are quite fragile, so taking one in and out of a board over and over can weaken the legs, bend or even snap them.

Thats why this, and most other programmers have what is called a ZIF (Zero Insertion Force) socket. Thats the block at the end with the little lever, you lift the lever, and you can drop the eprom in, with no pressure needed, lower the lever and it gently clamps down on the legs making electrical contact with it. It literaly is what its called, a zero insertion force socket. They are a must, dont get a programmer without one, or your eproms wont last as long.

My first problem was finding a lead for the programmer, it communicates with the PC through the parallel port, normally used for older printers.

Luckily I had a old lead from a 2 way printer switch that fitted the bill perfectly,
if I did not have that lead, I would have either had to buy one, or make one up.

The lead itself is just a straight through (ie pin 1 to pin 1, 2 to 2 etc) 25 pin male to the 25pin parallel connector on the pc.

Once I had a lead sorted, I plugged the mains in (standard kettle / pc lead) and hoped for the best. The little red light came on, and no smoke came out, so it was looking good.

(Electronics components run on smoke, if you let the smoke out they wont work. Quote by some professor, cant remember his name, maybe someone out there can comment if they know)

I downloaded the software, which I found by doing a google search for ART-EPP2 and installed it.

I didnt bother trying this on XP, I decided to use win ME, at first, as this would be less likely to cause problems (XP tries to stop people accessing the hardware directly and can cause all sorts of grief with older software)

This is where things didnt look so good, it refused to autodetect the programmer.


To get round this, I had to shut down, and unplug the programmer for a little while,
this seemed to cure the problem, and it worked fine. Occasionally it screws up, but
unplugging the programmer for about 10 secs seems to solve any problem.

Once into the software, the first thing to do (after you have autodetected the programmer in use) is to get the eprom we want to read.

Here is a example of a program card from a fruit machine,



Taking the lid off will reveal the 4 eproms in their sockets (eproms are usually socketed, as they are meant to be removed for updates).
  • Remember doing anything like this will probably invalidate any warranty.
  • You do it at your own risk!



    Removing a eprom from its socket isnt too hard, but do it carefully or you will snap or bend the pins. Do one eprom at a time, dont take them all out at once, then realise you forgot which eprom went in which socket!

    To remove it, insert a small flat blade screwdriver under the eprom at one end, gently lift it a little, then move to the other end and do the same. Repeat until the eprom is clear of the socket. Observe anti-static precautions, dont zap the prom with static, touch something metallic first to ground yourself and discharge any nasty flying sparks from your body.



    Now you need to select the type of eprom you want to read or write.

    This is easy, just select "Select Device" from the "Component" menu.

    This will bring up a window like below



    You first select the manufacturer, then the model number of the chip.

    Most chips you will come across seem to be listed, if they are not listed you can add them to the list yourself (pretty easy, just refer to the chips datasheet for instructions)

    MAKE SURE YOU SELECT THE RIGHT DEVICE


    Different chips use different voltages to program them, different programming algorithms are used also, even the pins are layed out differently on some chips.

    Selecting the wrong one can blow your chip - or worse blow the eprom programmer up.

    BE CAREFUL, NO GUESSING, GET IT RIGHT FIRST TIME!!


    If the eprom in question has a sticker over the part number, get a replacement sticker, even if you have to cut up a sticky label or something. Write on it a exact copy of what is on the current sticker. Peel of the old sticker (can be a hard job, you may need to gently scrape it off, or soak it off with acetone if need be).
    Once the sticker is removed, make a note of the part number, then replace the sticker to stop light from accidently erasing any of the contents.

    Operate the lever on the socket, then insert the eprom, the programmer has a little diagram on it showing which way round to put it, and how far up the socket for each size of eprom.

    If your programmer does not make it clear, dont just stick the prom in, refer to the manual to make sure its in the right way round, and in the right place!

    The selected eproms details are shown on screen, so you can double check you have
    selected the right one.



    Now we can read the eprom....

    The software is pretty easy to use, nice big clear buttons



    Before you hit read, make a note of the "end address" shown in the window illustrated above, as this is needed for reading.

    Hit read, make sure the end address is correct, if not change it to the value you
    just noted.



    For most things you just read the eprom with the standard settings, I have not looked
    into the other settings (such as odd / even addresses) yet, so wont comment much on them, except to say these are probably needed for when 2 or more eproms are used together to make a 16 bit bus (some modern fruities for example I think do it this way). The old machine I was reading only had the one eprom for the program, so it
    was straight forward. It has another eprom for the sound, and the procedure would be the same for this, although I have not done that one yet.

    Once you proceed, the eprom will be read, this will take a short while, the bigger the size of the eprom, the longer the wait. But dont worry, it doesnt take long really.

    Once the eprom has been read, it will display its contents in a window.
    Dont edit this window, or you will be editing the eprom, and most likely it will NOT work afterwards (as often they have checksums to guard against corruption, so any edits would need to update the checksum)

    You need to save the contents of the eprom file. The software allows you to save it
    in many different formats, such as motorolla, intel, hex, etc.

    With this programmer if you want to burn a eprom you must save as a motorolla format, but you can save another copy as a hex or bin file for example if you wanted to use the data for a emulator.

    So reading is easy, the only problem you may get is if it doesnt read, you may need
    to go into settings,control panel, system, device manager, com-ports, com1 (or com2)
    Then advanced / port settings, and select 115200 baud, 8 bits, no parity, hardware flow control, use fifo buffers NO.

    (ignore the fact the software is set to 19200 baud, control panel needs to be 115200 baud)

    I will come back later, when not as tired :)
    When I do I will add a little to this, some useful links etc and tidy it up a little.

    Then the next post will be how to burn the eprom file to another eprom..

    See you later!
  • Comments:
    Best GPS Accessories on the Net.
    http://bestgpsmarket.com
     
    Nice post on Eproms.
    Work From Home
     
    Post a Comment

    << Home

    This page is powered by Blogger. Isn't yours?