Storing variables
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Storing variables

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
Richard
Guest





Posted: Tue Dec 28, 2004 5:51 pm    Post subject: Storing variables Reply with quote

Is there an easy way to save 12 bit values in eeprom as effeciently as
possible?
Basically, I have to store tons of data.

If I could afford to loose the resolution,is there a way to convert 12 bit
values into 8 bits, kind of like if I had an 8 bit adc to begin with?







----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Back to top
Thomas Carley
Guest





Posted: Tue Dec 28, 2004 6:40 pm    Post subject: Re: Storing variables Reply with quote

Sure. Just right shift by 4. That will throw out the 4 least significant
digits. If you are measuring signals that are small compared to the
reference then you could throw away the 4 most significant bits by casting
the value to a uint8_t (unsigned char).


"Richard" <rwskinner ATawesomenet Dot net> wrote in message
news:41d157b4_4@127.0.0.1...
Quote:
Is there an easy way to save 12 bit values in eeprom as effeciently as
possible?
Basically, I have to store tons of data.

If I could afford to loose the resolution,is there a way to convert 12 bit
values into 8 bits, kind of like if I had an 8 bit adc to begin with?







----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000
Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Back to top
peterk
Guest





Posted: Tue Dec 28, 2004 7:14 pm    Post subject: Re: Storing variables Reply with quote

You might consider some compression if the data is not random. If it is
slowly changing then you might consider just recording the change or
delta. Depending on the shape of the data you could use a lot less bits
for the deltas.

Peter
Back to top
mc
Guest





Posted: Tue Dec 28, 2004 9:56 pm    Post subject: Re: Storing variables Reply with quote

"Richard" <rwskinner ATawesomenet Dot net> wrote in message
news:41d157b4_4@127.0.0.1...
Quote:
Is there an easy way to save 12 bit values in eeprom as effeciently as
possible?
Basically, I have to store tons of data.

It should be hard. Take two 12-bit values and store in 3 8-bit bytes. What
kind of CPU? You might do something like this:

AAAAaaaaaaaa BBBBbbbbbbbb => aaaaaaaa AAAABBBB bbbbbbbb

or other arrangements.

Quote:

If I could afford to loose the resolution,is there a way to convert 12 bit
values into 8 bits, kind of like if I had an 8 bit adc to begin with?

Shift right 4 bits?
Back to top
Nicholas O. Lindan
Guest





Posted: Wed Dec 29, 2004 12:12 am    Post subject: Re: Storing variables Reply with quote

"peterk" <peterk.vt80@gmail.com> wrote

Quote:
You might consider some compression if the data is not random.

And if it is random, why then you can ignore it completely:
after all it's only noise, so why bother storing it. (ob smiley)

Funny how the most densely compacted information looks just like
complete gibberish.

--
Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer: Electronics; Informatics; Photonics.
Remove spaces etc. to reply: n o lindan at net com dot com
psst.. want to buy an f-stop timer? nolindan.com/da/fstop/
Back to top
Richard
Guest





Posted: Wed Dec 29, 2004 7:58 am    Post subject: Re: Storing variables Reply with quote

Quote:

AAAAaaaaaaaa BBBBbbbbbbbb => aaaaaaaa AAAABBBB bbbbbbbb

or other arrangements.

This is the preferred method which I already thought about doing. It's a
datalogger project which has to store 8 channels of a 12 bit adc once per
second for 24 hours.

I take it some large battery backed SRam would be the best way to store it
since flash would burn out pretty quick?
I would store the actual bit values then do the conversion to engineering
units on the pc when downloaded.

Haven't picked a Pic yet. Thinking about a Pic Micro or an Atmega.

Richard




----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Back to top
Noel Henson
Guest





Posted: Wed Dec 29, 2004 7:58 am    Post subject: Re: Storing variables Reply with quote

"Richard" <rwskinner ATawesomenet Dot net> wrote:

Quote:
Is there an easy way to save 12 bit values in eeprom as effeciently as
possible?
Basically, I have to store tons of data.

If I could afford to loose the resolution,is there a way to convert 12 bit
values into 8 bits, kind of like if I had an 8 bit adc to begin with?







----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World!
100,000 Newsgroups ---= East/West-Coast Server Farms - Total Privacy via
Encryption =---

As other suggestions, '...depending upon the actual data being stored...'

If it is analog data, you may be able to get by with storing deltas in lieu
of the actual values. 12-bit values could be stored as 8-bit deltas. You
may want to include a full 12-bits in there every once in a while to keep
things sane.

You could also map 12-bit the samples into an 8-bit range in a non-linear
way. This would maintain proper resolution when the signal level is small
but still provide the capability of large-signal output.

Noel
Back to top
Thad Smith
Guest





Posted: Wed Dec 29, 2004 7:58 am    Post subject: Re: Storing variables Reply with quote

Quote:
It's a
datalogger project which has to store 8 channels of a 12 bit adc once per
second for 24 hours.

I take it some large battery backed SRam would be the best way to store it
since flash would burn out pretty quick?

If you have enough capacity for 24 hours of recording, that means that
each byte can be written once per day. At that rate, 100,000 flash
erase/write cycles will last you quite a long time. Even lowly 10k
cycle flash will last for over 20 years.

Thad
Back to top
Mike F
Guest





Posted: Wed Dec 29, 2004 7:58 am    Post subject: Re: Storing variables Reply with quote

"Thad Smith" <ThadSmith@acm.org> wrote in message
news:41d22a17$1_1@omega.dimensional.com...
Quote:
It's a
datalogger project which has to store 8 channels of a 12 bit adc once
per
second for 24 hours.

I take it some large battery backed SRam would be the best way to store
it
since flash would burn out pretty quick?

If you have enough capacity for 24 hours of recording, that means that
each byte can be written once per day. At that rate, 100,000 flash
erase/write cycles will last you quite a long time. Even lowly 10k
cycle flash will last for over 20 years.

Thad


See if this is something that would provide you with your storage ...
http://focus.ti.com/lit/ds/slus121/slus121.pdf
128K * 8 NVSRAM -- will store data for up to 10 years on it's
internal lithium cell. Digikey ( http://www.digikey.com ) has them
for about $14 each. Static CMOS ram tends to be very low
power -- it may be less than the power required to write to flash
for that matter.

mikey
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB