(Timer) Are the latch and the timer simultaneously written to during write-in and the timer value read during read-out regardless of whether the timer is in operation or suspended? [2005/12/01]
It depends on the type of timer, as detailed below:
- Timers 1, 2, X and Y:
- The timer and latch are written to simultaneously and the timer count value is read regardless of whether the timer is in operation or suspended.
- Timer Z:
- The user can choose to have the value written only to the latch or to both the timer and the latch using the timer write control bit setting, regardless of whether the timer is in operation or suspended. During timer suspension, if a count is started after only the latch was written to, count will start at the value currently in the timer, and the latch value will be reloaded to the timer at the first underflow. Therefore, to count from the set value from the beginning, set the timer value by writing to the latch and timer simultaneously. In addition, if the timer is read, the value read-out will be the timer count value.