5-86
esp_set_adc_gain Set Analog-To-Digital Converter Input Gain
esp_get_adc_gain Report Analog-To-Digital Converter Input Gain Setting
Synopsis:
#include “esp6000.h”
int esp_set_adc_gain(long gain)
int esp_get_adc_gain(long *gain)
Arguments:
long gain
ADC gain (V1_25, V2_5, V5, V10)
0 - 3 (corresponding to gain of 1, 2, 4, or 8 respectively)
Library Location:
\esp6000.dll
Description:
esp_set_adc_gain() will set the gain of all eight (8) ADC channels.
esp_get_adc_gain() reports the present gain setting of all eight (8) ADC channels.
The analog input range of each ADC channel is software-configurable for ranges of
±
10V,
±
5V,
±
2.5V, and
±
1.25V.
ADC channels are located on the analog I/O connector on the controller card.
16-bit, 100 kHz
A/D Converter
Six-Pole
Anti-alias
Filter
Programmable
Gain
Instrumentation
Amplifier
Sample Trigger
Control
(Timer or
Software Driven)
DSP
MUX
8 Single-
Ended
Input
Returns:
ESPOK, ESPERROR
Hint:
Usage Example:
#include “esp6000.h”
main()
{
long timestamp; float volts;
if (!esp_init_system()) exit (-1);
/* Set ADC Gain */
esp_set_adc_gain(V10);
/* Set ADC Range */
esp_set_adc_range(BIPOLAR);
/* Acquire ADC Channel 1 Analog Data */
esp_get_adc(1, &volts, ×tamp);
printf(“ADC = %f \n\r”, volts);
}
See Also:
esp_set_adc_range(), esp_get_adc(), esp_get_all_adc()
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com