I am using an remote XBee S1 Digimesh to take ADC readings every 10 seconds, then send it to a sleep coordinator which then logs the data
( Wake Time = 0x7D0 = 2000ms
Sleep Time = 0x320 = 800 * 10ms = 8000ms
Wake Host = 0x64 = 100ms )
Every 10 seconds the XBee would print out the ADC value and timestamp, then go back to sleep and repeat. I left the XBee to log data over night and started a separate stopwatch to see the accuracy of the XBee clock.
When I returned to see the data, the timestamp of the XBee was 2 minutes slower than the external stop watch after 18 hours of data logging.
2 minute difference for every 18 hours of data logging reduces down to .11s difference for every 1 minute of data logging.
Iām trying to log data for several weeks at a time so this delay will cause a huge error.
Where is this delay coming from: The XBee or the microntroller?
How can I compensate for this delay?
Will this delay be reduced if I take a sample every hour vs every 10 seconds?
Does the Wake Host value have anything to do with the delay?