-1
\$\begingroup\$

This is a question that happened to arise in my mind while experimenting on hardware.I was working on pic18f26j50 which falls under the advanced 8 bit controller family from microchip. They provide 12 bit resolution.

There i was checking the ADC results of certain voltage ranges from 0 - 3.3v.Then i had to go for more precision in adc output/result in terms of milli volt range.

For that purpose i was not getting any desirable or sensible results,then i changed the adc configuration registers and did trial and error method with ADC clock and TAD(Acquisition time) and finally got the improvement in adc output.

What is the relation b/w these two and how should it be used?

With regards

rookie91

\$\endgroup\$
  • 1
    \$\begingroup\$ "Played with" is not an adequate description of what you were doing. Without specific details about what worked and what didn't, this question is impossible to answer. \$\endgroup\$ – Dave Tweed Nov 21 '14 at 13:26
  • \$\begingroup\$ Thank you.i have edited the language and attitude problem. \$\endgroup\$ – Rookie91 Nov 21 '14 at 13:45
5
\$\begingroup\$

Timing for a typical ADC in a microcontroller, when you need accurate results, can be a fine balancing act.

There are two basic properties to consider - the sample, or acquisition, time, and the conversion time.

Crudely put, an ADC can be seen as a capacitor which gets switched either to be charged from the analog input pin, or have its voltage read by the sampling system. This is known as Sample And Hold.

During the sample time the capacitor is connected to the analog input pin. During this time it charges up to the level of the incoming voltage. That charging up isn't instantaneous, but is still very fast. You have to ensure that the capacitor is connected long enough for the voltage across the capacitor to match, as closely as possible, the incoming voltage.

Once you have captured that voltage it's time to convert it into a digital value. The most common way (and the way the PIC18 uses) is a Successive Approximation ADC. That takes, over a number of clock periods, an ever more high resolution look at the voltage - typically one clock per bit of output data, so 12 clock cycles for a 12-bit ADC.

Each of the 12 bits of sample take a certain amount of time to calculate, so you have to go slow enough for that conversion to complete properly. But, at the same time, the capacitor is discharging. Go too slow, and your sample will lose accuracy. So you have to make sure that your timing is fast enough to get good accurate results, but not so fast the ADC can't sample the values properly.

\$\endgroup\$
4
\$\begingroup\$

A successive-approximation ADC requires "time" to produce the most accurate result. This is because the MSB (most significant bit) is computed first and then the next bit etc., until the final bit is computed and this necessitates that the analogue signal is "held" constant throughout the process.

This is usually done with a sample and hold circuit. This takes a "snapshot" of the input signal and stores it on the plates of a capacitor so that the successive-approximation process is then dealing with a rock-steady signal.

Acquisition time is sometimes referred to as "sample and hold" time because the type of circuit that "acquires" a steady snapshot of the circuit is called a sample and hold circuit. It uses a capacitor (at the heart of it) to "hold" the signal voltage constant and this capacitor connects to the input signal via what can be simply described as an analogue switch. But, it does take finite time to charge the capacitor to the signal voltage and, it's important (usually) that the signal impedance is low so that sufficient current can be taken to charge the capacitor as quickly as possible.

This is why (for instance) you see in the data sheet of a PIC that they recommend that the signal impedance is less than a few kohms. Without sufficient time, the cap won't charge up properly and there will be a measurement error. This also applies to multiplexers in front of an ADC - sufficient time has to be given (once the multiplexer has initially switched) for the sample capacitor to acquire an accurate representative voltage of the input.

Regarding the clock used on an ADC, this is usually regarded as the timing mechanism for extracting the computed analogue value in the successive-approximation register and is largely unrelated to the acquisition of the analogue signal.

For more info try this document by Microchip

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.