Bits 12 and 13 of the timer word contain the time base in binary code. The time base defines the interval at which the time value is decremented by one unit. The smallest time base is 10 ms; the largest is 10 s.
Time Base | Binary Code for the Time Base |
10 ms | 00 |
100 ms | 01 |
1 s | 10 |
10 s | 11 |
Because time values are saved at only one time interval, values that are not exact multiples of a time interval are truncated. Values with a resolution too high for the required range are rounded down to within the required range but not to the desired resolution. The following table shows the possible resolutions and the corresponding ranges.
Resolution | Time Base |
0.01 seconds | 10MS to 9S_990MS |
0.1 seconds | 100MS to 1M_39S_900MS |
1 second | 1S to 16M_39S |
10 seconds | 10S to 2HR_46M_30S |
0 comments:
Post a Comment