Arduino EEPROM Programmer: Burning a ROM image

Hi,

I'm not familiar with programming EEPROMs, but seems to me you're almost there.
First I would recommend replacing this:

      if((A&bit(i))>0) 
      {
        AD[i]=HIGH;
      } else {
        AD[i]=LOW;
      }      
      digitalWrite(AP[i],AD[i]);

with:

      digitalWrite(AP[i], bitRead(A,i));

and losing the AD array all together.
Same can be done with the D loop and DD array.

As for reading serial data, you've already managed to use Serial communications, so all you would need (besides from perhaps something like error correction) would be replacing the line:

    D=0;

with something like:

    while (Serial.available()==0) delay(1);
    D = Serial.read();

That would assume you would always send the full content of the EEPROM (8192 bytes) through the serial port.

Good luck!

Regards Dennis