I needed to program those kind of ROM the cheapest way. I bought ten MX29F1615 online (clearly second hand even if not specified) for 14,20€. It can replace a kickstart ROM on an Amiga classic. Then I developed the programmer without buying any expensive component. The PC part is partly based on https://github.com/todbot/arduino-serial for the communication between the arduino and the PC. I tried to use flashrom but failed. It can program the full 16Mb EEPROM in 15 or 20 min. It's slow but it works and I usually program only the half. It's using counters to generate the 21 lines of address (in 8 bit mode), only 128 bytes of buffer are programmed at a time. Code can probably can be improved a bit. The most complicated part was to understand the datasheet. Like the 8bit/16bit modes. You can't program the device in 8 bit mode, but it's not clearly written somewhere.
New version using an Arduino Mega (almost no need for external component) : arduino and PC (linux) code with schematics and PCB done with Kicad : https://framagit.org/acathla/eeprom-programmer
Hi, nice project. Could you please share a schematics with us? It's OK if it's drawn by hand on a piece of paper. I'm interested in seeing how you generated 10V for VHH and the part with the transistor to switch between 5 / 10 V. The software part seems to be clear to me: Address buss is generated via the 2 counters by toggling the 'clock' pin (I like that, it needs just one clock pulse to generate consecutive 12 bit address), the data bus is 16 bit wide in write mode ( top byte of the data bus is generated by the shift register, bottom byte uses 8 arduino pins D2-D9), and for reading only an 8bit data mode is used where the data bits are again mapped to arduino pins D2-D9 (but this time switched as input). The rest of the code is just sending and receiving the data between the PC and MCU.
My tips for speed improvement:
1) do not write data with value 0xFF (erased flash memory has already value 0xFF)
2) In flash_databus_output you always set the pinMode for data bits even if you write 128 bytes in one go - optimise it to set the ouput pin mode just once, before the first byte is written.
3) unroll the loops where 8 bits are sent (the time spent calculating the 'for' loop is eliminated)
4) do not use digitalWrite function - although it is portable, it is also slow because it does several checks and also (if it is not inlined) there is an extra overhead of entering the function, passing the parameters, then exiting the function. Use a macro that toggles just a single pin on a specific arduino port for maximum speed.
5) use some some sort of data compression (maybe it's an overkill for a simple project like this)
https://oshwhub.com/firseve/eeprom_27
Use 74hc595 and Atmega 64Pin like atmega64 128
But ... lazybone