2

In the datasheet of the SAM3X8E in Section 43.6.9 Page 1327 it clearly states that the SAM3X/A has a programmable offset for ADC input in Single-Ended mode and I believe that the Atmel ASF library also has a function dedicated to configuring analog offset for SAM's ADC (adc_enable_channel_input_offset). However the following lines of code did not work:

  adc_set_writeprotect(ADC,0);
  adc_enable_anch(ADC);
  adc_disable_channel_differential_input(ADC, ADC_CHANNEL_5);
  adc_set_channel_input_gain(ADC, ADC_CHANNEL_5, ADC_GAINVALUE_2);
  adc_enable_channel_input_offset(ADC, ADC_CHANNEL_5);
  adc_set_writeprotect(ADC,1);

Why??

migrated from electronics.stackexchange.com Nov 28 '16 at 19:17

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.