Auto-Conversion Trigger

The auto-conversion trigger allows periodic ADC measurements without software intervention. Auto-conversion trigger sources may be internal, such as the overflow of a Timer, or from an external source connected to the ADACTPPS input pin. Auto-trigger sources are selected using the ADC Auto-Conversion Trigger Control (ADACT) register.

The Direct Memory Access (DMA) module may be used as an auto-conversion trigger. Since the DMA has the ability to read/write any SFR, it can be used to trigger an auto-conversion by writing to the ADC Positive Channel Selection (ADPCH), or by reading the ADC Result High (ADRESH) or ADC Error High (ADERRH) registers. For more information on the DMA, please refer to the selected device data sheet.

When a trigger event occurs, module hardware sets the GO bit and the conversion process begins. Once the conversion is complete, hardware clears the GO bit, loads the ADRESH:ADRESL registers with the conversion result, and sets the ADC Interrupt Flag (ADIF).

Auto-conversion trigger sources may or may not be synchronized to the ADC clock; therefore, it is important to assure that all ADC timing requirements are met. If a trigger is received during an active conversion cycle (GO = 1), the trigger is ignored and has no effect on the current conversion cycle.