Only writing last byte to EEPROM

Hey, guys. I have an Arduino Micro that I'm trying to use to program a bunch of EEPROMs I'm going to use in a digital circuit build. I'm currently working on programming the first EEPROM, but it's not programming as expected.

The problem:
What is supposed to happen in the code below is the first 4 addresses in the EEPROM should be written to with the data in setup() (0x69 0x55 0xAA 0x0D). However, when I read the EEPROM, it shows 0xFF 0xFF 0xFF 0x0D is programmed. I have verified this in my digital circuit build, so I know that my program is properly reading the EEPROM.

If I only program the first 3 bytes in the EEPROM (addresses 0, 1, & 2), it writes 0xFF 0xFF 0xAA. This tells me that only the last byte is actually being written. I'm not sure why this is, so I'm hoping someone can help me.

The hardware:
Arduino Micro w/ micro-USB cable.
3 74HC595 chips (8-bit shift registers) for the address lines (17-bit address on this EEPROM). Link to data sheet.
1 Greenliant GLS29EE010 EEPROM. 17-bit addresses, 8-bit data per address. Link to data sheet.

The EEPROM does have Software Data Protection and a Page-Write capability. I don't know if those are inhibiting me or even how to use them. The way the data sheet reads makes me think I should be able to just write to the EEPROM 1 byte at a time like I am trying.

The way I have the circuit hooked up is:
The shift registers are wired to the address lines of the EEPROM.
The data lines of the EEPROM are connected directly to the Arduino Micro.

The code:

#define EEPROM_D0 2 // data LSB
#define EEPROM_D7 9 // data MSB

#define SHIFT_DATA 10 // data to shift into shift register
#define SHIFT_CLK 11 // pos-edge clock for shift register
#define DFF_CLK 12 // pos-edge clock for DFF to set after filling shift register
#define SHIFT_CLR 13 // active-low async clear for shift registers

#define EEPROM_READ_EN A0 // active-low EEPROM read enable
#define EEPROM_WRITE_EN A1 // active-low EEPROM write enable

void setup() {
  // put your setup code here, to run once:
  Serial.begin(300);
  while (!Serial) { delay(10); }

  // Write some data
  setPinsToDefaultForWriting();
  writeEEPROM(0, B01101001); // 0x69
  writeEEPROM(1, B01010101); // 0x55
  writeEEPROM(2, B10101010); // 0xAA
  writeEEPROM(3, B00001101); // 0x0D

  // Check what was written
  setPinsToDefaultForReading();
  byte data[] = { readEEPROM(0), readEEPROM(1), readEEPROM(2), readEEPROM(3) };
  char buf[80];
  sprintf(buf, "Read data: %02x %02x %02x %02x", data[0], data[1], data[2], data[3]);
  Serial.println(buf);
}

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

  // This code just keeps the Arduino Micro running so I can check voltages with a multimeter.
  // Not sure if it's actually needed in order to maintain whatever voltages, but it's not doing any harm.
  digitalWrite(LED_BUILTIN, HIGH);
  Serial.println("ON");
  delay(3000);
  digitalWrite(LED_BUILTIN, LOW);
  Serial.println("OFF");
  delay(3000);
}

/*
 * Sets all the pins for writing to the EEPROM. Still have to manually handle EEPROM_WRITE_EN for writing.
 * No delay in this function.
 */
void setPinsToDefaultForWriting()
{
  for (int pin = EEPROM_D0; pin <= EEPROM_D7; pin++) // for each data pin
  {
    pinMode(pin, OUTPUT);
    digitalWrite(pin, LOW);
  }

  pinMode(SHIFT_DATA, OUTPUT);
  digitalWrite(SHIFT_DATA, LOW);
  pinMode(SHIFT_CLK, OUTPUT);
  digitalWrite(SHIFT_CLK, LOW);
  pinMode(DFF_CLK, OUTPUT);
  digitalWrite(DFF_CLK, LOW);
  pinMode(SHIFT_CLR, OUTPUT);
  digitalWrite(SHIFT_CLR, HIGH);

  pinMode(EEPROM_READ_EN, OUTPUT);
  digitalWrite(EEPROM_READ_EN, HIGH);
  pinMode(EEPROM_WRITE_EN, OUTPUT);
  digitalWrite(EEPROM_WRITE_EN, HIGH);
}

