1.3.11.4 General Formula for Sampling Rate

The general formula for system and per-channel sampling rate is as follows:

Total Sampling Rate = Total # of Samples / Total Conversion Time of all Samples

Channel Sampling Rate =

( (Total Number of Samples for Channel) / (Total Number of all Samples) ) * (Total Sampling Rate)

The method for arriving at this formula is explained in the examples below.

Example: Equal Weight and Equal Conversion Time

All Channels have a conversion time of 2s as shown in the figure below.

Figure 1-34. Equal Weight and Equal Conversion Time
???

In this case we have 10 samples which take a total of 20s.

Thus, our total system sampling rate is: 10 / 20s = 500 kS / s.

  • Channel1 Sampling Rate: 2s / 10s = .20 * 500 kS /s = 100 kS /s
  • Channel2 Sampling Rate: 2s / 10s = .20 * 500 kS /s = 100 kS /s
  • Channel3 Sampling Rate: 2s / 10s = .20 * 500 kS /s = 100 kS /s
  • Channel4 Sampling Rate: 2s / 10s = .20 * 500 kS /s = 100 kS /s
  • Channel5 Sampling Rate: 2s / 10s = .20 * 500 kS /s = 100 kS /s

Example: Unequal Weight and Equal Conversion Time

In this example, the channels are not equally weighted in the sampling sequence,as shown in the figure below.

Figure 1-35. Unequal Weight and Equal Conversion Time
???

In this case we have 10 samples that take a total of 20s, giving us a total system sampling rate of 500 kS/s (as above). However, the individual channel sampling rates are different.

  • Channel1 Sampling Rate: 5s / 10s = .5 * 500 kS /s = 250 kS /s
  • Channel2 Sampling Rate: 1s / 10s = .1 * 500 kS /s = 50 kS /s
  • Channel3 Sampling Rate: 5s / 10s = .1 * 500 kS /s = 50 kS /s
  • Channel4 Sampling Rate: 5s / 10s = .1 * 500 kS /s = 50 kS /s
  • Channel5 Sampling Rate: 2s / 10s = .20 * 500 kS /s = 100 kS /s

Example: Unequal Weight and Unequal Conversion Time

In this example, channels have different conversion times and are not equally weighted in the sampling sequence, as shown in the figure below.

Figure 1-36. Unequal Weight and Unequal Conversion Time
???

In this case we have 12 samples in 20s, giving us a total system sampling rate of 600 kS/s.

  • Channel1 Sampling Rate: 7 / 12 = .583 * 600 kS /s = 349 kS /s
  • Channel2 Sampling Rate: 2 / 12 = .166 * 600 kS /s = 99.6 kS /s
  • Channel3 Sampling Rate: 1 / 12 = .083 * 600 kS /s = 49.8 kS /s
  • Channel4 Sampling Rate: 1 / 12 = .083 * 600 kS /s = 49.8 kS /s
  • Channel5 Sampling Rate: 1 / 12 = .083 * 600 kS /s = 49.8 kS /s

Wait States and the Analog System Controller

The Analog System Controller automatically inserts wait states to prevent collisions during processing. The wait states are inserted to ensure this condition:

Current conversion time + ASSC processing time > = previous sample’s (SMEV + SMTR) processing time. Thus, a wait state is calculated as:

(Current conversion time + ASSC processing time) – previous sample’s (SMEV + SMTR) processing time

This extra time is inserted into the sample rate calculation, thereby decreasing the total sample rate; when wait states are inserted, the calculated sample rate is only an approximation. For example:

Single channel, continuous loop:

System clock = 40 MHz

ADC clock = 10 MHz

Acquisition time = 0.2s

Resolution = 8-bit

No Flags

Tconv = tsync_read + tsample + tdistrib + tcal + tsync_write

( 25 ns ) + ( 2*100 ns ) + ( 8*100 ns) + (2*100 ns) + (2*25 ns ) = 1.25s

Add turnaround time:

1.25s + 0.25s = 1.5s

Sampling Rate = 1 / 1.5s = 666 ksps