UG-1262
Rev. B | Page 152 of 312
MEASURING A DC CURRENT OUTPUT
When measuring a dc current output, the ADC is powered on and set to measure the low power TIA input channel. The user has the
option to average the ADC results before reading to the digital die, or to use DMA mode to directly move the ADC results to the digital
die SRAM.
Configure the Potentiostat Loop
Configure the low power DACs to match the required sensor bias voltage of the external electrochemical in use. For example, for a
sensor that requires a 0 V bias voltage between the working electrode and reference electrode, the V
BIAS
and V
ZERO
DAC outputs must be
set to the same voltage. Likewise, LPDACDAT0 = 0x1A680 sets both VBIAS0 and VZERO0 outputs to approximately 1.1 V.
Additional guidelines are as follows:
Configure the LPDACCON0 register as required. Set LPDACCON0, Bit 5 = 0 for normal operation of the low power DAC switches.
LPTIASW0, Bits[13:12] = 11 connects the V
BIAS
/V
ZERO
voltage sources to an external capacitor for noise filtering purposes.
Configure the other low power potentiostat switches appropriately.
For LPTIA0, set LPTIASW0 = 0x302C to set the low power TIA0 switches for normal mode.
See Figure 38 for details about how these settings affect the low power potentiostat loop.
Configure the low power TIA R
LOAD
specifications via LPTIACON0, Bits[12:10]. For example,
pADI_AFE->LPTIACON0 = 0xE680; // Enable LPTIA, 1 M
Ω
Low-Pass Filter resistor,
10
Ω
RLOAD, 100 K Gain resistor
After setting the sensor bias voltage, wait the settling period of the sensor before beginning to measure its output current.
Configure ADC for DC Measurement Mode
The ADC mux has two measurement options for the low power TIA0. One is through the low-pass filter (ADCCON, Bits[5:0] = 0x21),
and the other is the bypassed low-pass filter option (ADCCON, Bits[5:0] = 0x02). Select the low-pass filter as the positive input channel
of the ADC for lowest noise. Select the LPTIA0 inverting input (ADCCON, Bits[12:8] = 0x2) as the ADC negative input channel.
Using the provided software libraries, the following function call selects LPTIA0 as the ADC input:
AfeAdcChan(MUXSELP_LPTIA0_LPF,
MUXSELN_VZERO0); // Select LPTIA0_LPF input versus VZERO0 to the ADC
To select LPTIA1 as the ADC input, use the following function call:
AfeAdcChan(MUXSELP_LPTIA1_LPF,
MUXSELN_VZERO1); // Select LPTIA1_LPF input versus VZERO1 to the ADC
For optimal performance, do not perform any read or write accesses to the analog die while the ADC is converting to minimize noise
from the die to die interface coupling onto the ADC circuits. Optionally, halt the Arm Cortex-M3 core until the ADC conversions are
complete.
The ADCCON and ADCBUFCON registers must also be configured. For example,
ADCCON = 0x010XXX; // PGA gain =1.5x
ADCBUFCON[3:0] = 0x4; // Enables chopping of the ADC input – default value
Configure LPTIACON, Bits[15:13] to select the resistor value for the low-pass filter on the TIA output. This setting configures the
programmable resistor, R
F
, which is between the low power TIA output and the ADC mux. The programmable resistor combines with
the external capacitor on the AIN4_LPF0 and AIN7_LPF1 pins to form a low-pass filter on the low power TIA outputs. The user must
trade off the required ADC measurement settling time with the cutoff frequency on the low power TIA output filter.
The
ADC provides optional digital postprocessing and filtering that can improve measurement accuracy of the sensor
measurement. The ADCFILTERCON register provides programmable options for averaging, oversampling, and 50 Hz and 60 Hz mains
rejection filtering. Trade the ADC update rate vs. required ADC noise performance when configuring the ADCFILTERCON register.