Oricom Technologies
www.oricomtech.com

Equivalent-Time Sampling on a PIC
Return to:
Projects page.

The following figures illustrate standard waveform sampling and equivalent-time sampling on a PIC 16C76, running off a 20 Mhz crystal. A sinewave of 120 Khz is being applied to A/D channel RA0 via an opamp circuit, which is followed by a threshold-comparator feeding to digital channel RA2, used for triggering as described on the preceding page.

The first figure below shows results with standard sampling at the maximum A/D rate - 50 Khz, or 20 usec/sample. The waveform captured illustrates the classical "cat's eye" pattern, indicative of extreme aliasing. In other words, the signal here [ie, 120 khz] is being grossly undersampled [ie, at a 50 khz rate], and the result is completely unintelligible.

The next figure below shows the result for the same 120 Khz input signal, but with the PIC running in ETS mode, sampling at the equivalent of 1 Mhz. In this case, the signal is fully resolved and easily interpreted.

As it turns out, 120 Khz is near the practical limit for signal application to a PIC A/D channel - as determined by separate bandwidth measurements. Interestingly, it is not possible to see an aliased signal with ETS at 1 Mhz, because the gain of the A/D channel falls off at about -60 dB/decade with the -3 dB point near 120 Khz - so the signal is essentially gone by time the signal frequency gets out to 500 Khz.

All measurements shown here were made using a PIC 16C76 running off a 20 Mhz crystal. The A/D converter was being fed by an op amp circuit with 200 Khz first-order low-pass filter, but this was taken into account in the various calculations. Similar measurements using a 16F876 shows that its A/D bandwidth is equivalent to only about 60 Khz, which is clearly related to this chip having a larger sampling capacitor [120 pF] in the A/D channel than the 16C76 [51 pF].

Note - the variation in amplitude of the waveform shown below is typical when the number of samples taken during each period of the signal drops down into the range of 8 and below.

The following figure shows a 50 Khz sinewave being sampled by the 16C76 at a 1 Mhz equivalent rate. The wave shows little distortion or attenuation due to bandwidth limitations. All in all, ETS is seen to extend the useful frequency range of the PIC A/D converter by about 10X over normal sampling techniques.

The following figure shows how important it is to have a good stable trigger when using ETS mode. Here the trigger was disabled, and only disconnected bits and pieces of waveforms are seen.

<| TOP


World's Smallest TestBench is a trademark of Oricom Technologies
© Oricom Technologies, Feb 2001