/*
 * Sets all the pins for reading from the EEPROM. Still have to manually handle EEPROM_READ_EN for writing.
 * No delay in this function.
 */
void setPinsToDefaultForReading()
{
  for (int pin = EEPROM_D0; pin <= EEPROM_D7; pin++) // for each data pin
  {
    pinMode(pin, INPUT);
  }

  pinMode(SHIFT_DATA, OUTPUT);
  digitalWrite(SHIFT_DATA, LOW);
  pinMode(SHIFT_CLK, OUTPUT);
  digitalWrite(SHIFT_CLK, LOW);
  pinMode(DFF_CLK, OUTPUT);
  digitalWrite(DFF_CLK, LOW);
  pinMode(SHIFT_CLR, OUTPUT);
  digitalWrite(SHIFT_CLR, HIGH);

  pinMode(EEPROM_READ_EN, OUTPUT);
  digitalWrite(EEPROM_READ_EN, HIGH);
  pinMode(EEPROM_WRITE_EN, OUTPUT);
  digitalWrite(EEPROM_WRITE_EN, HIGH);
}

/*
 * Sets the shift registers values so they contain the address. They will be sending the EEPROM this address
 * after this function is called. No delay in this function.
 * 
 * Note: MAKE SURE YOU CALL setPinsToDefaultForReading() OR setPinsToDefaultForWriting() BEFORE CALLING THIS FUNCTION.
 * This function does not make sure the pins are set properly.
 */
