I want to undestand this. I can't see any examples with it. In the example ble_app_proximity I always received 100% level. If it possible, can anybody give a ADC config example for it? Thanks.
I want to undestand this. I can't see any examples with it. In the example ble_app_proximity I always received 100% level. If it possible, can anybody give a ADC config example for it? Thanks.
Tnanks. But I still have question- how to init ADC in SDK9? As I understand, I should setting in function
nrf_adc_input_select()
transfer to it
NRF_ADC_CONFIG_SCALING_SUPPLY_ONE_THIRD
is it correct?
function nrf_adc_input_select()
__STATIC_INLINE void nrf_adc_input_select(nrf_adc_config_input_t input)
{
NRF_ADC->CONFIG =
((uint32_t)input << ADC_CONFIG_PSEL_Pos) | (NRF_ADC->CONFIG & ~ADC_CONFIG_PSEL_Msk);
if (input != NRF_ADC_CONFIG_INPUT_DISABLED)
{
NRF_ADC->ENABLE = ADC_ENABLE_ENABLE_Enabled << ADC_ENABLE_ENABLE_Pos;
}
else
{
NRF_ADC->ENABLE = ADC_ENABLE_ENABLE_Disabled << ADC_ENABLE_ENABLE_Pos;
}
}
I see nRF51_SDK_9.0.0_2e23562.zip\examples\peripheral\adc_simple\
example, does it help?
And, in particular, note that comment that measuring the battery voltage may not give any useful indication of the remaining battery life!
repeat what do You mean?