By "block" do you mean the "page" feature of external eeproms?
If so, page write takes about the same time as writing a single byte. Should be somewhere between 2ms to 10ms depending on the eeprom you are using.
It seems that your block writing routine is not really accuate.
-------------------
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Hello sayzer,
i dont mean page.
When i say block it means that i'm using an area of memory for one record session and other area for a diferent record session.
For example...
Using memory address from 0 to 3000 will be used as "block" 1 or record session #1 and memory address 3500 to 6500 will be used as "block" 2 or session #2.
The user will choose ( using a button ) where it will record ( either block 1 or 2 ) and the same concept is used when reading back data.
I'm using a 16F88 pic with internal osc and a 24LC512 external eeprom.
The program works very well except the erasing rotine ( note that i'm erasing all blocks at the same time ).
With 2 blocks it erases in an acceptable time frame...but i would like to use more blocks without loosing too much time erasing them all.
ruijc, But why are you required to erase all of the data? Why not just keep a couple of pointers? 1 for number of data bytes recorded and 1 for the next data location. The reason for 2 is to verify if either is corrupted. Just update the 2 pointers when writing the data or clear them when you require a memory clear function.
Dave Purola,
N8NTA
Hello Dave,
Very interesting idea.
It makes perfect sense. It's a completly diferent logic this way.
Thanks
What i thought was:
I can reserve 4 bytes ( using 2 blocks of data...reserve more with more blocks ) of memory such as:
1 will record the starting address for first block
1 will record the ending point for the first block
1 will record the starting point of second block
1 will record the ending address of second block
This way i can have variable size of block with data![]()
These can be stored either in the external or internal eeprom ( i guess it will be safer to store them in the external one )
For reading it will lookup these bytes for it to know where to start colecting data and where to stop.
To erase just simply put these to 0 ( reminding to check for 0 before start recording ).
I think it can work this way, dont you think ?
.
ruijc, Bygolly youv'e got it....... I have used this same method for about 3 years or so using 4 24LC1025's for data storage of depth, temperature, diveplane angle, and status at 1 second intervals for about 18 hours on my TempTracker.
Dave Purola,
N8NTA
So what Dave is suggesting is like a partition table.
Instead of erasing all data, just erase or clear partition table.
If the partition table is empty, the data is not accessible or is useless.
--------------
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks