(Topic ID: 211410)

Quick and dirty DIY 24 pin EEPROM programmer

By ThatOneDude

6 years ago



Topic Stats

You

Linked Games

No games have been linked to this topic.

    Topic Gallery

    View topic image gallery

    20180304_113753 (resized).jpg
    20180304_113704 (resized).jpg
    20180304_113647 (resized).jpg
    20180303_171348 (resized).jpg

    You're currently viewing posts by Pinsider ThatOneDude.
    Click here to go back to viewing the entire thread.

    #1 6 years ago

    I built a 24 pin EEPROM programmer while working on my Gorgar.
    https://github.com/mikelatiolais/28c16_EPROM_PROGRAMMER

    I made the interface out of what I had on hand: a 40 pin ZIF socket, an Arduino mega and a strip board.
    I hacked up an existing 28 pin design as the basis. The Arduino sketch is there, along with a primitive python script(I'm not a professional python coder, so keep that in mind) to read/write. No, it doesn't catch exceptions, do error checking, etc. I'm adding it as I tinker, though any other python scripters can feel free to clean it up and send me a pull request.

    I'll post some pictures shortly of my version of the interface.

    #2 6 years ago

    20180303_171348 (resized).jpg20180303_171348 (resized).jpg

    20180304_113647 (resized).jpg20180304_113647 (resized).jpg

    20180304_113704 (resized).jpg20180304_113704 (resized).jpg

    20180304_113753 (resized).jpg20180304_113753 (resized).jpg

    #4 6 years ago
    Quoted from Cheddar:

    This is a great idea. The shield for eprom programming would be pretty cheap.

    If I get ambitious, I'll make a kicad version that could be etched. If I were going to make a "production" version, I would probably make it a separate board that would be more flexible.

    #5 6 years ago

    Fixed a bug in the EEPROM read(it now properly increments the read by 16 bytes).

    I gave some more thought to a more flexible version. I think it would be relatively simple to do if you separate the functionality and have an intermediate board between the Arduino and the ZIF socket. Essentially, the intermediate board would connect the ground and 5VDC to the right pins. If the configuration were stored as a hardwired set of 3 pins(000 = 24 pin variant, 001 = 26 pin, etc), then the Arduino could identify which intermediate board is present and properly map the I/O pins.

    Just an idea. If anyone is interested enough to pursue it, let me know.

    #6 6 years ago

    Fixed the output file write. Added exception catching to all the problematic I/O calls. I'll add some graceful exit verbiage at some point. Still have the compare function to finish.

    #7 6 years ago

    Also, for reference, this works under OSX and Linux. Haven't tried to run it under Windows. Installing python pip to grab any extra packages(the import lines at the beginning of the python script) is recommended.

    #8 6 years ago

    So, after getting some very weird results from running Andre's test ROM v2 in my Gorgar, I decided to go and write that compare function that I had glossed over in the first place. And it was a mess.
    I wrote the new function and tested it.
    And it puked(showed differences)
    Oh, ok, maybe something happened and it didn't write out correctly. Reburn.
    And it puked again.
    And now I had the location nailed down. It consistently wrote the wrong data to location 0x100. That's the hexadecimal form of the number 256. I should have figured it out from that, but I'm slow.
    So, now I add some elaborate and slow checks on the write process. It all behaves normally. Compare still puked.
    Using the serial interface in the arduino IDE, I could read and write to location 0x100.
    But a full write still fucked up. And, watching the output of compare scroll by, it was obvious that it was entire chunks of data that were wrong.
    And I think that was about when the light began to dawn.
    After having hacked at the arduino firmware and my python script for hours, it suddenly occurred to me that I was likely seeing a byte written later overwriting the original. What if this whole time, I was chasing a hardware bug? I looked at the pin definitions. Nope, that was all correct.
    Now, it could only be one more thing: I had to have bridged two pins together when soldering on the pin headers. And it would have to involve pin 8 (because it was breaking at decimal 256, the number of addresses capable of being represented in 8 bits). Sure enough, a minute of checking later, and there is continuity between address pins 8 & 9.
    So, always recheck every bit of soldering you do. That's a note for myself.
    Anyway, I'll push the new code tonight. I rewrote it to be a bit cleaner, if perhaps a bit slower. It also handles some weirdness with the serial pipe that was causing the "OK" reply to come later than expected sometimes. I suspect a race condition, but now I spin on a reread until I get a valid data chunk. I'll push it out once I finish fixing my soldering job and getting a valid ROM write.

    You're currently viewing posts by Pinsider ThatOneDude.
    Click here to go back to viewing the entire thread.

    Reply

    Wanna join the discussion? Please sign in to reply to this topic.

    Hey there! Welcome to Pinside!

    Donate to Pinside

    Great to see you're enjoying Pinside! Did you know Pinside is able to run without any 3rd-party banners or ads, thanks to the support from our visitors? Please consider a donation to Pinside and get anext to your username to show for it! Or better yet, subscribe to Pinside+!


    This page was printed from https://pinside.com/pinball/forum/topic/quick-and-dirty-diy-24-pin-eeprom-programmer?tu=ThatOneDude and we tried optimising it for printing. Some page elements may have been deliberately hidden.

    Scan the QR code on the left to jump to the URL this document was printed from.