since ive only got picbasic pro and not pbpl it means i cant use LONG. this means i can only get up to 65536, whereeas the number of kwh is gonna be about 200,000 over the 20 years... any ideas on this one?
I don't have long either, this is my turn around:
Code:
AA var word
BB var word
CC var word
DD var word
Long:
AA=0
While AA<>BB
AA=AA+1
CC=CC+1
If CC=0 then DD=DD+1
wend
Return
You place your reading in variable BB and gosub long, here your reading will be accumulated in variable CC and DD, that you can save at your discretion.
Reading back the long is simple just (DD x 65536)+CC
Al.
All progress began with an idea
Bookmarks