My readings from an analog sensor go from 724 to 3604. These valid readings measure angle of 0 - 90 degrees. My initial code is the following:
I want to display increments of 0.1 but the problem is that it works fine upto the reading of - 6552 (in Dummy variable) as readings after it goes beyond the 16 bit limit.Code:If Value<724 then Value=0 : Dummy=0 : Goto Jump4 : Endif Value=Value-724 Jump4: Dummy=Value*9 Angle=Dummy/288 Temp=(Dummy*10)/288 Angle2=Temp DIG 0
So as a resultstarts overflowing and results after the decimal digit stored in Angle2 start getting messed up. Anyone has any idea on how to deal with this situation please. ThanksCode:Temp=(Dummy*10)/288




Bookmarks