Shame on me
The (almost) correct way is to multiply the input by 3.921569........
To keep accuracy multiply that by 256 to get 1003.921569
Closest integer is 1004
Calculate as follow
1) Operand A = x (unsigned 8 bit)
2) Operand B = 1004 (unsigned 16 bit)
3) Result = Op A * Op B (unsigned 24 bit)
4) Drop lowest byte of 24 bit result
Op A = x = 178 = (B2)h
Op B = 1004 = (03EC)h
Result = 178712 = (02 BA 18)h
Drop last byte result in (02 BA)h = 698 = 6.98
Evaluation in Excel shows max error of 0.0098 on final result (xx.xx)!!
Is this accurate enough??