write data into 27C256 EPROM

hello guys,

i’m new to this forum.

currently my project is to read data on 27C256 EPROM by using arduino mega s sainsmart.

the code that i use is from github

#include <stdint.h>

// Set MAX_ADDR to the largest address you need
// to read. For example, for the 27C512 chips,
// you'll want to use a MAX_ADDR of 65536.
// (That's 512 * 1024 / 8.)
// A 27C256 would be 256 kilobits, or 256 * 1024 / 8 =
// 32768.
#define MAX_ADDR 65536L

// On my board, I've connected pins 26-41
// to the A0-A15 lines, and pins 2-10 to the
// Q0-Q7 lines. You'll want to change these
// pin choices to match your setup.
#define A0 54
#define Q0 2

// When you're all wired up, hit the reset button
// to start dumping the hex codes.

void setup() {
  for (int i = A0; i < A0+16; i++) {
    digitalWrite(i,LOW);
    pinMode(i, OUTPUT);
  }
  for (int i = Q0; i < Q0+8; i++) {
    digitalWrite(i,HIGH);
    pinMode(i, INPUT);
  }
  Serial.begin(115200);
  Serial.println("Start Reading\n\n");
}

void writeAddr(uint32_t addr) {
  uint32_t mask = 0x01;
  for (int i = A0; i < A0+16; i++) {
    if ((mask & addr) != 0) {
      digitalWrite(i,HIGH);
    } else { 
      digitalWrite(i,LOW);
    }
    mask = mask << 1;
  }
}


uint8_t readByte() {
  uint8_t data = 0;
  uint8_t mask = 0x1;
  for (int i = Q0; i < Q0+8; i++) {
    if (digitalRead(i) == HIGH) {
      data |= mask;
    }
    mask = mask << 1;
  }
  return data;
}

void loop() {
  uint32_t addr = 0;
  while (addr < MAX_ADDR) {
    for (int i = 0; i < 16; i++) {
      writeAddr(addr);
      uint8_t b = readByte();
      Serial.print(b, HEX);
      Serial.print("\t");
      addr++;
    }
    Serial.println("");
  }
  while (1) {}
}

the pin is attach directly to arduino as per circuit attach below

The data i get in hex. i save in excel. as per picture below.
actually the data total count is 65536. i just snap just the little bit .

so now the next task is, i want to create a simple board with program to write the data that just read into the new blank EPROM 27C256?

mostly i found EEPROM and all use EEPROM Programmer. and i want to learn to create your own EPROM programmer.

somebody can help me please :’(
i’m new to this EPROM thing

thanks

Capture.JPG

azlanthetypewritter: hello guys,

i'm new to this forum.

currently my project is to read data on 27C256 EPROM by using arduino mega s sainsmart. ....

so now the next task is, i want to create a simple board with program to write the data that just read into the new blank EPROM 27C256?

mostly i found EEPROM and all use EEPROM Programmer. and i want to learn to create your own EPROM programmer.

somebody can help me please :'( i'm new to this EPROM thing

thanks

You need to read the datasheet for a 27c256 Parallel EEPROM, you will have to make a circuit that can drive Vpp to 13V and Vcc to 6.5V under software control.

Reading data from the chip is easy with a MEGA. The datasheet shows a flowchart of the programming algorithm, After you construct the circuit to produce the programming voltage it should be easy to implement.

Chuck.

Do reading MUCH more efficient (and easy) by using PORT commands