SatelliteSync56
Published © GPL3+

Reading a PH29EE010 EEPROM

How to dump the contents of a PH29EE010 128kB EEPROM.

IntermediateFull instructions provided254
Reading a PH29EE010 EEPROM

Things used in this project

Story

Read more

Code

Arduino Sketch

Arduino
/*This sketch is intended for reading the PH29EE010 EEPROM
 *from Silicone Storage Solutions, Inc.
 *Created by Richard Petersen, October 16, 2022.
 *
 *GNU General Public License Ver. 3.0 (GPL3):
 *https://www.gnu.org/licenses/gpl-3.0.html
 *
 *Datasheet: https://datasheet.datasheetarchive.com/originals/distributors/Datasheets-AE/DSA2AE0000798.pdf
 *
 *Wiring: EEPROM | Arduino Mega2560
 *        A0-A7    D37-D30
 *        A8-A15   D49-D42
 *        OE#      D3
 *        WE#      D4
 *        CE#      D2
 *        DQ0-DQ7  D22-D29
 *        Vcc      5V
 *        Vss      GND
 */

#define OE 3
#define WE 4
#define CE 2

unsigned char buff;

void setup() {
  // put your setup code here, to run once:
  DDRC = B11111111; //set low address byte to outputs
  DDRL = B11111111; //set high address byte to outputs
  PORTC = B00000000; //set low address byte to 0
  PORTL = B00000000; //set high address byte to 0
  pinMode(OE, OUTPUT);
  pinMode(WE, OUTPUT);
  pinMode(CE, OUTPUT);
  digitalWrite(OE, HIGH); //preparing control pin states
  digitalWrite(WE, HIGH);
  digitalWrite(CE, HIGH);
  Serial.begin(9600);
  //dump contents to serial:
  for (uint16_t i = 0; i < 65535; i++) {
    buff = EEPROMread(i); //read the byte at the address,
                          //and store in "buff".
    //*
    Serial.print(buff, BIN); //print in binary
    Serial.print(", ");
    Serial.print(buff, HEX); //print in hexadecimal
    Serial.print(", ");
    Serial.print(buff); //print in decimal
    Serial.print(" -- ");
    Serial.println(i); //print address number
    //*/
  }
}

void loop() {
  // put your main code here, to run repeatedly:

}

unsigned char EEPROMread(uint16_t address) {
  DDRA = B00000000; //set port A as input
  PORTC = address; //set low address byte
  PORTL = address >> 8; //set high address byte
  //ports C & L are both 8 bit ports,
  //so I combined them to make a 16-bit port.
  delay(1);
  digitalWrite(CE, LOW); //enable the chip
  delay(1);
  digitalWrite(OE, LOW); //enable output
  delay(1);
  return PINA; //return state of port A
  delay(1);
  digitalWrite(CE, HIGH); //disable chip
  delay(1);
  digitalWrite(OE, HIGH); //disable output
}

Processing Sketch

Processing
Configure port to fit your needs.
import processing.serial.*;

int[] buff = new int[65535]; //create an array to store data
int num = 0; //initialize counter

Serial myPort; //create serial object

void setup() 
{
  size(200, 200);
  myPort = new Serial(this, "COM4", 9600); //set to your arduino's serial port
  frameRate(1000); //set frame rate to a high value
}

void draw() {
  if (num < 65534) { //copy bytes until last byte
  if ( myPort.available() > 0) {  // if data is available,
  int val = myPort.read();  //save to val.
    buff[num] = val; //write val to array
    num++;  //increase counter
    print(num);  //print counter
    print(" -- ");
    println(val); //print val
  }
  } else {
    saveBytes("PH29EE010 - Dump.txt", byte(buff)); //save to file
    while(true); //Done.
  }
}

Credits

SatelliteSync56
0 projects • 0 followers

Comments