hi
maybe you could have two word sized varables say Cnt_a and Cnt_b
when Cnt_a hits 65536 increment Cnt_b ,clear Cnt_a and start counting again
Cnt_b is the number of times you reached 65K add Cnt_a gives you the Total
count.
hi
maybe you could have two word sized varables say Cnt_a and Cnt_b
when Cnt_a hits 65536 increment Cnt_b ,clear Cnt_a and start counting again
Cnt_b is the number of times you reached 65K add Cnt_a gives you the Total
count.
Hi,
as Tony says, word Cnt-A wrap-around to count up Cnt-B once.
A simple method as example;
IF newcount then Flag = 0 'Flag to prevent first count setting B
WHILE countup 'As long as counting is required
WHILE Cnt-A > 0 AND Flag = 1 'Counting in progress
Cnt-A = Cnt-A + 1 ' Count operation for A
Flag = 1
WEND
Cnt-B = Cnt-B + 1
WEND
in eeprom simply:
WRITE 0, Cnt-A.byte1
WRITE 1, Cnt-A.byte0
WRITE 2, Cnt-B.byte1
WRITE 3, Cnt-B.byte0
Hope it helps,
Rob
Bookmarks