24C02 EEPROM dump

Hi all,

any idea how i can dump the contents of a 24C02 EEPROM to a bin file using a panda and I2C ?

There was a good tutorial on DP about their BusPirate and different EEPROMs. That might give you an idea on how to approach this with FEZ. Good luck!

Do you have an SD card on the Panda? If you do then it is really about 20 lines of code. I did something similar, but lost the code when I formated my PC…

No, but I do have SD on the Cobra/Rhino, could use that one too.

Now if you could only remember the code… :smiley:

I’m trying to revive an old xbox, but the HD is dead and the only way to put a new HD in it is when you have the HD serial from the EEPROM.

BTW Here is the link I was talking about:

http://dangerousprototypes.com/docs/3EEPROM_explorer_board

I thought it was hacking related. I did it to try and hack my printer cartridge. My effort didn’t go so well as samsung now uses a Challange And Response to unlock the eeprom. :slight_smile:

It struck me lst night while I was wasing dishes that, although I DID reinstall windows, I reinstalled it to a new drive. The old drive should be arround, but it started giving bad sector issues. I will try an locate the code when my wife and I come back form an outing later today…

1 Like

cool…

Sorry, that drive is beyond help. Windows just wants to format is and Seagate’s tools says the drive has unrecoverable bad sectors…

Sorry…

No problem, thanks for trying :wink:

Look what I found. Seatools said the drive it dead, but it is alive enough to get some things off…

This is the code that I used. My rom needed an unlock code to read the rom, hence the strange write transaction. I don’t have VS2010 on this PC so I will rewrite it tomorrow for a more normal eeprom…

using System.Threading;
using System.Text;
using Microsoft.SPOT;
using System.IO;
using Microsoft.SPOT.IO;
using GHIElectronics.NETMF.IO;
using Microsoft.SPOT.Hardware;



namespace Printer_Rom_Reader
{
    public class Program
    {
        public static void Main()
        {
            // Blink board LED

                Thread.Sleep(500);





            PersistentStorage sdPS = new PersistentStorage("SD");
 
            // Mount the file system
            sdPS.MountFileSystem();

            string rootDirectory = VolumeInfo.GetVolumes()[0].RootDirectory;
            FileStream FileHandle = new FileStream(rootDirectory +
                                          @ "\Read2.bin", FileMode.Create);



            //Find device
            for (ushort i = 0; i < 127; i++)
            {
                I2CDevice a = new I2CDevice(new I2CDevice.Configuration(i, 100));
                I2CDevice.I2CTransaction[] Read = new I2CDevice.I2CTransaction[1];
                I2CDevice.I2CTransaction[] Write = new I2CDevice.I2CTransaction[1];
                byte[] ReadData = new byte[150];
                byte[] WriteData = new byte[]{0x00,0x88,0x01,0x00,0x08,0xA9,0x9F,0x39,0x56,0x98,0xA5,0xDD,0x82,0xBA,};
                Read[0] = I2CDevice.CreateReadTransaction(ReadData);
                Write[0] = I2CDevice.CreateWriteTransaction(WriteData);
                int r = a.Execute(Read, 1000);
                if (r > 0)
                {
                    r = a.Execute(Write, 1000);
                    r = a.Execute(Read, 1000);
                    FileHandle.Write(ReadData, 0, ReadData.Length);
                }
                a.Dispose();
            }

            sdPS.UnmountFileSystem();

        }

    }
}