I am working on an accelerometer and gyro sensor for a weather
balloon experiment. It is for a senior design project at the
University of Alabama in Huntsville. What we are trying to do is
read accelerations and spin readings, write the data to the
microcontroller, and send the direct analog outputs to a
communications package. My questions are:
How can I write the outputs to the microcontroller memory?
(the accelerometer has a PWM signal and the gyro has an analog. I
already have a code that spits the numbers onto the computer
How much memory will the basicx hold?
(The flight will last about 2 hours. I need about two hours of
data to record.)
How will I be able to erase or write over memory that is already
(this will correspond to the pretesting memory that will take up
space once I begin testing)
--- In , "preston35757"
> [...]How much memory will the basicx hold?
> (The flight will last about 2 hours. I need about two hours of
> data to record.)
How many readings will be taken in the two hours that you mentioned?
How many bytes will each reading consume?
Once you answer these questions, you can then look at possible
solutions. If the required data size is small enough, you could
store it in RAM. That would perhaps be the easiest to do, but of
course it is volatile. Also, of the three types of on-board memory,
RAM is the most scarce.
The two other types of storage are persistent memory and EEPROM (code
memory). Of the former, there is 480 bytes available. Of the
latter, there is 32K bytes available less the amount used by your
program. You can read/write persistent memory using PersistentPeek()
and PersistentPoke(). EEPROM can be + read/written using GetEEPROM()
and PutEEPROM(). Note that both of these types of memory have a
maximum number of write cycles that cannot be exceeded. For both
types, the limit is on the order of 10^5 to 10^6 writes.
If your data will consume more than the available memory of either of
these two types, or you need more write cycles than it will tolerate,
you'll need to look at other data logging methods. Essentially, you
need to send data to an external device to be stored. It could be
sent by serial link (hard wired or radio), Internet, or you could
look at adding a CompactFlash or IDE hard drive to the system.