EEPROM Storage
Archiver
Posts: 46,084
Hi,
How can I store data to the EEPROM in a looping routine? I am using
the ADC0838 routine. It goes through each channel. I want it to go
through each channel on the ADC0838, store the data all in different
places in the EEPROM. Is this possible? How?
Thanks,
Corey
How can I store data to the EEPROM in a looping routine? I am using
the ADC0838 routine. It goes through each channel. I want it to go
through each channel on the ADC0838, store the data all in different
places in the EEPROM. Is this possible? How?
Thanks,
Corey
Comments
>
>How can I store data to the EEPROM in a looping routine? I am using
>the ADC0838 routine. It goes through each channel. I want it to go
>through each channel on the ADC0838, store the data all in different
>places in the EEPROM. Is this possible? How?
>
>Thanks,
>Corey
>
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
result var byte ' from ADC0838
channel var nib ' 0 to 7
address var word ' points to eeprom location
loop:
sleep 3600 ' sleep for one hour
for channel=0 to 7 ' get data from 8 channels
gosub adc0838 ' not shown, returns byte result
write address+i,result
next
address=address+8
if address<1024 then loop ' back for more data
memoryfull:
end
The above assumes you are using 1/2 of the BS2 memory to store your data.
-- best regards
Thomas Tracy Allen PhD
electronically monitored ecosystems
http://www.emesystems.com
mailto:tracy@e...
What is the sleep command for?
TIA,
Ray McArthur
> loop:
> sleep 3600 ' sleep for one hour
> for channel=0 to 7 ' get data from 8 channels
> gosub adc0838 ' not shown, returns byte result
> write address+i,result
> next
> address=address+8
> if address<1024 then loop ' back for more data
> memoryfull:
>
>What is the sleep command for?
>
>TIA,
>Ray McArthur
>
>> loop:
>> sleep 3600 ' sleep for one hour
>> for channel=0 to 7 ' get data from 8 channels
>> gosub adc0838 ' not shown, returns byte result
>> write address+i,result
>> next
>> address=address+8
>> if address<1024 then loop ' back for more data
> > memoryfull:
Just a "typical" or example data logger. Take a reading once an
hour, sleep in between. Without the SLEEP or some other delay or
timing mechanism, the memory would fill up in no time! The SLEEP has
nothing to do with the original question.
-- Tracy