请教各位大侠!如题,程序中 这样设置后 不起作用:
AUXADCEnableSync(AUXADC_REF_EXT, AUXADC_SAMPLE_TIME_2P73_MS, AUXADC_TRIGGER_MANUAL);
有一些介绍,但是不知该怎么设置。
//! When using external reference voltage, the AUX I/O 7 pin must have been
//! configured in advance. This must be done manually when using DriverLib (the
//! Sensor Controller Interface driver would do this automatically):
//! – Ensure that AUX I/Os are not latched
//! – AUX_AIODIO0: Configure AUX I/O 7 as input/analog with input buffers
//! disabled
//! – IOC: Configure matching DIO pin as AUX I/O with no pull
//!
//! ADC input scaling is enabled by default after calling this function, and
//! must, if desired, be disabled explicitly by calling
//! \ref AUXADCDisableInputScaling().
kqian0327:
你好,
CC2640不支持外部参考电压,所以你只能把外部电压分压到内部ADC的参考电压进行模数转换。
希望该回答对你有帮助。
wenya zhao:
回复 kqian0327:
Hi kqian0327,
感谢您的回答!
但是我看TI给的2640 DEMO例程中有关于外部基准电压的一些说明,如下,是目前阶段不支持外部参考电压,以后会开放吗?外部基准电压挺常用的功能啊,2541都支持的,我目前遇到的问题是使用VCC做reference 的话,当电池电压下降时会影响测量结果,所以想外加一个精度更高,随电压变化波动比较小的外部参考电源。
//! When using external reference voltage, the AUX I/O 7 pin must have been//! configured in advance. This must be done manually when using DriverLib (the//! Sensor Controller Interface driver would do this automatically)://! – Ensure that AUX I/Os are not latched//! – AUX_AIODIO0: Configure AUX I/O 7 as input/analog with input buffers//! disabled//! – IOC: Configure matching DIO pin as AUX I/O with no pull//!//! ADC input scaling is enabled by default after calling this function, and//! must, if desired, be disabled explicitly by calling//! \ref AUXADCDisableInputScaling().
Rex Kung:
没法使用外部,只有内部的两个参考源,参考下面,拿走不谢:
/*!*@briefSpecifies whether the internal reference of the ADC is sourced from the battery voltage or a fixed internal source.**- In practice, using the internal fixed voltage reference sets the upper range of the ADC to a fixed value. That value is 4.3V with*input scaling enabled and ~1.4785V with input scaling disabled. In this mode, the output is a function of the input voltage multiplied*by the resolution in alternatives (not bits) divided by the upper voltage range of the ADC. Output = Input (V) * 2^12 / (ADC range (V))**- Using VDDS as a reference scales the upper range of the ADC with the battery voltage. As the battery depletes and its voltage drops, so does*the range of the ADC. This is helpful when measuring signals that are generated relative to the battery voltage. In this mode, the output is*a function of the input voltage multiplied by the resolution in alternatives (not bits) divided by VDDS multiplied by a scaling factor derived*from the input scaling. Output = Input (V) * 2^12 / (VDDS (V) * Scaling factor), where the scaling factor is ~1.4785/4.3 for input scaling*disabled and 1 for input scaling enabled.**@noteThe actual reference values are slightly different for each device and are higher than the values specified above. This gain is saved in*the FCFG. The function ::ADC_convertRawToMicroVolts() must be used to derive actual voltage values. Do not attempt to compare raw values*between devices or derive a voltage from them yourself. The results of doing so will only be approximately correct.**@warningEven though the upper voltage range of the ADC is 4.3 volts in fixed mode with input scaling enabled, the input should never exceed*VDDS as per the data sheet.*/ typedef enum ADCCC26XX_Reference_Source {ADCCC26XX_FIXED_REFERENCE= AUXADC_REF_FIXED,ADCCC26XX_VDDS_REFERENCE= AUXADC_REF_VDDS_REL } ADCCC26XX_Reference_Source;
Rex Kung:
回复 Rex Kung:
使用这个参考,两个方式我都试过,都能用,我用的4*4的片子