I have one problem:
I achieve my best performance in low corrents doing this code:
ADCIN 0, ADC_corrente
pause 10
x = ADC_corrente * 2360
res = DIV32 10000
if res > 99 then
unid_corrente = res DIG 0
dec_corrente = res / 10
else
unid_corrente = res DIG 1
dec_corrente = res DIG 0
endif
but when ADC value * 2360 is biggest then 65535 i lost my upper 16bits, because the operator * returns the lower 16 bits of a 32 bits result.
What i have to do to doesnīt lost bits?
I know ** returns the upper 16 bits but there are any way to have the result in one variable?
Bookmarks