SPI or I2C for EEPROM

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
gstreet
Posts: 12
Joined: Wed Jan 04, 2012 12:23 pm
Been thanked: 2 times

SPI or I2C for EEPROM

Post by gstreet »

Hi

I have a data aquisition project and need to store 99 sets of data around 200bytes/set aquired by PIC18F4550 from a sensor with SPI comm, as the data needs to be secure I'm loading each data set to the internal EEPROM. I am considering an additional 32kb EEPROM using the PICs to buffer the data sets and copy to the external EEPROM, the pic will then access all the data via the USB. There is bags of time between set aquisitions, the accumulated data in the external EEPROM is to be uploaded to PC via the USB function with Labview.
Q. Which is best, SPI or I2C for the external EEPROM?
Q. Is this approach the most elagant solution?

Gary

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: SPI or I2C for EEPROM

Post by Benj »

Hello Gary,

SPI or I2C doesn't really matter. SPI is generally faster but requires more I/O pins and you may be limited by the speed of the memory anyway.

Flash is generally quicker then EEPROM if your looking for speed and also does not have the inherent 10,000 read write cycle limitation.

What about using a SD card instead of the EEPROM? This way you can store data in a separate files if you wish etc.

gstreet
Posts: 12
Joined: Wed Jan 04, 2012 12:23 pm
Been thanked: 2 times

Re: SPI or I2C for EEPROM

Post by gstreet »

Benj

Thanks for the quick response, the hardware is destined to fit in a 'memory stick' size footprint so I'd rulled out SD and micro SD's but I accept your tip on SPI and flash with thanks

Gary

Post Reply