The Dual Sample and Hold is primarily designed to support accurate measurement of electrical power in AC/DC converters. Sampling of both current and voltage signal simultaneously will provide no delay in the measurement sequence in order to increase the measurement precision. This feature can be turned on via clearing of bit-8 through bit-10 in ADCCTRL register. It is worth noting that this mechanism can not hold more than a single voltage at a time.
The operation and configuration of Dual sample and hold is as follows:
- Dual sample and hold provides simultaneous sampling of two ADC inputs. This is simply done by sampling and holding one channel exactly at the time a second channel is sampled for conversion and converting the sample and hold channel at a later event in the current measurement sequence.
- Channels 2, 1 and 0 are the ONLY channels with sample and hold capability. These channels can be sampled simultaneously with certain other “converting channels”.
- Only One “Dual sample and hold channel” can be selected per ADC sequence. Selection of this single channel is controlled by bypass firmware controlled bits and shown in Table 8-3. In other words only one of the channels (0, 1 and 2) can be held for upcoming “Dual Sample Measurement”.
Table 8-3 Selection of “Dual Sample and Hold” ChannelBYPASS_EN[2] | BYPASS_EN[1] | BYPASS_EN[0] | BYPASS_EN[2:0] value in hex | Selected Dual Sample/Hold Channel |
---|
1 | 1 | 0 | 0x6 | Channel 0 |
1 | 0 | 1 | 0x5 | Channel 1 |
0 | 1 | 1 | 0x3 | Channel 2 |
- From this table, it can be seen that the location of the “moving zero” determines the number of selected channel. Since only one channel at a time can be selected, the only valid values for BYPASS_EN[2:0] are 6, 5 and 3.
- The “Dual Sampled Channel” must be placed in the sequence anywhere after the “converting channel”.
- Simultaneous sampling of the “Converted channel” with the “sample and hold channel” is determined by setting the bits SEQ0_SH, SEQ2_SH and SEQ04_SH in ADCSEQSEL registers. For example if SEQ4_SH is set, then one of the channels (0, 1 or 2) will be sampled together with channel 4 sampling time.
- Only channels CH0, CH2 and CH4 can be selected as “Converting channels” in UCD3138. Therefore setting of SEQx_SH bits on any channel other than CH-0, CH-2 and CH-4 is not effective.