Tv EDID HDMI

Hi all.

Background:-
I have my HTPC connected to my Tv via HDMI. However, when the Tv is switched off Windows7 on the HTPC will drop down to a different resolution, or indeed cause other issues. An I2C bus between the Tv and HTPC is where this all happens.
I have built a wee interface so that the Arduino will replace the Tv I2C as the slave device (HTPC is master).

Problem:-
I just can’t get the Arduino to react to the HTPC.
I’ve checked the I2C connections, and verified that the slave address should be 6E.

I’ve played with Arduino’s as Master devices but never slave…so here’s the code, just wondered if anyone can see anything wrong. Basically, the requestEvent is never called.

// EDID Keeper V1.0
// For use with Arduino Nano
// Ian Johnston 18/12/2010

#include <Wire.h>           // include Wire library for I2C
int ledpin=13;
int i=0;

// EDID data to send (Panasonic Tv), 128 bytes. Captured using PowerStrip or Read-EDID apps.
// 00 FF FF FF FF FF FF 00 34 A9 96 A0 01 01 01 01
// 00 13 01 03 80 00 00 78 0A DA FF A3 58 4A A2 29
// 17 49 4B 00 00 00 01 01 01 01 01 01 01 01 01 01
// 01 01 01 01 01 01 02 3A 80 D0 72 38 2D 40 10 2C
// 45 80 BA 88 21 00 00 1E 02 3A 80 18 71 38 2D 40
// 58 2C 45 00 BA 88 21 00 00 1E 00 00 00 FC 00 50
// 61 6E 61 73 6F 6E 69 63 2D 54 56 0A 00 00 00 FD
// 00 17 3D 0F 44 0F 00 0A 20 20 20 20 20 20 01 E2 

int EDIDArray[128]={
0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x34,0xA9,0x96,0xA0,0x01,0x01,0x01,0x01,
0x00,0x13,0x01,0x03,0x80,0x00,0x00,0x78,0x0A,0xDA,0xFF,0xA3,0x58,0x4A,0xA2,0x29,
0x17,0x49,0x4B,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x3A,0x80,0xD0,0x72,0x38,0x2D,0x40,0x10,0x2C,
0x45,0x80,0xBA,0x88,0x21,0x00,0x00,0x1E,0x02,0x3A,0x80,0x18,0x71,0x38,0x2D,0x40,
0x58,0x2C,0x45,0x00,0xBA,0x88,0x21,0x00,0x00,0x1E,0x00,0x00,0x00,0xFC,0x00,0x50,
0x61,0x6E,0x61,0x73,0x6F,0x6E,0x69,0x63,0x2D,0x54,0x56,0x0A,0x00,0x00,0x00,0xFD,
0x00,0x17,0x3D,0x0F,0x44,0x0F,0x00,0x0A,0x20,0x20,0x20,0x20,0x20,0x20,0x01,0xE2
};


void setup() {

  delay(500); // delay start

  pinMode(ledpin, OUTPUT);  // initialize as output

  Wire.begin(0x6E);                    // join i2c bus with address 0x6E, slave mode
  Wire.onRequest(requestEvent); // register event
  //Serial.begin(9600);              // start serial for output

}


void loop() {

   digitalWrite(ledpin, LOW);  // LED off
   delay(1); // slow down main loop
   
}

void requestEvent() { // Executed in response to a request from the master (HTPC),

  digitalWrite(ledpin, HIGH); // LED on when responding to request

  for (i = 0; i < 128; i++) {
    Wire.send(EDIDArray[i]);
    delay(1);
    //digitalWrite(ledpin, LOW);  // LED off
  }
  
}

Update:

On reading the spec of an EDID Eeprom I see 2 modes of operation need implemented. On power up it needs to broadcast the 128 bytes.

Ian.