While it is incorrect, the results are not strange at all.
The Modulus operator only returns a decimal number if you are dividing by a factor of 10 (10,100,1000).
When you // 1024, the result will be from 0 to 1023.
The numbers at 201, 202 are where the value goes over 1000, but you are displaying the lowest 3 digits.
For 3 decimals, the easiest way to do it is ...Code:W0 = A2Dvalue * 5000 W0 = DIV32 1023 DEBUG REP $00\8,13,10, "Voltage = ",DEC W0/1000,".",DEC3 W0, " A2D value = ",DEC A2Dvalue
Bookmarks