Reading a PH29EE010 EEPROM
How to dump the contents of a PH29EE010 128kB EEPROM.
Components and supplies
1
PH29EE010
1
Breadboard (generic)
1
Jumper wires (generic)
1
Arduino Mega 2560
Project description
Code
Arduino Sketch
arduino
1/*This sketch is intended for reading the PH29EE010 EEPROM 2 *from Silicone Storage Solutions, Inc. 3 *Created by Richard Petersen, October 16, 2022. 4 * 5 *GNU General Public License Ver. 3.0 (GPL3): 6 *https://www.gnu.org/licenses/gpl-3.0.html 7 * 8 *Datasheet: https://datasheet.datasheetarchive.com/originals/distributors/Datasheets-AE/DSA2AE0000798.pdf 9 * 10 *Wiring: EEPROM | Arduino Mega2560 11 * A0-A7 D37-D30 12 * A8-A15 D49-D42 13 * OE# D3 14 * WE# D4 15 * CE# D2 16 * DQ0-DQ7 D22-D29 17 * Vcc 5V 18 * Vss GND 19 */ 20 21#define OE 3 22#define WE 4 23#define CE 2 24 25unsigned char buff; 26 27void setup() { 28 // put your setup code here, to run once: 29 DDRC = B11111111; //set low address byte to outputs 30 DDRL = B11111111; //set high address byte to outputs 31 PORTC = B00000000; //set low address byte to 0 32 PORTL = B00000000; //set high address byte to 0 33 pinMode(OE, OUTPUT); 34 pinMode(WE, OUTPUT); 35 pinMode(CE, OUTPUT); 36 digitalWrite(OE, HIGH); //preparing control pin states 37 digitalWrite(WE, HIGH); 38 digitalWrite(CE, HIGH); 39 Serial.begin(9600); 40 //dump contents to serial: 41 for (uint16_t i = 0; i < 65535; i++) { 42 buff = EEPROMread(i); //read the byte at the address, 43 //and store in "buff". 44 //* 45 Serial.print(buff, BIN); //print in binary 46 Serial.print(", "); 47 Serial.print(buff, HEX); //print in hexadecimal 48 Serial.print(", "); 49 Serial.print(buff); //print in decimal 50 Serial.print(" -- "); 51 Serial.println(i); //print address number 52 //*/ 53 } 54} 55 56void loop() { 57 // put your main code here, to run repeatedly: 58 59} 60 61unsigned char EEPROMread(uint16_t address) { 62 DDRA = B00000000; //set port A as input 63 PORTC = address; //set low address byte 64 PORTL = address >> 8; //set high address byte 65 //ports C & L are both 8 bit ports, 66 //so I combined them to make a 16-bit port. 67 delay(1); 68 digitalWrite(CE, LOW); //enable the chip 69 delay(1); 70 digitalWrite(OE, LOW); //enable output 71 delay(1); 72 return PINA; //return state of port A 73 delay(1); 74 digitalWrite(CE, HIGH); //disable chip 75 delay(1); 76 digitalWrite(OE, HIGH); //disable output 77}
Processing Sketch
processing
Configure port to fit your needs.
1import processing.serial.*; 2 3int[] buff = new int[65535]; //create an array to store data 4int num = 0; //initialize counter 5 6Serial myPort; //create serial object 7 8void setup() 9{ 10 size(200, 200); 11 myPort = new Serial(this, "COM4", 9600); //set to your arduino's serial port 12 frameRate(1000); //set frame rate to a high value 13} 14 15void draw() { 16 if (num < 65534) { //copy bytes until last byte 17 if ( myPort.available() > 0) { // if data is available, 18 int val = myPort.read(); //save to val. 19 buff[num] = val; //write val to array 20 num++; //increase counter 21 print(num); //print counter 22 print(" -- "); 23 println(val); //print val 24 } 25 } else { 26 saveBytes("PH29EE010 - Dump.txt", byte(buff)); //save to file 27 while(true); //Done. 28 } 29}
Comments
Only logged in users can leave comments