Code Monkey home page Code Monkey logo

gls29ee512-programmer's Introduction

Arduino GLS29EE512 programmer

This is if you ever need to program specifically a GLS29EE512 flash EEPROM because maybe your fancy universal programmer can't deal with different pin assignments.

I think this is the same chip as the SST29EE512, but I don't have any of those.

Arduino clone connected to an EEPROM by many wires

Requirements

For software, you'll need:

For hardware, you'll need:

  • an Arduino Mega 2560*
  • some kind of adapter for your EEPROM
  • many patch wires

(*) Other Arduinos should work, but you'll probably need to reassign the ports at the top of GLS29EE512_programmer.ino if you're not using ports A, C, G, and L.

Setting up the Arduino

Open GLS29EE512_programmer.ino in the Arduino IDE and press the upload button.

Now connect the pins. See the data sheet for the pin assignments on the EEPROM. The table below includes the Arduino pin to port mappings for my 2560 clone, but you may need to scour the internet for different models.

AVR port Arduino pins GLS29EE512 pins
PORTA 29..22 A7..A0
PORTC 30..37 A15..A8
PORTL 42..49 DQ7..DQ0
PORTG 39, 40, 41 WE#, CE#, OE#
- 5V VDD
- GND DSS

On my board, getting power from the 5V and GND pins near the GPIO pins was more reliable than the pins on the POWER section of the board.

You should now be able to open the serial monitor in the Arduino IDE and set the baud rate to 500,000. The following will be printed if your EEPROM was detected successfully:

Manufacturer: BF, product: 5D
ready>

Make sure to close the serial monitor before trying to use the programmer script.

Using the programmer script

Install the script requirements. I recommend doing this in a virtual environment so you're not trapped in Python dependency hell:

pip install -r requirements.txt

If there is one serial device in /dev/ttyACM*, it will be used. Otherwise, you'll need to set the device with the -d <device> option.

To dump the EEPROM contents to output.bin:

gls29ee512.py dump output.bin

To verify the EEPROM contents match input.bin:

gls29ee512.py verify input.bin

To write input.bin to the EEPROM:

gls29ee512.py write input.bin

Serial protocol reference

The arduino's serial port is set to 500,000 baud. It uses a simple line-based protocol with \n line terminators (though \r\n should be tolerated as well).

When the Arduino sends the > character, it is ready to accept commands.

When it sends the # character, it is ready to accept 128 bytes of data (or will output 128 bytes of data in read mode).

Pages are 128 bytes, so valid page numbers are 0 through 511 inclusive for a 64 KiB EEPROM.

Commands

help

Print some help text

hexdump <page>

Read a 128 byte page of data and print a hex dump.

read <page>

Read a 128 byte page of data.

After sending this command, wait for a # character and then read the next 128 bytes.

verify <page>

Verify a 128 byte page of data.

After sending this command, wait for a # character and then send the expected 128 bytes of data.

Read the response up to the > character. If it contains the string OK, then the page matches.

write <page>

Write a 128 byte page of data.

After sending this command, wait for a # character and then send the 128 bytes of data to write.

Read the response up to the > character. If it contains the string OK, then the page was successfully written.

gls29ee512-programmer's People

Contributors

cknave avatar

Watchers

 avatar  avatar  avatar

Forkers

drkzrg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.