Back to DRIVERS page

AVR UC3 Series Software Framework: ADC Driver

Copyright © 2007 Atmel Corporation

Introduction

The ADC is based on a Successive Approximation Register (SAR) 10-bit Analog-to-Digital Converter (ADC). It also integrates an 8-to-1 analog multiplexer, making possible the analog-to-digital conversions of up to eight analog lines. The conversions extend from 0V to ADVREF.

 

The ADC driver philosophy of usage is:
  • Configure one (or several) ADC channel [adc_configure]
  • Enable one (or several) channel, [adc_enable]
  • Start the ADC conversion on one (or several) channel, [adc_start]
  • Get a channel value [adc_get_value] (it will automatically poll for the end of conversion)
  • Eventually disable a channel [adc_disable]
  •  

    Note: On Rev. E of AT32UC3A0512 and on Rev. B of AT32UC3B0256, the ADC does not work properly when more than one channel is enabled.
    Fix/Workaround: Do not use the ADC with more than one channel enabled at a time.

     

    ADC Driver

    The driver is composed of adc.c and adc.h.

     

    An example is available: Start ADC channels acquisitions and display the value on the USART output.

    Check also the GCC tutorial that is based on this ADC example.

     


    AVR is a registered trademark of Atmel Corporation.

    >