Henrik and others thanks for your help.
Sorry yes the maximum value for $18 is actually $17 so thats puts the range covered within -100 to + 50.
That code looks really helpful, and is easily accurate enough, yes the answer is being displayed via a serial lcd device that's not a problem.
The second issue with the seperate lower formula is
As an aside it may be my formula for BD[2] & BD [3] is incorrect I suspect it should resolve to a number between 0-100% at it represents battery state of charge.Also for a second formula involving BD [2] & BD [3] I need to
(Multiply the right hand digit of 1st hex number by 128, add result to 2nd number)
I'm stuck on extracting a value for the right hand digit of the hex number?
My captured range of values for BD[2] is $21 -$34 and for BD[3] it's again $00-$7F
Ignoring the first digit of BD [2] gives a range of values that seems to work
Bookmarks