Jyothi@Pic
New Member
Hi,
Below is the code for calculation this code is in PICCLITE compiler
unsigned int AC_MIN=100,adc_value=108,ADC_MIN=62,AC_MAX=240,ADC_MAX=153,ADC_OUT;
ADC_OUT=AC_MIN+((adc_value-ADC_MIN)*((AC_MAX-AC_MIN)/(ADC_MAX-ADC_MIN)));
AS PER MANUAL CALCULATION I HAVE TO GET CC AS OUTPUT IN HEX
AND 204(DECIMAL)
BUT I AM GETTING A8(HEX) 168(DECIMAL)
CAN ANYBODY TELL HOW TO GET THE CORRECT MANUALLY CALCULATED VALUE
and also tell me how variables declared as float works
please for this its urgent
I am new to this
ITS URGENT
Below is the code for calculation this code is in PICCLITE compiler
unsigned int AC_MIN=100,adc_value=108,ADC_MIN=62,AC_MAX=240,ADC_MAX=153,ADC_OUT;
ADC_OUT=AC_MIN+((adc_value-ADC_MIN)*((AC_MAX-AC_MIN)/(ADC_MAX-ADC_MIN)));
AS PER MANUAL CALCULATION I HAVE TO GET CC AS OUTPUT IN HEX
AND 204(DECIMAL)
BUT I AM GETTING A8(HEX) 168(DECIMAL)
CAN ANYBODY TELL HOW TO GET THE CORRECT MANUALLY CALCULATED VALUE
and also tell me how variables declared as float works
please for this its urgent
I am new to this
ITS URGENT