Simpleminded EPROM Programming Power Supply

My buddy Eks recently acquired a “guaranteed broke” Tektronix 492 spectrum analyzer that turned out to have a defunct memory board: the ROM holding the initial boot firmware has a bad checksum. He verified that by swapping in a memory board from another 492 and found it worked perfectly.

The original board used Mostek MK36400 8Kx8 masked ROMs, but they can be replaced by either 27HC641 or (in a pinch) a quartet of 2716 EPROMs. Being a stickler for authenticity, Eks picked up some 27HC641 chips. That means we need a device programmer, as none of the burners we have know anything about 27HC641s. There are other ways of getting the job done, but this has the advantage of getting me some face time with my role model for being a Renaissance Man.

Tek EPROM Power Supply Breadboard

Tek EPROM Power Supply Breadboard

To make a long story somewhat shorter, the 27HC641 is a 8Kx8 EPROM in a 24-pin package with the usual 12 address lines, 8 data lines, power, ground, and a single chip-select / output-enable / programming-voltage pin. Normal EPROMs in 28-pin packages have separate pins for all those functions to make life easier.

Anyhow, the CE/VPP supply must provide 30 mA at 12.5 V as well as the usual minuscule FET logic currents at 5 V and 0 V. The VCC supply must cough up a staggering 90 mA during normal operation at 5 V and 30 mA at 6 V during programming. Both supply voltages must switch between three levels: unnaturally high during programming, 5 V for normal operation, and 0 V for output-enable and during chip removal / installation in the programming socket.

This being an entirely one-off project, I used good old LM317T regulators with a handful of transistor switches to vary the voltage and clamp the output to ground. The CE/VPP supply looks like this:

Schematic of VPP-VCE pin supply

Schematic of VPP-VCE pin supply

An Arduino will drive the gates of Q2 & Q3, with all the programming logic and timing handled by software. The shortest VPP pulse is a millisecond long, so that’s not a real restriction, and the verification can happen at nose-pickin’ speed. That simplifies a lot of other things about the project, too.

Switch: 12.5 to 5 V

Switch: 12.5 to 5 V

Q3 selects the output voltage: gate high = 5 V, gate low = 12.5 V. The scope shot shows the gate driven with a 500-Hz square wave, which is about the right width for the programming pulse.

I prototyped this on a solderless breadboard (ptooie) as shown above with 5% resistors, so the actual voltages aren’t quite nominal. The readout says 13.28 and 5.3 V, which will need some trimming to get inside the EPROM’s 5% spec.

The 1 nF cap at the LM317 Adjust terminal encourages stablity by knocking off the high-frequency stuff and slowing down the transitions just a smidge. The datasheet suggests up to 10 µF, which turns the transitions into triangles.

The LM317 can only supply current to its load, so reducing the output voltage requires the load to draw current from C3. Because this is essentially a DC application, C3 can be quite small: there won’t be any other switching going on during the programming pulse. The datasheet recommends 1 – 10 µF, but definitely more than 5 nF.

The LED is actually a key part of the circuit, as it draws current to pull the output voltage downward: more LED current = faster transition time. However, higher C3 = slower transitions.

Fall time: 12.5 to  5 V

Fall time: 12.5 to 5 V

Seen at a higher magnification, the falling edge of the output waveform shows a decay that lasts 50 µs or so. The LED draws maybe 12 mA at 13 V, so the voltage across C3 should drop at

(1/100 nF) x (12 mA) = 120 V/ms

Applying a straightedge to the early part of that curve looks like 25 V in 100 µs; call it 250 V/ms, maybe a bit less.

What’s a factor of two among friends, particularly given the tolerances on ceramic caps?

T1 and Q1 (I don’t know why Eagle’s models use both T and Q as transistor prefixes, it’s probably an international thing) switch the output line between the LM317 and ground; I suspect just turning T1 off would work as well, but this way the chip pin is firmly held to 0 V, where it should be, regardless of leakage and other oddities.

Switch: 5 to 0 V

Switch: 5 to 0 V

Because Q1 crops both sides of the transistion, the rise and fall happen in nanoseconds rather than microseconds.

So, now that I know this will actually work, I can build a PCB and write some firmware…

Memo to Self: make sure the code waits for the output transitions. Methinks delayMicroseconds() will be a constant companion.

