An easy to build programmer for 2704 / 2708 / MCM68764 / MCM68766 EPROMs

This project was released in conjunction with another which programs 1702A EPROMs. More about that here.

Introduction

Some time ago I needed to program an MCM68766 EPROM to upgrade the BIOS in an IBM PC 5150, and in the process discovered that hardware which can program these is rather difficult to come by. Despite having a collection EPROM programmers, including one fairly expensive model (which apparently could, but wouldn’t do it in practice) – in the end none were up to it.

So I set out to build my own. Knowing that the pin-out for 2708 EPROMs was quite similar to MCM68766 – I thought I’d tick that off while I was at it, as this is another type that is very difficult to find hardware to program.

The original prototype – designed late 2016 and mentioned on vcfed.org forums early 2017

Why is MCM68766 difficult to program?

There is nothing algorithmically complicated about programming one of these – the main difficulty centres on the high Vpp voltage (26V). Most cheap EPROM programms have a max Vpp of 13V. That having been said, there are some cheap programmers which support the 2716 EPROM, also needing a Vpp of 26V, so quite why MCM68766 is such a difficulty, may also depend on other things, such as pin arrangements, or perhaps just limited demand for it.

Why is 2708/2704 difficult to program?

This type of EPROM is genuinely more difficult to deal with. It also needs the same high Vpp voltage, as well as an additional cocktail of voltages. +26V, +12V, +5V and -5V being the full list. All of these are required during programming – quite a headache for the designers of universal programmers. Models that do support it, require a special adapter which doesn’t come cheap. This adapter typically supplies the extra voltages which aren’t practical to provide through the universal socket. Like the MCM68766 – they are algorithmically simple to program, so no complicated software stuff to worry about.

Design

The physical design is in the form of an Arduino Mega shield. I chose this because it was large enough to accommodate all of the components, and there would be enough I/O pins without needing I/O expanders or other complicated stuff.

The only supported Arduino is the Mega 2560 R3 or compatible.

When designing it I was aware that I was likely the only person that’d want something that did both, so have allowed for it to be constructed as a dual 270x/MCM6876x programmer, or 270x only / MCM6876x only.

When built in its dual type form, selection between devices is made by a 6PDT switch, which software can query before powering on the device, checking against the selected device in the user interface, limiting the chance of accidentally blowing an EPROM (which will certainly happen if the switch is in the wrong position).

When programming 270x EPROMs, the Arduino must be supplied with a regulated +12V supply as the shield does not generate its own +12V rail. There is a software check to ensure this voltage is correct before powering on the EPROM.

There is also a footprint for an RS-232 connection + MAX232 but this is not required for most applications as the Arduino can provide a serial interface through its USB port.

Constructing it as a dual type programmer

All components must be fitted except for the RS-232 section.

Constructing it as a MCM68764/MCM68766 programmer

I figured it would be easier to just show a picture of this. All fitted components are as specified on the schematic, unless omitted or replaced with a wire link.

SW1 is hard wired in the left hand position.

Constructing it as a 2704/2708 programmer

When constructing as a 2708 programmer, only the following components can be omitted: SW1, J1, U4, D2, C1, C8, C9, C10, C11, R9, R16.

SW1 must be hard wired in the right hand position.

Buying one pre-built

I don’t sell these things myself but one enterprising individual has gone to the trouble of offering these on eBay (UK).

I found another rendition – intriguingly using surface mount components on eBay (Germany).

Host software

To drive this board I’ve written a small Windows application which gives an experience similar to a commercial programmer.

Download link is provided below. I do occasionally update the above utility. If you find any bugs or perhaps have some ideas how to improve it please let me know.

Schematic

Can be downloaded here.

Gerbers

There are two versions of the gerbers. A “Long” version which has the exact dimensions of an Arduino Mega. Choose this if your PCB house doesn’t charge extra for exceeding 100x100mm dimensions. Total size is 101.5mm x 53.5mm.

The “Short” version has the tab at the end clipped to keep it under 100mm. Total size is 99.95mm x 53.5mm.

BOM

Can be downloaded from here (or here – CSV).

Software

The source code (including pre-compiled .HEX file) for the programmer is written in C and compiled with AVR-GCC (programmed directly with avrdude). It is located in my eightoduino repository on github. There is no Arduino sketch, therefore it can only be used on AVR Arduino Mega boards (unless ported to something else).

Windows software version history

1.0 (10/05/2019)

  • Initial release

1.1 (16/02/2020)

  • Hardware test added
  • Fixed some incorrect labels on form
  • Fixed crash on systems with no serial ports
  • Fixed error in 270x voltage check
  • Added configurable baud rate

1.2 (20/05/2020)

  • Added checksum calculator
  • Fixed bug where status bar showed an incorrect operation when programmer doesn’t respond
  • Fixed bug where operations in menus were enabled at times they shouldn’t have been

Use this command with the pre-programmed Arduino bootloader to program the firmware (replace the COM port as appropriate):