void setAddress(unsigned long address)
{
  // address can have 17 bits of important info, but int is only 16 bits long, so have to use long.
  // long is 32 bits.
  
  shiftOut(SHIFT_DATA, SHIFT_CLK, LSBFIRST, (address));       // Outputs XXXX XXXX (bits 0-7)
  shiftOut(SHIFT_DATA, SHIFT_CLK, LSBFIRST, (address >> 8));  // Outputs XXXX XXXX (bits 8-15)
  shiftOut(SHIFT_DATA, SHIFT_CLK, LSBFIRST, (address >> 16)); // Outputs 0000 000X (bits 16-23)

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

/*
 * Writes to the EEPROM. Does delay after the write to ensure the contents are actually saved.
 * 
 * Note: MAKE SURE YOU CALL setPinsToDefaultForWriting() BEFORE CALLING THIS FUNCTION.
 * This function does not make sure the pins are set properly.
 */
void writeEEPROM(unsigned long address, byte data)
{
  // Set up the address and data
  setAddress(address);
  for (int pin = EEPROM_D0; pin <= EEPROM_D7; pin++) // for each data pin
  {
    digitalWrite(pin, data & 1);
    data = data >> 1;
  }

  // Perform the write
  digitalWrite(EEPROM_WRITE_EN, LOW);
  digitalWrite(EEPROM_WRITE_EN, HIGH);
  delay(20); // datasheet says write takes max of 10 ms
}

/*
 * Reads from the EEPROM. No delay in this function.
 * 
 * Note: MAKE SURE YOU CALL setPinsToDefaultForReading() BEFORE CALLING THIS FUNCTION.
 * This function does not make sure the pins are set properly.
 */
byte readEEPROM(unsigned long address)
{
  // Set up the address
  setAddress(address);

  // Perform the read
  digitalWrite(EEPROM_READ_EN, LOW);
  byte data = 0;
  for (int pin = EEPROM_D7; pin >= EEPROM_D0; pin--) // for each data pin in reverse
  {
    data = (data << 1) + digitalRead(pin);
  }
  digitalWrite(EEPROM_READ_EN, HIGH);

  return data;
}

The datasheet has no description of a write cycle without SDP commands. Where did you find the information that a non SDP write is possible without actively disabling SDP'

On page 1 of the EEPROM's datasheet, under "Device Operation", it says SDP is optional. Also, on page 3 under "Software Data Protection (SDP)", the last sentence of the first paragraph says the chip is shipped with SDP disabled.

I am able to successfully write 1 byte to the chip. However, I think the issue is this chip doesn't actually have a single byte-write capability; it only has page-write. I initially thought it had byte-write capability.

Any addresses that are not given a value to write but are in the same page as the "current page" are filled with 0xFF, which I think is what's happening. However, removing the delay in writeEEPROM() and adding a 15ms delay in setup() after all 4 write operations (before the read operations) to try to do a page-write does not properly write any data to the EEPROM. Reading the data with this change gives me 0xFF 0xFF 0xFF 0x00. It's always all 0xFF until the last byte, which is then 0x00, no matter how many bytes I read.

I probably just have no idea how to do a page-write properly. I can't seem to find tutorials or datasheets for other parallel EEPROMs with good instructions for page-write either.

Can anyone help me with understanding how to page-write to this parallel EEPROM?

I'd try to implement the flowchart on page 18. The upper 10 bits of the address defines a page (page 7, table 2). Set that, leave it alone and load+increment the byte addresses 'til 128 is reached then work the signals to write the data. I didn't go in depth but it looks possible the chip may self-initiate writing when the 128 byte count is reached. Advance the page address, lather, rinse, repeat.

I enabled SDP with the 3-byte command and then made some changes to the original code I posted to try to follow the flowchart on page 18 and to fill 1 full page with data. For simplicity, I tried to fill each byte with its address (ex: address 0x44 will have value 0x44). However, most of the addresses are still incorrect.

The output I got:
I attached my output as an image. The whole left column is filled with 0x00 and 1 spot has 0x7A (although that's the 0x7B spot). The rest of the values are all 0xFF.

The modified code:
I significantly changed the setup() function, added a print128Bytes() function, and removed the delay in the writeEEPROM() function so that there is hopefully less than 100 microseconds between each call to it.

#define EEPROM_D0 2 // data LSB
#define EEPROM_D7 9 // data MSB

#define SHIFT_DATA 10 // data to shift into shift register
#define SHIFT_CLK 11 // pos-edge clock for shift register
#define DFF_CLK 12 // pos-edge clock for DFF to set after filling shift register
#define SHIFT_CLR 13 // active-low async clear for shift registers

#define EEPROM_READ_EN A0 // active-low EEPROM read enable
#define EEPROM_WRITE_EN A1 // active-low EEPROM write enable

void setup() {
  // put your setup code here, to run once:
  Serial.begin(300);
  while (!Serial) { delay(10); }

  // Write some data
  setPinsToDefaultForWriting();

  // Get past SDP
  writeEEPROM(0x5555, 0xAA);
  writeEEPROM(0x2AAA, 0x55);
  writeEEPROM(0x5555, 0xA0);

  // Write the data
  //writeEEPROM(0, B01101001); // 0x69
  //writeEEPROM(1, B01010101); // 0x55
  //writeEEPROM(2, B10101010); // 0xAA
  //writeEEPROM(3, B00001101); // 0x0D
  for (int i = 0; i < 128; i++) // for 1 page
  {
    writeEEPROM(i, i); // write each address with its address
  }
  delay(15);

  // Check what was written
  setPinsToDefaultForReading();
  print128Bytes();
}

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

  // This code just keeps the Arduino Micro running so I can check voltages with a multimeter.
  // Not sure if it's actually needed in order to maintain whatever voltages, but it's not doing any harm.
  digitalWrite(LED_BUILTIN, HIGH);
  Serial.println("ON");
  delay(3000);
  digitalWrite(LED_BUILTIN, LOW);
  Serial.println("OFF");
  delay(3000);
}

/*
 * Prints the contents of the EEPROM at the first 128 addresses. No delays in this function.
 * 
 * Example output format:
 * 00000: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00
 * 00010: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00
 * 00020: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00
 * ...
 * 
 * Note: MAKE SURE YOU CALL setPinsToDefaultForReading() BEFORE CALLING THIS FUNCTION.
 * This function does not make sure the pins are set properly.
 */
void print128Bytes()
{
  unsigned long baseAddr;

  for (baseAddr = 0UL; baseAddr < 128UL; baseAddr += 16UL) // for every 16 addresses in the EEPROM
  {
    byte data[16];
    for (unsigned int offset = 0U; offset < 16U; offset++) // for each address within the current set of 16 addresses
    {
      data[offset] = readEEPROM(0UL + baseAddr + offset);
    }

    char buf[80];
    sprintf(buf, "%05x: %02x %02x %02x %02x %02x %02x %02x %02x   %02x %02x %02x %02x %02x %02x %02x %02x",
      baseAddr, 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);
  }
}

/*
 * Sets all the pins for writing to the EEPROM. Still have to manually handle EEPROM_WRITE_EN for writing.
 * No delay in this function.
 */
void setPinsToDefaultForWriting()
{
  for (int pin = EEPROM_D0; pin <= EEPROM_D7; pin++) // for each data pin
  {
    pinMode(pin, OUTPUT);
    digitalWrite(pin, LOW);
  }

  pinMode(SHIFT_DATA, OUTPUT);
  digitalWrite(SHIFT_DATA, LOW);
  pinMode(SHIFT_CLK, OUTPUT);
  digitalWrite(SHIFT_CLK, LOW);
  pinMode(DFF_CLK, OUTPUT);
  digitalWrite(DFF_CLK, LOW);
  pinMode(SHIFT_CLR, OUTPUT);
  digitalWrite(SHIFT_CLR, HIGH);

  pinMode(EEPROM_READ_EN, OUTPUT);
  digitalWrite(EEPROM_READ_EN, HIGH);
  pinMode(EEPROM_WRITE_EN, OUTPUT);
  digitalWrite(EEPROM_WRITE_EN, HIGH);
}

/*
 * Sets all the pins for reading from the EEPROM. Still have to manually handle EEPROM_READ_EN for writing.
 * No delay in this function.
 */
void setPinsToDefaultForReading()
{
  for (int pin = EEPROM_D0; pin <= EEPROM_D7; pin++) // for each data pin
  {
    pinMode(pin, INPUT);
  }

  pinMode(SHIFT_DATA, OUTPUT);
  digitalWrite(SHIFT_DATA, LOW);
  pinMode(SHIFT_CLK, OUTPUT);
  digitalWrite(SHIFT_CLK, LOW);
  pinMode(DFF_CLK, OUTPUT);
  digitalWrite(DFF_CLK, LOW);
  pinMode(SHIFT_CLR, OUTPUT);
  digitalWrite(SHIFT_CLR, HIGH);

  pinMode(EEPROM_READ_EN, OUTPUT);
  digitalWrite(EEPROM_READ_EN, HIGH);
  pinMode(EEPROM_WRITE_EN, OUTPUT);
  digitalWrite(EEPROM_WRITE_EN, HIGH);
}

/*
 * Sets the shift registers values so they contain the address. They will be sending the EEPROM this address
 * after this function is called. No delay in this function.
 * 
 * Note: MAKE SURE YOU CALL setPinsToDefaultForReading() OR setPinsToDefaultForWriting() BEFORE CALLING THIS FUNCTION.
 * This function does not make sure the pins are set properly.
 */
void setAddress(unsigned long address)
{
  // address can have 17 bits of important info, but int is only 16 bits long, so have to use long.
  // long is 32 bits.
  
  shiftOut(SHIFT_DATA, SHIFT_CLK, LSBFIRST, (address));       // Outputs XXXX XXXX (bits 0-7)
  shiftOut(SHIFT_DATA, SHIFT_CLK, LSBFIRST, (address >> 8));  // Outputs XXXX XXXX (bits 8-15)
  shiftOut(SHIFT_DATA, SHIFT_CLK, LSBFIRST, (address >> 16)); // Outputs 0000 000X (bits 16-23)

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

/*
 * Writes to the EEPROM. No longer a delay in this function.
 * 
 * Note: MAKE SURE YOU CALL setPinsToDefaultForWriting() BEFORE CALLING THIS FUNCTION.
 * This function does not make sure the pins are set properly.
 */
void writeEEPROM(unsigned long address, byte data)
{
  // Set up the address and data
  setAddress(address);
  for (int pin = EEPROM_D0; pin <= EEPROM_D7; pin++) // for each data pin
  {
    digitalWrite(pin, data & 1);
    data = data >> 1;
  }

  // Perform the write
  digitalWrite(EEPROM_WRITE_EN, LOW);
  digitalWrite(EEPROM_WRITE_EN, HIGH);
  //delay(10); // datasheet says write takes max of 10 ms
}

/*
 * Reads from the EEPROM. No delay in this function.
 * 
 * Note: MAKE SURE YOU CALL setPinsToDefaultForReading() BEFORE CALLING THIS FUNCTION.
 * This function does not make sure the pins are set properly.
 */
byte readEEPROM(unsigned long address)
{
  // Set up the address
  setAddress(address);

  // Perform the read
  digitalWrite(EEPROM_READ_EN, LOW);
  byte data = 0;
  for (int pin = EEPROM_D7; pin >= EEPROM_D0; pin--) // for each data pin in reverse
  {
    data = (data << 1) + digitalRead(pin);
  }
  digitalWrite(EEPROM_READ_EN, HIGH);

  return data;
}

After letting the project sit for a couple weeks, I started a new program with a different approach to the writeEEPROM() function. It now works. I'll put sample code in my next post in case anyone else has similar issues. I'd put it in this one, but there's a 9000 character limit and the code is 8510 characters.

The main changes:

  • The previous post's read data had "00" at the beginning of each line. Fixed that problem by changing "%05x" to "%05lx" in the sprintf() call. That missing 'L' was the whole problem with the read data in that post.
  • writeEEPROM() now ends the previous write as close as it can to beginning the new write in order to make the time between writes <100us. To do this, writeEEPROM() leaves EEPROM_WRITE_EN (WE#) active (low).
  • Since writeEEPROM() leaves write enable active, I added the endWriting() function to make it inactive and then wait for the page write to finish. It should be called when done writing a page, not after each byte.
/*
 * Programs the 17x8 Greenliant GLS29EE010 EEPROM using an Arduino Micro and 3 74HC595 shift registers.
 * 
 * The following control signals for the shift registers are hardwired to the Arduino:
 * SHIFT_DATA (SER)
 * SHIFT_CLK (SRCLK)
 * DFF_CLK (RCLK)
 * SHIFT_CLR (SRCLR#)
 * 
 * The following control signals for the EEPROM are hardwired to the Arduino:
 * EEPROM_READ_EN (OE#)
 * EEPROM_WRITE_EN (WE#)
 * 
 * The shift registers are used for the address. The bottom 17 outputs are used.
 * The top 7 outputs are filled with 0s but not used.
 * Shifts data into the shift registers in LSB first format.
 * The lowest bit (QH on the lowest shift register) is connected to A0 (LSB) on the EEPROM.
 * The highest bit (QH (not QA b/c only need 1 bit) on the highest shift register) is connected to A16 (MSB) on the EEPROM.
 * The highest shift register's QA through QG are not connected to anything.
 * 
 * The 8 data lines are hardwired between the Arduino Micro and the EEPROM.
 * Lower Arduino pin number is used for LSB in the EEPROM.
 * Higher Arduino pin number is used for MSB in the EEPROM.
 */

#define EEPROM_D0 2 // data LSB
#define EEPROM_D7 9 // data MSB

#define SHIFT_DATA 10 // data to shift into shift register
#define SHIFT_CLK 11 // pos-edge clock for shift register
#define DFF_CLK 12 // pos-edge clock for DFF to set after filling shift register
#define SHIFT_CLR 13 // active-low async clear for shift registers

#define EEPROM_READ_EN A0 // active-low EEPROM read enable
#define EEPROM_WRITE_EN A1 // active-low EEPROM write enable

void setup()
{
  // put your setup code here, to run once:
  Serial.begin(300);
  while (!Serial) { delay(10); }

  // *** WRITE THE DATA ***
  setPinsToDefaultForWriting();
  Serial.print("Programming EEPROM");
  Serial.flush();

  // Write the 1st page of data
  bypassSDP();
  for (int i = 0; i < 16; i++) // the first 2-16 bytes written in each page are skipped for some reason, so write 16 useless bytes
    writeEEPROM(0, 0xFF);
  writeEEPROM(0, B01101001); // 0x69
  writeEEPROM(1, B01010101); // 0x55
  writeEEPROM(2, B10101010); // 0xAA
  writeEEPROM(3, B00001101); // 0x0D
  endWriting(); // end the page write

  // Write the 2nd page of data
  bypassSDP();
  for (int i = 0; i < 16; i++) // the first 2-16 bytes written in each page are skipped for some reason, so write 16 useless bytes
    writeEEPROM(128, 0xFF);
  writeEEPROM(128, B10010110); // 0x96
  writeEEPROM(129, B01010101); // 0x55
  writeEEPROM(130, B10101010); // 0xAA
  writeEEPROM(131, B11010000); // 0xD0
  endWriting(); // end the page write
  
  Serial.println(" Done writing");
  Serial.flush();

  // *** CHECK WHAT WAS WRITTEN ***
  setPinsToDefaultForReading();
  print256Bytes();
  Serial.println("Done reading");
  Serial.flush();
}

void loop()
{
}

/*
 * Gets past SDP by sending the appropriate 3-byte code to the appropriate addresses.
 * Does not finish the SDP write by sending EEPROM_WRITE_EN high.
 */
void bypassSDP()
{
  writeEEPROM(0x5555, 0xAA);
  writeEEPROM(0x2AAA, 0x55);
  writeEEPROM(0x5555, 0xA0);
}

/*
 * Sets all the pins for reading from the EEPROM. Don't have to manually handle EEPROM_READ_EN for reading.
 * No delay in this function.
 */
void setPinsToDefaultForReading()
{
  for (int pin = EEPROM_D0; pin <= EEPROM_D7; pin++) // for each data pin
  {
    pinMode(pin, INPUT);
  }

  pinMode(SHIFT_DATA, OUTPUT);
  digitalWrite(SHIFT_DATA, LOW);
  pinMode(SHIFT_CLK, OUTPUT);
  digitalWrite(SHIFT_CLK, LOW);
  pinMode(DFF_CLK, OUTPUT);
  digitalWrite(DFF_CLK, LOW);
  pinMode(SHIFT_CLR, OUTPUT);
  digitalWrite(SHIFT_CLR, HIGH);

  pinMode(EEPROM_READ_EN, OUTPUT);
  digitalWrite(EEPROM_READ_EN, LOW); // always read
  pinMode(EEPROM_WRITE_EN, OUTPUT);
  digitalWrite(EEPROM_WRITE_EN, HIGH);
}

/*
 * Sets all the pins for writing to the EEPROM. Still have to manually handle EEPROM_WRITE_EN for writing.
 * No delay in this function.
 */
void setPinsToDefaultForWriting()
{
  for (int pin = EEPROM_D0; pin <= EEPROM_D7; pin++) // for each data pin
  {
    pinMode(pin, OUTPUT);
    digitalWrite(pin, LOW);
  }

  pinMode(SHIFT_DATA, OUTPUT);
  digitalWrite(SHIFT_DATA, LOW);
  pinMode(SHIFT_CLK, OUTPUT);
  digitalWrite(SHIFT_CLK, LOW);
  pinMode(DFF_CLK, OUTPUT);
  digitalWrite(DFF_CLK, LOW);
  pinMode(SHIFT_CLR, OUTPUT);
  digitalWrite(SHIFT_CLR, HIGH);

  pinMode(EEPROM_READ_EN, OUTPUT);
  digitalWrite(EEPROM_READ_EN, HIGH);
  pinMode(EEPROM_WRITE_EN, OUTPUT);
  digitalWrite(EEPROM_WRITE_EN, HIGH);
}

/*
 * Sets the shift registers values so they contain the address. Does not clock the DFF H/L to have the shift registers output the address.
 * No delay in this function.
 * 
 * Note: CALL setPinsToDefaultForReading() OR setPinsToDefaultForWriting() BEFORE CALLING THIS FUNCTION.
 * This function does not make sure the pins are set properly.
 * 
 * Note 2: CALL digitalWrite(DFF_CLK, HIGH) AND digitalWrite(DFF_CLK, LOW) after calling this function.
 * Otherwise the shift registers will still be outputting the previous address.
 */
void shiftAddress(unsigned long address)
{
  // address can have 17 bits of important info, but int is only 16 bits long, so have to use long.
  // long is 32 bits.
  
  shiftOut(SHIFT_DATA, SHIFT_CLK, LSBFIRST, (address));       // Outputs XXXX XXXX (bits 0-7)
  shiftOut(SHIFT_DATA, SHIFT_CLK, LSBFIRST, (address >> 8));  // Outputs XXXX XXXX (bits 8-15)
  shiftOut(SHIFT_DATA, SHIFT_CLK, LSBFIRST, (address >> 16)); // Outputs 0000 000X (bits 16-23)
}

/*
 * Reads from the EEPROM. No delay in this function.
 * 
 * Note: MAKE SURE YOU CALL setPinsToDefaultForReading() BEFORE CALLING THIS FUNCTION.
 * This function does not make sure the pins are set properly.
 */
byte readEEPROM(unsigned long address)
{
  // Set up the address
  shiftAddress(address);
  digitalWrite(DFF_CLK, HIGH);
  digitalWrite(DFF_CLK, LOW);

  // Perform the read
  byte data = 0;
  for (int pin = EEPROM_D7; pin >= EEPROM_D0; pin--) // for each data pin in reverse
  {
    data = (data << 1) + digitalRead(pin);
  }

  return data;
}

/*
 * Starts a write to the EEPROM. Does not finish it in order to let either the next writeEEPROM() call
 * or an endWriting() call finish it. No delay in this function.
 * 
 * Note: MAKE SURE YOU CALL setPinsToDefaultForWriting() BEFORE CALLING THIS FUNCTION.
 * This function does not make sure the pins are set properly.
 * 
 * Note 2: MAKE SURE YOU CALL endWriting() WHEN YOU ARE DONE SETTING THE DATA FOR THE PAGE WRITE.
 * Otherwise only some data will get written (probably nothing or everything except the last piece
 * you put in) and EEPROM_WRITE_EN will stay active (low).
 */
void writeEEPROM(unsigned long address, byte data)
{
  // Set up the address
  shiftAddress(address);

  // End the previous write if there was one
  digitalWrite(EEPROM_WRITE_EN, HIGH);

  // Show the new address to the EEPROM
  digitalWrite(DFF_CLK, HIGH);
  digitalWrite(DFF_CLK, LOW);
  
  // Set up the data
  for (int pin = EEPROM_D0; pin <= EEPROM_D7; pin++) // for each data pin
  {
    digitalWrite(pin, data & 1);
    data = data >> 1;
  }

  // Start the write
  digitalWrite(EEPROM_WRITE_EN, LOW);
}

/*
 * Finishes the page write by making EEPROM_WRITE_EN go high and then waiting 20ms for the write to happen.
 * Can start writing a new page once this function is done.
 */
void endWriting()
{
  digitalWrite(EEPROM_WRITE_EN, HIGH);
  delay(20);
}

/*
 * Prints the contents of the EEPROM at the first 256 addresses. No delays in this function.
 * 
 * Example output format:
 * 00000: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00
 * 00010: 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00
 * ...
 * 
 * Note: MAKE SURE YOU CALL setPinsToDefaultForReading() BEFORE CALLING THIS FUNCTION.
 * This function does not make sure the pins are set properly.
 */
void print256Bytes()
{
  unsigned long baseAddr;

  byte data[16];
  for (baseAddr = 0UL; baseAddr < 256UL; baseAddr += 16UL) // for every 16 addresses in the EEPROM
  {
    for (unsigned int offset = 0U; offset < 16U; offset++) // for each address within the current set of 16 addresses
    {
      data[offset] = readEEPROM(baseAddr + offset);
    }

    char buf[80];
    sprintf(buf, "%05lx: %02x %02x %02x %02x %02x %02x %02x %02x   %02x %02x %02x %02x %02x %02x %02x %02x",
      baseAddr, 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]);
    // the %05lx above has an L, not a one

    Serial.println(buf);
    Serial.flush();
  }
}

<<
Data Sheet
1 Mbit Page-Write EEPROM
GLS29EE010
©2010 Greenliant Systems, Ltd. S71061-15-001 05/10

Read
The Read operations of the GLS29EE010 is controlled by
CE# and OE#, both have to be low for the system to obtain
data from the outputs. CE# is used for device selection.

I do not see a ChipEnable in your code

I have CE# (chip enable) wired to ground, so it's always active. I only control WE# and OE# (write enable and output enable).