ADuC7020 ADC error

void Adc_Interrupt(void)
{
AdCnvDat[0] = (ADCDAT>>16) & 0xfff;
return;
}

float GetADC(void)
{
return (float)AdCnvDat[0];
}

void application(void)
{
while (1)
{
  if(TICK)
  {
   printf("RAW : %d\t VOLT : %4.2f\r\n",(int)GetADC(),Conv_hex_to_vot(GetADC())*2);
   TICK = 0;
  }
}
}

----------------------------------------------------------------

Input : DC Supply

R1, R2 are various

Blue line in image(in excel) is measured by multi-meter and Red line is (printed) ADC value.

I wonder why 0 value at lower 30% ~ 40%.

Sorry for my poor English.

Parents Reply Children
No Data