Maker Pro
Maker Pro

Counter not decrementing to exact value to 0x00000

J

JSreeniv

Jan 1, 1970
0
Hi all,

I am using Decade counter of 16 - bit, and the value decades from
0x3FFFF to 0x00000

After calculating the number of counts occured on input pulse with
setting time base, i am trying to show the decrement of each step to
the value based on count.

Let say if i get count 10 and i am showing each count value: (0x3FFFF/
A = 0x06666)
9nth: 0x39999
8th: 0x33333
7nth:0x2CCCD
6th:0x26667
5th:0x20001
4th:0x1999B
3rd:0x13335
2nd:0x0CCCF
1st:0x06669
0th:0x00003

After these each count calculation my counter not reaching exact value
to 0x00000, it still have some value(0x00003).
May i know the reason and how to solve this to reach to 0x00000.

Please suggest me some techniques and steps.

Sreeni
 
R

Rich Webb

Jan 1, 1970
0
Hi all,

I am using Decade counter of 16 - bit, and the value decades from
0x3FFFF to 0x00000

After calculating the number of counts occured on input pulse with
setting time base, i am trying to show the decrement of each step to
the value based on count.

Let say if i get count 10 and i am showing each count value: (0x3FFFF/
A = 0x06666)
9nth: 0x39999
8th: 0x33333
7nth:0x2CCCD
6th:0x26667
5th:0x20001
4th:0x1999B
3rd:0x13335
2nd:0x0CCCF
1st:0x06669
0th:0x00003

After these each count calculation my counter not reaching exact value
to 0x00000, it still have some value(0x00003).
May i know the reason and how to solve this to reach to 0x00000.

Please suggest me some techniques and steps.

1) 0x3FFF = 16383
2) 16383 / 10 = 1638 with a remainder of 3
3) Profit!
 
R

Rich Grise

Jan 1, 1970
0
I am using Decade counter of 16 - bit, and the value decades from
0x3FFFF to 0x00000

"Decade" means base 10. This is not a decade counter. And decade is
not a verb.

Is this homework? What are you trying to acomplish?

Thanks,
RIch
 
Top