PDA

View Full Version : In the market for a new stamp which begs some Memory Questions



joshuazvi
04-11-2007, 08:28 AM
Hi all,
i have posted questions here before and have had wonderful experiences with all your help.
now that you're all buttered up heres my question...
i am working on a device that automatically takes and stores data points from sensors for later display when plugged into a computer.
i have built the device and wrote the program and everything is working great. what i would like to do now is extend the ability of the device.
right now i have 3 sensors taking not more than 20 readings each and storing them using the WRITE command.
i would like to have around 20 sensors taking not more than 20 readings each.
so i am in need of a new stamp i think.
in addition to more input/outputs i am in need more memory obviously.
i know Parallax has these charts comparing their stamps. the problem is i'm not sure what kind of memory i need. i know that my variables are stored in RAM (i can see that in the memory map) but the readings don't seem to be. or are they? are they stored in EEPROM? and what is scratchpad RAM?
the way my program is now i would need 3 variables per sensor and some extra for programing etc.
what stamp would be my best option? or can i hook up extra memory to my BS2
thanks for your help!

Bill Chennault
04-11-2007, 09:49 AM
joshuazvi (http://forums.parallax.com/member.php?u=46918)--

Since no one has replied, I will take a shot at it, although I am a newbie. I am sure others will jump in with either better ideas or corrections to mine or, most likely, both.

How many bytes is a "reading"? If it is only one byte, meaning that it is 255 or less, then any of the Stamps have enough memory because each one--except the BS1--has at least 2K easily available to the WRITE command.

Your "readings" are stored either in variables you have defined in the Stamps very limited scratchpad RAM or in EEPROM if you used the WRITE command to put them there. (Sounds like you did not.) You will need to use the READ instruction to retrieve your readings. (Both are fully explained in the PBASIC Help menu item, as well as the The BASIC Stamp Syntax and Reference Manual· (http://www.parallax.com/detail.asp?product_id=27218) syntax manual which you can either buy or download free.

More I/O pins? Take a look at the BS2p40 (http://www.parallax.com/detail.asp?product_id=BS2P40-IC). It has 32 I/O pins.

Re: "the way my program is now i would need 3 variables per sensor and some extra for programing etc."

If you have 20 sensors, that would be 60 variables. Ain't gonna happen in Stamp world. You are limited to 26 variables. You will have to re-think that part of your program.

You can have more EEPROM memory, but it seems as if you have enough, now. You cannot have more variables.

Hopefully, someone else will chime in with more ideas for you and perhaps correct mine.

--Bill

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.

Chris Savage
04-11-2007, 09:55 AM
Hello,

Storage outside of the range of the BASIC Stamps can be had one of two ways…The first is to use external EEPROM chips, although it sounds like even then you have more data than what could easily be held on them. The other option is to use a USB Thumb Drive or Camera Flash card to store data. There are several options for each format which also lend to the data being easily read by a PC.

By the way, Scratch Pad RAM is RAM that cannot be configured for variables but can store information closer to the way the EEPROM does. Rather than READ/WRITE the SPRAM uses GET/PUT. Take care.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support

swrider
04-11-2007, 09:56 AM
I'm also very new here but think you may want to explore the Propeller, all the capabilities of the stamp and alot more.

M

Chris Savage
04-11-2007, 09:59 AM
swrider,

It doesn’t sounds like he’s lacking processing resources of even RAM but rather storage for logging. Even the Propeller won’t have enough for what he wants to do. Additional external storage would still be needed. Using one of the above methods sounds more plausible given the nature of the task. Take care.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support

Mike Green
04-11-2007, 10:49 AM
A lot depends on the number of bytes you need to store. The BS2pe has a total of 32K bytes of storage half of which is only available for data storage using READ/WRITE (and SLOT). The other half can be used for either programs or data. The BS2p/pe/px Stamp models have easy access (with the I2CIN and I2COUT statements) to I2C EEPROMs. The largest available currently is 128K bytes and you can attach 2 or 4 (depending on the manufacturer) to one pair of I/O pins (either 0/1 or 8/9 or both pairs) for either 256K or 512K bytes of EEPROM storage.

There are other solutions as well if your needs are larger.

joshuazvi
04-11-2007, 11:30 AM
thanks for everyone's suggestions.
i'm very new to this but i do think the problem is logging memory
having the bs2 write directly to a thumb drive sounds like the most attractive option to me.

how would i go about doing that, code-wise and hardware-wise
i assume i would need some sort of adapter. i have been using a serial to usb mini adapter to connect my laptop to the BOE

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--
The good life is driven by love and guided by knowledge --Bertrand Russell

Mike Green
04-11-2007, 11:35 AM
The BS2 can't write directly to a thumb drive or SD card. For logging, you might do well with Hitt Consulting's data logger (www.sddatalogger.com/ (http://www.sddatalogger.com/)). It's cheap, works well, takes little power, and interfaces easily to a BS2. Other alternatives include the USBwiz or uALFAT devices from GHI Electronics (www.ghielectronics.com/ (http://www.ghielectronics.com/)) or the VDIP or VDRIVE devices from Vinculum (www.vinculum.com (http://www.vinculum.com)).

Chris Savage
04-11-2007, 12:08 PM
When I mentioned the thumb drive I was thinking of the Vinculum, or more appropriately the VDIP1 Evaluation module although even with it the setup won’t be completely pain free. There simply isn’t that much information yet since these modules are new, but properly connected you could log data to the thumb drive and then plug it into your computer and read the data. Examples will be somewhat rare at this time, so be prepared to do some experimentation. We will attempt to help where possible.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support

skylight
04-11-2007, 04:15 PM
How about interfacing·2x·one of 16 sequencer chips to the BS2 have that address the binary input of the sequencer to shift the output to supply each sensor in turn· have the data processed by the BS2 and output this sequence of data·to Excel using PLX-DAQ. you could connect 32 sensors this way to the serial input pin as only one sensor will be active at any time, use diodes to stop any backfeeds.

Bill Chennault
04-11-2007, 09:19 PM
joshuazvi (http://forums.parallax.com/member.php?u=46918)--


·Mike Green said . . .
you might do well with Hitt Consulting's data logger (www.sddatalogger.com/ (http://www.sddatalogger.com/)

I have one with a 32Mb SD card and it IS easy to interface. I know this because even I·did it . . . several months ago, prior to the time I achieved true newbie status.

--Bill

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.

joshuazvi
04-12-2007, 12:23 AM
ease will prob be the name of the game for me (right up there with cost http://forums.parallax.com/images/smilies/smile.gif )
i think i'll try the hitt data logger.
thanks to all for your help. i'll post again when i get it.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--
The good life is driven by love and guided by knowledge --Bertrand Russell

Bean
04-12-2007, 12:44 AM
joshuazvi,
· Yep, The SD Data logger is by far the easiest solution.
· I'll even help you on the forums.
· You can order one at http://www.hittconsulting.com/products/sddatalogger/

Bean.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Educate your children to self-control, to the habit of holding passion and prejudice and evil tendencies subject to an upright and reasoning will, and you have done much to abolish misery from their future and crimes from society (http://www.quotationspage.com/quote/29139.html)"

Benjamin Franklin
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com (http://www.hittconsulting.com)
·

Bill Chennault
04-12-2007, 02:14 AM
Bean--

Is there a utility you sent with the Data Logger and I promptly ignored that will format the SD card?

--Bill

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.

RonM
04-12-2007, 08:31 PM
Look into whether or not you would be eligible to get free samples from the memory manufacturers. I am because of where I work. It doesn' hurt to see if you are. Microchip.com, Maxim-ic.com, etc...

I receive samples from both Maxim (was Dallas) and Microchip in less than 4 days.

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=80 (http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=80)

Obviously you need to read each mfgs requirements for getting free samples and not break their rules.
·