|
XPRESS has 2 types of timers available to it: second timers and minute timers. These timers increment in sync with the realtime clock of the HCS-II.
The timers increment each time their corresponding realtime clock value changes. Thus, if you start a minute timer 20 seconds into a realtime minute, the timer will increment to one (ie one minute) after only 40 seconds when the RTC minute register changes. Thus a minute timer can have a maximum error of 59 seconds!
This is not a big concern, however. Second timers can count up to 32,768 (so can minute timers) since they each have 16-bit registers. (You might think 65,536 but XPRESS limits integers to 32,768) Thus, if you need a highly accurate minute timer, use a second timer which will have a max error of one second. Need to time 5 minutes? Use a second timer for 300 seconds and you will get a MUCH better result.
Minute timers were intended to be used for long duration timers (hours) where a one minute error is not critical.
|