Potentiometer - Fine/course resolution

I need a bit more than the 10bits the ADC would give me, so I was thinking in using two ADC ports, with the first being the MSB of the reading and the second the LSB. How would I go into archieving this?

How would I go into archieving this?

With very great difficulty, if at all.
Google "oversampling"

Sp. "Coarse"

Or two pots, one for coarse, one for fine.

AWOL:
Or two pots, one for coarse, one for fine.

Yes, its the two aproach pot I am looking at, not oversampling.
In fact I may be happy to live from 8bits from each ADC to get a 16bit variable. This would save instruction cycles and prevent noise.

So, what's the problem?

AWOL:
So, what's the problem?
http://arduino.cc/en/Reference/WordCast

Good call. I believe i would still have to first convert the 10bit value from arduino into a 8bit value so I can use Wordcast to create a 16bit variable?

I would like to do this in an efficient way, most likelly acessing the 8bit value right from the atmel registers, instead of using the arduino built in fuction

I need a bit more than the 10bits the ADC would give me

The Due has 12 analog inputs, each of which can provide 12 bits of resolution (i.e. 4096 different values). By default, the resolution of the readings is set at 10 bits, for compatibility with other Arduino boards. It is possible to change the resolution of the ADC with analogReadResolution(). The Due’s analog inputs pins measure from ground to a maximum value of 3.3V. Applying more then 3.3V on the Due’s pins will damage the SAM3X chip. The analogReference() function is ignored on the Due.

Maybe I skipped the chapter . . . . :cold_sweat:: Can you explain me how to do it with two 8 bits ADC and pot's?

Why not just do two ten bit conversions and shift down two bits on each?
I don't understand why you would need to access the registers directly.

Why not just do two ten bit conversions and shift down two bits on each?

Two conversions of what?

Regards

vffgaston:

Why not just do two ten bit conversions and shift down two bits on each?

Two conversions of what?

Regards

Analogue - what did you think?

AWOL:
Why not just do two ten bit conversions and shift down two bits on each?
I don't understand why you would need to access the registers directly.

I would take (at least) 4 operations to read the ADC + 2 instructions to shift bits arround + x instructions to convert the result into a 16bit variable. By acessing the resgisters directly I would need only two instrctions to read each 8bit variable.

I am polling the micros function to make an accurate square wave generator. Anything that adds time is likelly to either miss a clock cycle at higher frequencies or add a delay

vffgaston:

I need a bit more than the 10bits the ADC would give me

The Due has 12 analog inputs, each of which can provide 12 bits of resolution (i.e. 4096 different values). By default, the resolution of the readings is set at 10 bits, for compatibility with other Arduino boards. It is possible to change the resolution of the ADC with analogReadResolution(). The Due’s analog inputs pins measure from ground to a maximum value of 3.3V. Applying more then 3.3V on the Due’s pins will damage the SAM3X chip. The analogReference() function is ignored on the Due.

Maybe I skipped the chapter . . . . :cold_sweat:: Can you explain me how to do it with two 8 bits ADC and pot's?

I Think you did. I am not using a due and I want 16bit minimun resolution.

I would take (at least) 4 operations to read the ADC + 2 instructions to shift bits arround + x instructions to convert the result into a 16bit variable. By acessing the resgisters directly I would need only two instrctions to read each 8bit variable.

And the processor is sitting for how long, spinning waiting on an end-of-conversion condition?
Your saving is insignificant.

Wait, wait . . . Where did you say you WERE NOT using a due?

On the other hand: better if you explain what hardware are you going to use to get (by means of two 8 bit ADC's) the first and second halves of a 16 bit conversion.

Regards

I mean,

On the left the signal you want to convert into 16 bit

On the right the two analog inputs (that give 8 bits each).

What in the middle?

AWOL:
And the processor is sitting for how long, spinning waiting on an end-of-conversion condition?
Your saving is insignificant.

Ill give it a try. Thanks.