I learned from research that crystals (HC49/U style casing) experience drift which causes timing to be inaccurate in the long haul.
My project is a laser tag system in which one microcontroller (AT89C4051) in the target continuously searches for specific laser patterns from a gun which also uses the same microcontroller. Both use the exact same crystal (22.1184 Mhz) from the exact same manufacturer and the circuit board traces on both boards from microcontroller to crystal leads are the same. The capacitors between the crystal leads and ground are all 33 pF NPO (5%) from the same manufacturer.
Now if I write the software perfectly, start everything at the same time and run everything for about a minute or so, everything will fall in sync. I'm also running another unit that would cause everything to try to be in sync periodically (by the master sending sync bytes).
But what about drift?
Let's say I power each unit with a fully charged 6800 mAh battery for 10 hours. (Ok, I understand a real laser tag game would not last 10 hours, but I'm going for worst cases here). Then one battery decides to die 1 hour later and I replace it.
Since the crystal is almost 24 Mhz, the microprocessor would execute instructions about one every 540 nS. So if I had the micro running for say 10 hours, would instructions still run at 540 nS at that point? or would the time alter on every minute due to drift?
Like, for minute one, would each instruction take 540 nS to execute then minute two 538 nS then minute three 541 nS?
I'm just trying to understand the best crystal parameters regarding drift to choose for my application so the data doesn't get out of sync (just because of possible drift resulting from continuous operation).
I mean I seen specs like frequency stability and tolerance measured in ppm when I looked at crystals on Digikey, but what are the best numbers to aim for and how do I convert those numbers to the amount of time I can have guaranteed instruction stability before major drift affects the operation of the synchronization?