8.25.2010

So on my journey to ultimately one day making a killer quadcopter or other autonomous aerial vehicle, I have identified a few key technologies that I need to get a good grasp on that will ultimately be used in any project. Dove-tailing off my previous tinkering with my GPS and with an impending family trip coming up I was hoping to have a working GPS logger ready to capture the path we take on our daily adventures. (Not sure how the wife is gonna feel about me tinkering at night on vacation?!)

So besides getting a full SD card logger ready I thought I might try to use some serial EEPROMs from Microchip. I have had an account with Microchip all the way back to my undergrad days and it is very easy and very quick to get free samples from them, and totally free is my favorite price.

So I went to their website and started searching through their memory product line. I was initially interested in checking out their Flash based product line but that link sent me to another website, SST - Silicon Storage Technology Inc., that wasnt managed through Microchip Sample website. To get samples of their flash products you have to fill out a request form.....that wasnt going to happen. So back to the Microchip website and looking at some Serial EEPROM devices. Since Arduino has I2C and SPI interfaces I started looking for products that interface through those protocols. I eventually settled on the 24XXYYY family of devices that communicate through I2C. Their sizes range from 128 bit all the way up to 8 MBit and up to 8 separate devices can be placed on the same I2C bus to expand your storage capabilities even further. Unfortunately the largest EEPROM, the 24FC1025, had a long lead time of something like 46 weeks (RIDICULOUS!) so I wound up placing an order for the 24FC512 (which will more than accomplish what I am doing.

Once you have those you can upload the sketch below, and assuming everything is connected properly you should be good to go.

The Arduino sketch looks like this:

#include "WProgram.h"#include

// Use the 24XX512 EEPROM as storage#include //Handles the I2C interface#include // Should be compatible with 24XX512 series in this instance

// From the 24XX512 datasheet://// The Chip Select bits A2, A1 and A0 can be used to expand the // contiguous address space for up to 4 Mbit by adding up to eight // 24XX512 devices on the same bus. //// So, each device must be have their address pins wired as listed below to // create a single, contiguous address space across one or more devices.//// Example - 1 device: // Device connections: A0->GND, A1->GND, A2->GND// Uncomment only the #define TABLE_SIZE 65536 line below.

// The number of demo records that should be created. This should be less // than (TABLE_SIZE - sizeof(EDB_Header)) / sizeof(LogEvent). If it is higher, // operations will return EDB_OUT_OF_RANGE for all records outside the usable range.#define RECORDS_TO_CREATE 327

// Arbitrary record definition for this table. // This should be modified to reflect your record needs.struct LogEvent { int Lat; int Lon; int UTC_Time;} logEvent;

Hopefully this helps those looking to use Serial EEPROMs in their projects. I leaned very heavily on the work of others but thats usually the best way to get up to speed. Once you have a working knowledge its much easier to dive back in and truly understand the internal workings of the code.