AnsweredAssumed Answered

ADuC7020 ADC error

Question asked by Shin on Mar 22, 2011
Latest reply on Mar 22, 2011 by MMA

K-20110322-451386.png

Clipboard.jpg

 

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.

Outcomes