,

  1. #1 by عبدالسلام حسن on 2009-12-31 - 05:12

    لم افهم شياء لو تكرمت اخي الكريم ان توضح لي اكثر سوى(باعطائي امثلة اكثر او مواقع…… تشرح فيها خطوات اعادة برمجة الذاكرةEPROM حتى باللغة الانجليزية)
    ولك مني فائق الاحترام

    • #2 by Ed on 2009-12-31 - 08:22

      The Google machine translation of your comment reads:

      I do not understand if you would kindly Xiae brother Karim explain to me more than (give me more examples of sites, or … … that explains the steps re-programming of EPROM memory even in English)
      Sincerely from me to you

      Your knowledge of English is certainly far better than my grasp of Arabic. I must continue in English in the hope that I can be of some assistance.

      This is a good introduction to EPROM programming, although the author uses colloquial English that may not translate well: http://wiki.xtronics.com/index.php/How_EPROMS_Work.

      The general programming process is straightforward: set the address pins to select a byte within the EPROM, set the data pins to the new value, then pulse the programming pins to the proper voltage for the proper time. You repeat those steps for every byte in the EPROM, then read back the values to verify them.

      Different EPROM families have variations on that theme, but they all require the same information: address, data, selection, and timing. The datasheet for the specific EPROM gives all the information you need, although you must be careful: “specific EPROM” means you must match the chip’s manufacturer, the exact part number, the suffix, and sometimes even the date code. Often you don’t know all that information or cannot find the proper datasheet, in which case you must make an educated guess based on your experience with other, similar devices.

      The 64HC641 EPROMs are very unusual: we picked them for this project because they were pin-compatible with the ROM chips on the memory board, not because they were easy to use. Worse, we could find only incomplete and contradictory programming information, so my blog posts document what actually worked: the outcome of my educated guesswork!

      So, although my posts provide assistance for one specific EPROM, the steps I followed and the algorithm I developed aren’t directly applicable to any other devices.

      I hope that helps you along the way. I assure you that it’s not as complex as it may seem and, after you successfully program several different EPROMs, you’ll see how simple it really is.

  2. #3 by abdulsalam hassen on 2010-01-01 - 16:53

    hi i need to know how can i reprogrammeing EPROM in afew steps as possible as you can
    please, (with block diagram)
    thaaaaaaaaaaaaaaanks

    • #4 by Ed on 2010-01-01 - 16:59

      Without knowing the exact EPROM chip and your abilities to build electronic gadgets, I’m afraid I can’t be of much assistance.

      Please refer to the links in the post (I have several posts on this topic) and my reply to the previous comment. They should help you figure out what you need to know to get started. After you’ve collected that information, perhaps I can make some suggestions.

  3. #5 by abdulsalam hassen on 2010-01-01 - 17:00

    thank you sir for your helping me, iam still student & beganer in electronic
    please be kind with me

    • #6 by Ed on 2010-01-01 - 19:15

      please be kind with me

      You must also be kind to me.

      I’ve written several blog posts on the subject of programming a nonstandard EPROM. You’ve asked for further assistance, without providing any details of what you know and what you’re trying to accomplish. Despite that, I’ve provided links to more information that should get you started.

      Now it’s your turn. Show me that you’re putting some effort into your project, rather than expecting me to provide you with all the answers, and I’ll continue helping.

      Let us know some details about:

      • Exactly which EPROM you have
      • The datasheet for that EPROM
      • What you have learned from that datasheet
      • What other projects you have completed
      • Your programming skills
      • Which parts you have available

      Continue to ask trivial questions that show you’re not doing any work and this thread will clearly demonstrate to other people how not to go about getting help.

      Fair enough?

  4. #7 by Viki on 2012-07-05 - 08:07

    what is the voltage required to erase the contents in eeprom?

    • #8 by Ed on 2012-07-05 - 10:03

      The 27HC641 has a quartz window on the top: you erase it with UV light! However, those chips may not erase to a known value, which means you can’t blank-check them by looking for 0xff.

      More details on the programming process, with a picture of the chip, live there.

      If you really wanted to ask about EEPROMs, then the answer is simple: you don’t erase EEPROMs, you just reprogram them!

  5. #9 by Philip on 2013-12-21 - 17:50

    Hello!

    I stumbled on this blog post looking for how to construct an EPROM burner/programmer so that I can restore a Tek 7854 (with those darned MOSTEK ROMs!). I’m curious about how this project turned out!

    Would you be willing to share the software/hardware details?

    • #10 by Ed on 2013-12-22 - 08:43

      In addition to the posts here (search for tek 492 to unearth them), I wrote that project up as my December 2009 Circuit Cellar column; the files are available on the CC FTP site.

      That should get you pretty far along, because there’s really not much to it!

      The whole thing went surprisingly smoothly and the freshly programmed EPROMs have been working fine ever since: Eks calls it a success!

  1. Trimming Voltage Regulators by Stacking SMD Chips « The Smell of Molten Projects in the Morning
  2. Tektronix 492 Spectrum Analyzer ROM and EPROM HEX Files « The Smell of Molten Projects in the Morning