This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ADC tutorial

I am using a nRF51422 device with the SDK 11.  The task is to transmit battery service data to an application on the phone.  I was wondering if there is a tutorial available that will help me enable the ADC peripheral and store the input as a characteristic.  

Thank you

Parents Reply Children
  • Hello,

    rahul1 said:
    Which pin on the nRF51422 must the ADC input go into?

     In the function adc_configure in the example code, the ADC channel is set using NRF_DRV_ADC_DEFAULT_CHANNEL(). By default, this is set to NRF_ADC_CONFIG_INPUT_DISABLED. This means it measures VDD directly. Please see figure 71 in chapter 31 in the reference manual for information about the usage. If you have a voltage regulator, you must use an ADC input. 

    rahul1 said:
    " Code size of this image exceeds the maximum allowed for this version of the linker"

     This error message tells you that you have reached the code size limit of Keil. See this thread.

    Hopes this helps on your way.

    Best regards,
    Oeyvind

Related