I am developing a data logger in which I am using 8 MB of flash memory to store the sensor data with date and time. I am using RF interface to transfer that data to PC. I am planning to have PC software that can request sensor data from start date to end date criteria. so when PC request for some interval of data from Data logger how should I search the specific date in the flash memory ? I am using pic microcontroller. It would be very slow to go and search without any algorithm.
Take the 2-minute tour
×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.
|
If identical-sized records are stored sequentially with a constant time interval, you should not need to search at all; you should be able to compute exactly where a particular timestamp can be found after looking at the timestamp of the first record. If the record size and/or time interval varies, but they are stored sequentially, then you would use a binary search algorithm to find a particular timestamp. |
|||
|