adc reading

louislouis

New Member
Hello,
I have a little trouble with ADC math on 08M2.
I hooked up a linear Hall sensor on C.4 and the value is red with READADC10 4,W0

The reading is between 950 to 50. The reading value if i put closer the magnetic field decrease from 950 to 50 on W0

Thats OK, but I want to change the reading value from 50 to 950.
How to do that? Thanks.
 

hippy

Ex-Staff (retired)
One possible way would be ...

w0 = w0 Max 950 Min 50 * $FFFF + 950 + 50

The $FFFF acts as if -1
 
Top