Starting a Conversion

In single conversion mode, for starting a conversion, the ADC Start Conversion bit in the ADC Control and Status A register (ADCSRA.ADSC) must be written to '1'. This bit remains set until the conversion is completed. Once the conversion is completed the hardware will clear ADCSRA.ADSC.

In the auto triggered mode, the conversion is automatically triggered by various sources. To enable auto triggering, the ADC Auto Trigger Enable bit in ADCSRA (ADCSRA.ADATE) must be written to '1'. The trigger source is selected by writing the ADC Trigger Select bit group in the ADC Control and Status B register (ADCSRB.ADTS) accordingly. The auto triggering mode provides a method of starting conversions at fixed intervals, which are configurable, based on the trigger source.

The ADC Interrupt Flag bit in ADCSRA (ADCSRA.ADIF) will be set even if the specific interrupt or global interrupts are disabled. Thus a conversion can be triggered using ADCSRA.ADIF without causing an interrupt. Then the ADC operates in a free-running mode, in which the next conversion is triggered once the previous conversion completes and sets ADCSRA.ADIF.

Note: In the auto triggered mode, ADCSRA.ADIF must be manually cleared for the next event to generate an interrupt. For free-running mode, the ADC will perform successive conversions independent of whether ADCSRA.ADIF is cleared or not. The first conversion must be started by writing ADCSRA.ADSC to '1'.