Ben Eater Arduino EEPROM programmer not producing serial output signal

I've been having trouble programming my EEPROM's for a while now and finally bit the bullet and bought a cheap logic analyser from Aliexpress, which works great! Upon testing Ben's Arduino EEPROM programmer that I built I noticed that the EEPROM is recieving pulses to the data pins but no pulses to the address pins. I've traced this back to the Arduino and have noticed that pin D3 - SHIFT_CLK is pulsing but D2 - SHIFT_DATA is not and is just holding high . The Arduino code is taken directly from Ben's github. it looks correct and i've tried reflashing at multiple times. WRITE_ENABLE, SHIFT LATCH and the EEPROM DIgital write pins all seem to be working fine. It's just not producing a serial output for the adresses. This seems like an IDE issue, I'm hoping someone might be able to help

I've tried this with a nano every and a funduino uno. same result. (baud: 57600)

Logic Analyser results from pulseview

My wiring

Ben's github code

/**
 * This sketch is specifically for programming the EEPROM used in the 8-bit
 * decimal display decoder described in https://youtu.be/dLh1n2dErzE
 */
#define SHIFT_DATA 2
#define SHIFT_CLK 3
#define SHIFT_LATCH 4
#define EEPROM_D0 5
#define EEPROM_D7 12
#define WRITE_EN 13

/*
   Output the address bits and outputEnable signal using shift registers.
*/
void setAddress(int address, bool outputEnable) {
  shiftOut(SHIFT_DATA, SHIFT_CLK, MSBFIRST, (address >> 8) | (outputEnable ? 0x00 : 0x80));
  shiftOut(SHIFT_DATA, SHIFT_CLK, MSBFIRST, address);

  digitalWrite(SHIFT_LATCH, LOW);
  digitalWrite(SHIFT_LATCH, HIGH);
  digitalWrite(SHIFT_LATCH, LOW);
}


/*
   Read a byte from the EEPROM at the specified address.
*/
byte readEEPROM(int address) {
  for (int pin = EEPROM_D0; pin <= EEPROM_D7; pin += 1) {
    pinMode(pin, INPUT);
  }
  setAddress(address, /*outputEnable*/ true);

  byte data = 0;
  for (int pin = EEPROM_D7; pin >= EEPROM_D0; pin -= 1) {
    data = (data << 1) + digitalRead(pin);
  }
  return data;
}


/*
   Write a byte to the EEPROM at the specified address.
*/
void writeEEPROM(int address, byte data) {
  setAddress(address, /*outputEnable*/ false);
  for (int pin = EEPROM_D0; pin <= EEPROM_D7; pin += 1) {
    pinMode(pin, OUTPUT);
  }

  for (int pin = EEPROM_D0; pin <= EEPROM_D7; pin += 1) {
    digitalWrite(pin, data & 1);
    data = data >> 1;
  }
  digitalWrite(WRITE_EN, LOW);
  delayMicroseconds(1);
  digitalWrite(WRITE_EN, HIGH);
  delay(10);
}


/*
   Read the contents of the EEPROM and print them to the serial monitor.
*/
void printContents() {
  for (int base = 0; base <= 255; base += 16) {
    byte data[16];
    for (int offset = 0; offset <= 15; offset += 1) {
      data[offset] = readEEPROM(base + offset);
    }

    char buf[80];
    sprintf(buf, "%03x:  %02x %02x %02x %02x %02x %02x %02x %02x   %02x %02x %02x %02x %02x %02x %02x %02x",
            base, data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7],
            data[8], data[9], data[10], data[11], data[12], data[13], data[14], data[15]);

    Serial.println(buf);
  }
}


