3208 ADC help

Okay, I am trying to use the 3208 ADC for two reasons. Better resolution (12 bit) and to increase analog inputs. I have the SPI part working fine and am communicating with the ACD fine. The problem is I am not getting the results I think I should be. Attached is a schematic of the VERY simple voltage divider. The voltage readings (4.7 on arduino and 2.2 in between the resistors) are actual measurements with a digital multimeter.

The sketch is designed to display the The analog pin number, current reading, min and max for each analog pin of the ADC. The up/down buttons cycle through the pins and the right button clears the min/max values for the currently displayed pin.

With the voltages as shown on the schematic, I am reading 875 - 895. using the following calculation I get 1.02 Volts:

Volts = 885 * (4.7 / 4096)

As I said, the meter shows 2.2 Volts

/* 3208 read test */

#include<SPI.h>
#include<LiquidCrystal.h>

int lcdpin = 9;
int adcpin = 2;
int anapin = 0;
int minmax[16];
LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);

void setup() {
   lcd.begin(16, 2);
   //analogReference(EXTERNAL);
   SPI.begin();
   Serial.begin(9600);
   
   pinMode(adcpin, OUTPUT);
   digitalWrite(adcpin, HIGH);
   
   /*for (x = 0; x < 8; x++){
     minmax[i] = 4095;
   }
   for (x = 8; x < 16; x++({
     minmax[i] = 0;
   }
   */
}

void loop() {
  int analog;
  int anacur;
  int butpin = analogRead(0);
  
  if ((butpin < 150) && (butpin >130)){
    uppin();
  }
  
  if ((butpin <335) && (butpin >315)){
    downpin();
  }  
  
  if ((butpin < 751) && (butpin >721)){
    minmax[anapin] = 0;
    minmax[anapin + 8 ] = 0;
  }  
  
  for(int i = 0; i < 8;i ++){
    analog = adcpinread(i); 
    
    if(i == anapin){anacur = analog;}
    
    if ((minmax[i] == 0) & (minmax[i + 8] == 0)){
      minmax[i] = analog;
      minmax[i + 8] = analog;
    }
    else{
      if (minmax[i] < analog){
        minmax[i] = analog;
      }
      if (minmax[i + 8] > analog){
        minmax[i + 8] = analog;
      }
    }
  }  
    
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Pin ");
  lcd.print(anapin);
  lcd.print(" = ");
  lcd.print(anacur);
  lcd.setCursor(0,1);
  lcd.print("Mi:");
  lcd.print(minmax[anapin]);
  lcd.print(" Ma:");
  lcd.print(minmax[anapin + 8]);
  
  delay(500);
  
}


int adcpinread(int channel)
{
  int adcvalue = 0;
  
  byte transbyte = 6;
  byte returnbyte;
  
  digitalWrite(adcpin, LOW); // Turn on device "adcpin"
  
  //  Set the first byte to transfer, 
  // with with a start bit and a 1 for single ended
  // (not differentail) and the MSB of the channel number
  if (channel >3) {
    transbyte = 7;
  }

  SPI.transfer(transbyte);
  
  // Set the next transfer byte with the channel number
  // minus the MSB and catch the first 4 bits of the
  // return value
  transbyte |= (channel << 6);
  returnbyte = SPI.transfer(transbyte);
  // add the first four bits of the valuse to adcvalue
  // then shift them to the first four (of 12) bits
  adcvalue = returnbyte & 15;
  adcvalue = adcvalue << 8;
  // recieve the last 8 bits and add them to adc value
  returnbyte = SPI.transfer(0x0);
  adcvalue += returnbyte;
    
  //end communication with device adcpin
  digitalWrite(adcpin, HIGH);

  return adcvalue;
  }

void uppin(void){
  if (anapin == 7)
  {
    anapin = 0;
  }
  else
  {
    anapin += 1;
  }
}

void downpin(void){
  if (anapin == 0)
  {
    anapin = 7;
  }
  else
  {
    anapin -= 1;
  }
}

Can you post a diagram of how things are wired up - a photo of a pencil sketch will be fine.

Can you post a link to the specifications for your ADC?

What reference voltage does it use?

...R

Are the readings proportional? What happens when you feed-in zero volts? What happens when you bypass the voltage divider and feed-in 4.7V?

I think I found the problem. The voltage divider was using 100K not 10K and I think that restricted the current too much. Here is a link to the 3208 speck sheet. From this, how do I determine minimum required current?

I don't have the patience to read all of the datasheet - there is a lot of it.

The Arduino ADC is designed for an input impedance of 10k ohms or less. That might be a good guide for your device but I can't see an input impedance number on the datasheet. Maybe it can be derived from other data, but that is probably beyond me.

It looks like you need to provide an external voltage reference. Something like a FAN431 perhaps?

...R