12bit ADC accuracy

I'm trying to get a 12bit (13 bit if you include the sign bit) ADC working accurately. Currently, if I connect the Vref, Vdd, and In+ pins I don't get a returned value of 4095. More often than not it returns about 3980. Shouldn't I be getting exactly 4095? The In- and Vss pins are also connected to the same ground. It doesn't matter what reference voltage I use; I've tried using the 3.3V and 5V rails from the arduino for Vref, Vdd, and In+ as well as an external voltage reference chip which provides 4.096V (part number ISL21009). I specifically bought a 12bit ADC so I could get 1mV accuracy with a reference voltage of 4.096.

Please help :-/

It could be you're not using a "rail-to-rail input" ADC. Even though it's a bipolar ADC that doesn't mean the inputs are allowed to be at the rails.

Sooo...what's the part number of your ADC?

-- Check out our new shield: http://www.ruggedcircuits.com/html/gadget_shield.html

The part number of the ADC is MCP3301.

Any chance you're clocking it at less than 85 kHz?

See Section 6.2.1 of the datasheet.

-- Check out our new shield: http://www.ruggedcircuits.com/html/gadget_shield.html

I completely overlooked that section. Yes I am clocking it at much less than 85kHz. Thanks for the help! I'll try it again with a higher clock speed.