Hi -
Experimenting with my F20, I have observed that the date and time keeping facilities are not especially accurate. I recognize that this is to be expected since the F20 does not include a crystal oscillator and so must rely on an internal oscillator in the F20 chip. Microcontroller internal oscillators are never as accurate as crystal or resonator oscillators.
On my particular F20, I have observed that it tends to run fast by nearly 4 minutes in a 24-hour period.
My suggestion would be to add a feature whereby the Master system could transmit a calibration value into the F20 that would scale the pace of the date and time keeping facility. Then, for any specific F20 the user could perform a timing test to determine the error rate for the F20, calculate an appropriate calibration factor, and transmit it to the F20 with a new command or as an optional parameter of the āSā command which sets the current time and date. No doubt, this would still not result in a real time clock as accurate as a crystal-controlled clock but would probably come much closer than the current system.
The only other approach that I can see for establishing fairly accurate time/date stamps for the files stored on the SD card is to set the time/date of the F20 just prior to each file open, file write, and file close operation.
Any thoughts on this or words of wisdom that could help?
Thanks,
Joe