Hyperbolic ADC output.

I am trying to set up the ADC, I have a potentiometer on a voltage divider giving me a manually adjustable voltage between 3 and 0V. I noticed that the ADC "analogRead(sensorPin)" returns a low, slowly increasing value for most of the voltage range then a sharp rise for the last few % resembling a hyperbolic curve. There are only 4 increments between 100 and 255. This cant be right. how can I get a more linear output. below are the experimental pin voltages and ADC outputs.

2.71 0 2.6 0 2.5 0 2.4 0 2.3 0 2.2 1 2.1 1 2 1 1.9 1 1.8 1 1.7 1 1.6 1 1.5 1 1.4 1 1.3 1 1.2 1 1.1 2 1 2 0.9 2 0.8 2 0.7 3 0.6 3 0.5 4 0.4 5 0.3 7 0.2 11 0.1 22 0.09 23 0.08 27 0.07 33 0.06 38 0.05 45 0.04 62 0.03 83 0.02 125 0.01 250 0 255

[/table]

Make sure you are using a LINEAR pot, not an AUDIO pot.

Connect one end of the pot to Ground.

Connect the other end of the pot to +Vcc.

Connect the wiper of the pot to your analog input.

Ok, I tried that but it didn't change anything. the first column of data below is ADC pin voltage. It doesn't matter how that voltage is achieved. the ADC conversion is the same. I'm pretty sure its a problem within the chip. software perhaps?

So, I worked it out. Unsurprisingly it was my own fault. I was converting it to a frequency. I think i should go get some sleep. Tanks for your time guys.