TC1796
Peripheral Units (Vol. 2 of 2)
General Purpose Timer Array (GPTA)
User’s Manual
24-48
V2.0, 2007-07
GPTA, V2.0
When using Signed compare, the result bit R
3
can be selected and interpreted, provided
that the timer period is at least 9. Here, the range of the result can be split into four sub-
ranges. Because the result is in 2s complement format, a value of 0 for R
3
is interpreted
as
After
, and a value of 1 is interpreted as
Before
. A comparison of
and
shows why this proceeding leads to correct interpretation within the
observation window.
shows the case of a period equal to a multiple of 2.
Figure 24-36 Result and Observation for a 4-bit Timer
MCA04616
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
S
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
R
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
Result in 2s Complement
After
S = 0
Before
S = 1
After
R
3
= 0
Before
R
3
= 1
After
R
3
= 0
Before
R
3
= 1
+15
+14
+13
+12
+11
+10
+9
+8
+7
+6
+5
+4
+3
+2
+1
0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
Result
in Decimal
Observation
Unsigned
Compare
Observation
Signed Compare
Using
R
3
R
1
R
2
R
3
MCA05945