I am using RaspberryPi-BuildRoot to create the kernel and rootfs for the Raspberry Pi. Connect up the chip Vss and Vdd and that covers all 8 pins of the chip. Because I want to write to it, I need to connect that to ground according to the datasheet. It will be important to know this address later. So, if you ground the three pins, the address really becomes '1010000', which is address 0x50 in hex. They are part of a hard coded binary prefix of '1010'. However, those 3 pins alone don't make up the address. This particular chip has 3 pins used for chip select addressing. So, when they are configured for I 2C, and you're not communicating, you'll see these pins high. It turns out, these two pins have internal pullups on the Raspberry Pi. Those get wired directly to the same pins on the chip. Pins 3 and 5 on the Raspberry Pi GPIO header are the SDA and SCL pins for I 2C respectively (I 2C is a 2 wire bus). Also, connect up the grounds for good measure. The Bus Pirate MOSI(UART Rx) and MISO(UART Tx) pins are connected to the Raspberry Pi pins 8 and 10 respectively.
#Raspberry pi eeprom programmer serial
My test setup involves the Raspberry Pi, a Bus Pirate connected to the Raspberry Pi serial port, and a breadboard that has the EEPROM mounted on it connected to the I 2C port on the Raspberry Pi. This example really can't get any simpler. If you're expecting fast write speeds, this is something to keep in mind.
It's also worth knowing that the page size is 64 bytes and it can take up to 5ms to write a page according to the datasheet. Checking the supported bus speed of the device is a good thing to know. The datasheet is needed to reference several things. It turns out, a lot of I 2C EEPROM, and even FRAM, chips have almost the same exact interface. Make sure and have the datasheet for the Microchip 24LC256 (or whatever chip you're using). For now, I'll cover actually getting the EEPROM connected up and working under Linux on a Raspberry Pi. I'll go over actually using the Bus Pirate to do this in a different post. I figured I'd connect up an I 2C EEPROM I have on hand and use it to monitor I 2C communications later. For as much as this thing can do, it's a pretty silly use for it. I have a Bus Pirate v3 and up until now I've simply used it as a USB to Serial converter at chip signal levels.