PDA

View Full Version : Storing data on 128 Kbyte EEPROM from multiple sensors



Stormbringer
09-08-2008, 05:16 AM
----- NEOPHYTE WARNNG -----

http://forums.parallax.com/images/smilies/smhair.gifAs one might guess, I am new at this...can anyone give me some tips as to what BASIC code might be used to store data on a 24LC128 EEPROM from multiple input sources (i.e. 2125 Accelerometer, HB55 Compass, SHT11 Temperature and Humidity Sensor, etc.)http://forums.parallax.com/images/smilies/confused.gif.· I am using a BS2 Stamp to juggle the data now, but I can only do one sensor at a time, and if I try to combine them I usually get the "Out of Memory" error.· For right now, though I will be happy getting each sensor to upload data into the 24LC128, and will go to an FPGA Stamp with more memory later.

Stormy

PS - IF, however, one knows how I CAN get multiple sensors to run at the same time and upload data to 24LC128, I wouldn't complain...http://forums.parallax.com/images/smilies/tongue.gif

Mike Green
09-08-2008, 05:31 AM
Storing data on a 24LC128 EEPROM is easy if you have two I/O pins available and some program memory for the subroutines. If not, you will have to switch to something like a BS2p/pe/px Stamp which has built-in statements to do I/O to I2C devices like a 24LC128 EEPROM.

Download Nuts and Volts Column #115 including the sample code: www.parallax.com/Resources/NutsVoltsColumns/NutsVoltsVolume5/tabid/448/Default.aspx (http://www.parallax.com/Resources/NutsVoltsColumns/NutsVoltsVolume5/tabid/448/Default.aspx)
The sample code includes an example for the 24LC256 which is a 32K byte EEPROM. The 24LC128 is a
similar 16K EEPROM that's treated the same way.

With a Stamp, you can't really do more than one thing at a time, so you can't handle multiple sensors and logging to an EEPROM at the same time. For that, you'd need a Propeller which can do all that easily.

Post Edited (Mike Green) : 9/7/2008 10:38:49 PM GMT

Stormbringer
09-08-2008, 06:27 AM
Thanks for the intel !·http://forums.parallax.com/images/smilies/roll.gif
I have appended a quick program combo that sends data from a Compass to the EEPROM for any interested parties.http://forums.parallax.com/images/smilies/eyes.gif
...thinking a new Propeller is in my future...but when I am through I hope it is MY robot on the moon sending back data and pics http://forums.parallax.com/images/smilies/shocked.gif·(Google prize).

http://forums.parallax.com/images/smilies/smilewinkgrin.gif
Stormy

Stormbringer
09-08-2008, 06:29 AM
DOH !· I/O (Idiot Operator) Error !

See appended program file...

Stormy