itmr rollover in delay loop
Philipp Rumpf
Philipp.H.Rumpf@mathe.stud.uni-erlangen.de
Wed, 24 Nov 1999 20:56:08 +0100
> >> while(((cr16+loops)-mfctl(16))>0);
> printf("0x%x 0x%x 0x%x %s\n", a, b, (b-a), (0 < (int)(b-a)) ? "y" : "n");
> b++;
Note that Frank is modifying b, and evaluating 0 < (int)(b-a), while in
the original example, the modified term was subtracted from the constant
(for one call) one, so it would have been (int)(a-b) > 0 using Frank's
variable names. This explains why Frank is still seeing "n" for a == b
while I am already seeing false.
Philipp Rumpf