avrdude -p m2560 -c stk500v2 -P COM4 -b 115200 -D -p atmega2560 -U flash:w:hveprom.hex:i

Troubleshooting

Operation timed out

This is the most likely problem you’ll see. Assuming you’ve selected the correct COM port and successfully flashed the Arduino with the above command (using the Arduino bootloader – not a physical programmer such as the STK500) then you should be at least at the point where you’ll get an error message other than a timeout.

The next think I’d try is running the hardware test (Setup -> Hardware test) without the shield attached – just in case there’s an issue with your shield which is causing problems with the Arduino its self. At the very least you should see an “Invalid shield attached” error.

There are also some oddities of the on-board USB to RS-232 chip on the Arduino – even the genuine models – it seems to be common for it to get into a “bad state” where it stops passing data between the PC and the AVR. The reset button has no effect on this chip – so usually a combination of power-cycling, disconnecting and re-connecting the USB will fix it. If you’re an Arduino expert and know more about this problem please get in touch with me.

Failing that, build your board with the RS-232 section (and plug it into a serial port), and use the rs232 version of the .HEX file. You will not have these problems.

2708 Voltage range warning

When developing this shield I found that some 2708 devices are fussy about the voltage on the +12V rail – they won’t be damaged but they’ll not program successfully. The designers of the Arduino Mega have helpfully fitted a reverse protection diode (D1).

While this does prevent hapless newbies from blowing their Arduinos, unfortunately in our case it reduces the 12V supply down to 11.2V. For reliable 2708 programming either this diode must be replaced with a wire link, or the Arduino should be powered with a 13V supply.

Using the hardware test function


From the “Setup” menu select “Hardware test”.  You will be prompted with the above dialog which will assist with testing before risking blowing a potentially expensive EPROM.

I strongly recommend doing this before fitting the test socket, or if you have fitted it, put an IC socket into the test socket – this will make contact with multimeter probes a lot easier. Label all of the pin numbers as I have done here. There are quite a few tests to get through – you are not going want to have to keep counting through all of the pins!

19 thoughts on “An easy to build programmer for 2704 / 2708 / MCM68764 / MCM68766 EPROMs”

  1. Hello,

    I hope you don’t mind, but I am going to have some of your shields made up by Oshpark for myself and a couple of friends who are involved in the repair of Vintage computers.
    I have sourced some MCM68764/66 EPROMs and this will be great for replacing or upgrading old 24-pin DIP ROMs.
    If it’s OK, I’m going to share the ability to have the boards ordered from Oshpark as needed.
    No one, other than them, will make money off this and I will have the board design credited to you.

    Thank you for your work in designing this shield.

    Regards,
    Richard

  2. I built your programmer and everything worked on the first try!
    I’m really excited about having programmed an EPROM 2708 for my old computer.
    Thank you so much, you were incredible, very good … and sorry for my bad English 🙂
    Greetings from Italy

  3. Built today your 2708 programmer, worked from the first power on, great project, thank you for sharing. Was curious, because I used a 12V Zener instead of a 11V and 220uH inductors instead of a 180uH, but the voltage values were ok, and I was able to program a 2708 EPROM. Are I on a “dangerous” way with this componets?

    1. The changes you’ve made wouldn’t make a lick of difference to operation. The zener is to keep Vgs below 20V but still allow fast gate charge time, so 12V will still be OK.

      As for the inductor, also not going to be an issue. Going higher can result in higher losses (+overheating) and slower regulation response time, but at 220uH it’s still going to be well within operating margins.

  4. Thanks for the effort.
    I wanted to display the checksum display automatically when loading the binary file or reading out the EPROM.
    Couldn’t you get the source code after all?

    1. Perhaps you could look at writing a specific programming tool which does exactly what you want? I’ll never be able to please everyone! I’d certainly be happy to share it here. Happy to provide any protocol information needed.

  5. Would be nice if you shared the sources, so that you can customize the software according to your needs.
    Kind regards

    1. Sources for Windows applications I post on this site are personal to me, if any changes are desired I would prefer there was one good version of it, rather than dozens of tweaked versions.

      However, I am working on a cross platform host programmer which will be open source.

  6. I wanted to make the software a little more comfortable.
    For example, immediate CRC display in the user interface, use as a pure 2708 programmer and possibly an editor.
    I did not want to expect all of this from you.
    Kind regards

  7. I last programmed a 2708 with a borrowed burner for my Commodore 64 club. 1990 or so. Always wanted to play with them since.
    I’ve been mostly wanting to burn spare chips for older test equipment and other stuff.

    Ideally I would like to just read older chips and burn to some pin-compatible new stuff. I assume eeproms for 2708 and newer are available.

    I have unused burners somewhere, but was going to order a modern burner like the TL866.

    Also for my Heathkit HERO 1 robots and et-3400a microprocessor trainer and peripheral adapter roms.

Leave a Reply

Your email address will not be published. Required fields are marked *