Posted: Mon Aug 30, 2004 4:49 pm Post subject: Storing sampled values in ram
Hey
I want to store lots of sampled values (sampled with with ad-converter on timer-interrupt). What would be the easiest way to save all values into the ram memory?
One way would be to simply declare lots of variables and store each sampled value in different variable's (dim x as word). But that doesn't look lika a good idea. To store the values as string wouldn't work very well either?!
What would you suggest? There is no such thing as a "vector" in Bascom AVR?
Joined: 14 Jul 2004 Posts: 138 Location: Australia
Posted: Tue Aug 31, 2004 2:09 am Post subject:
You could use an array, eg to create an array of 10 samples dim sampled_data(10) as word.
To access the array you use an index from 1 to 10, sampled_data(sampled_data_index) = ad-converter or sample = sampled_data(sampled_data_index).
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 You cannot attach files in this forum You cannot download files in this forum