Hi I have nrf51822 CEAA which is powered with 1.9 volt on vdd (low power chip). I'm using ADC to measure battery level but the conversion gave me 5.4 volt wich is wrong for the battery
here my adc configuration
NRF_ADC->INTENSET = (ADC_INTENSET_END_Disabled << ADC_INTENSET_END_Pos); /*!< Interrupt disabled. */ // config ADC
switch (channel) {
case CH_BATT: /* Battery voltage */
NRF_ADC->CONFIG = (ADC_CONFIG_EXTREFSEL_None << ADC_CONFIG_EXTREFSEL_Pos) /* Bits 17..16 : ADC external reference pin selection (no ref). */
| (AIN_BAT << ADC_CONFIG_PSEL_Pos) /*!< Use analog input "AIN_BAT" as analog input. */
| (ADC_CONFIG_REFSEL_VBG << ADC_CONFIG_REFSEL_Pos) /*!< Use internal 1.2V bandgap voltage as reference for conversion. */
| (ADC_CONFIG_INPSEL_AnalogInputOneThirdPrescaling << ADC_CONFIG_INPSEL_Pos) /*!< Analog input specified by PSEL with 1/3 prescaling used as input for the conversion. */
| (ADC_CONFIG_RES_10bit << ADC_CONFIG_RES_Pos); /*!< 10bit ADC resolution. */
I joined here the schematic. the input is IMG_BAT P0.01
the second answer of this question
VDD 1.8, prescaling 1/3: AIN max 2.1V (rule 2 limitation). is that mean that the input should not exceed 2.1 volt (battery can go to 4.2 volt)
should I put resistors to reduce battery voltage, so that the max input be 2.1 (at 4.2 battery voltage, ADC input is 2.1)???