void setup() {
  // put your setup code here, to run once:
  pinMode(SHIFT_DATA, OUTPUT);
  pinMode(SHIFT_CLK, OUTPUT);
  pinMode(SHIFT_LATCH, OUTPUT);
  digitalWrite(WRITE_EN, HIGH);
  pinMode(WRITE_EN, OUTPUT);
  Serial.begin(57600);


  // Bit patterns for the digits 0..9
  byte digits[] = { 0x7e, 0x30, 0x6d, 0x79, 0x33, 0x5b, 0x5f, 0x70, 0x7f, 0x7b };

  Serial.println("Programming ones place");
  for (int value = 0; value <= 255; value += 1) {
    writeEEPROM(value, digits[value % 10]);
  }
  Serial.println("Programming tens place");
  for (int value = 0; value <= 255; value += 1) {
    writeEEPROM(value + 256, digits[(value / 10) % 10]);
  }
  Serial.println("Programming hundreds place");
  for (int value = 0; value <= 255; value += 1) {
    writeEEPROM(value + 512, digits[(value / 100) % 10]);
  }
  Serial.println("Programming sign");
  for (int value = 0; value <= 255; value += 1) {
    writeEEPROM(value + 768, 0);
  }

  Serial.println("Programming ones place (twos complement)");
  for (int value = -128; value <= 127; value += 1) {
    writeEEPROM((byte)value + 1024, digits[abs(value) % 10]);
  }
  Serial.println("Programming tens place (twos complement)");
  for (int value = -128; value <= 127; value += 1) {
    writeEEPROM((byte)value + 1280, digits[abs(value / 10) % 10]);
  }
  Serial.println("Programming hundreds place (twos complement)");
  for (int value = -128; value <= 127; value += 1) {
    writeEEPROM((byte)value + 1536, digits[abs(value / 100) % 10]);
  }
  Serial.println("Programming sign (twos complement)");
  for (int value = -128; value <= 127; value += 1) {
    if (value < 0) {
      writeEEPROM((byte)value + 1792, 0x01);
    } else {
      writeEEPROM((byte)value + 1792, 0);
    }
  }

  // Read and print out the contents of the EERPROM
  Serial.println("Reading EEPROM");
  printContents();
}


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

}

Ben's code uploaded directly from his github

In order to make all relevant information available to any who are interested in this subject, I'll share a link to the related discussion here:

https://www.reddit.com/r/beneater/comments/16p6bgd/arduino_eeprom_programmer_not_producing_serial/

1 Like

You seem to have a lot more connected than the schematic shows

Are there more parts to the schematic that I / we don't know about (all blue wiring to the left breadboard)?

Thanks Ptillisch.

I realised that the SHIFT_DATA and SHIFT_CLK pins were a tie point off this time. So like in the reddit post, It seems like D2 - SHIFT_DATA is outputting the clock signal instead of the serial data and D3 - SHIFT_CLK isn't putting out anything other than going high

All those wires that go to the smaller breadboard I made for the logic analyser (left blue board). From there they take different signals from the eeprom programmer breadboard. The green and white hook ups are the serial data (D2) and serial clock (D3) signals respecively.

I would disconnect D2 from your breadboard and then check the activity on D2 with your LA just in case there's a wiring issue on the breadboard.

Ok so I've quadruple checked the wiring on the breadboard, to the LA and, that the pulseview wires are labelled correctly and theyre all in the right place. So I put those signals on an oscilloscope and it seems like D2 is actually sending data, however D3 is struggling to give a clock signal.

Oscilloscope; rigol DS1054Z

These 2 are from the breadboard:


This last 1 is directly from the arduino:

So it looks like the arduino is performing correctly. I think because the cheap LA can only go to 1Mhz sample rate the serial byte was displaying as what looked like a clock pulse but was actually a combination of bits. So I think the issue is actually just a shitty breadboard.

Hey guys, it's taken a few weeks but I've more or less solved it. Firstly, I hooked it up to a Osciloscope and found that the arduino was outputting correctly, my sample rate on the logic analyser was too low to see AND the signals were getting lost as soon as they reached the board due to a shitty breadboard.

So I tried transplanting everything onto a solder breadboard and soldering all the connections. However, when I reflashed the arduino the serial read wasn't showing that the EEPROM had been programmed.

I finally caved and bought an Xgecu T48 Universal programmer. I used Dissy614's binary file from his Google Drive and uploaded it to the EEPROM. I did however find it was only writing every 7th byte when setting the device as an Atmel AT28C16, so following Shyssiryxius's solution to instead set the device as a Catalyst CAT28C16A I was finally able to correctly program the EEPROMS.

I did find that when I first read the second EEPROM with the T48 it had the correct programming so I think that my solder breadboard programmer was working, The arduino just wasn't reading properly. But by then it was too late. The soldered breadboard may have worked but I did rush a few of the connections towards the end and I have the T48 now which definately did the job.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.