Microchip | The Embedded Control Solutions Company Register Login
Browse All
Microchip Technology
 369 Code Snippets

CE102 - ADC Conversion in Sleep mode

Microchip Technology

n this example, ADC is set up to convert AIN5 using CH0 S/H and ADC is operating using its internal RC osc.

About this Code Example

In this example, ADC is set up to convert AIN5 using CH0 S/H and ADC is operating using its internal RC osc.
Start of conversion is issued in the background loop and device enters sleep mode immediately after that.

When the ADC conversion is completed in sleep mode, it wakes up the device and enters ADC ISR.


void initAdc1(void);
ADC CH0 is set-up to covert AIN5 in 10-bit mode. ADC is configured to next sample data immediately after the conversion.
But the start of conversion is issued manually in the background loop.

void _ADC1Interrupt()
Device enters the ADC ISR after waking up from sleep mode. ADC result is read in the ISR and PORTA (RA6) pin is toggled.

Categories

Release History

  • Jun 15, 2012

    Version: 1.0.0

    First Release to ECS

Download Contact the Developer

*Required Fields


  • Current Version:1.0.0
  • Created:Jun 16, 2012
  • Updated:Feb 26, 2015
  • Downloads:3018
  • MPLAB Version:V8.xx or above
  • C Compiler:C30 V3.11 or above
  • Development Tools:Explorer16 board
  • Supported Devices:dsPIC33FJ256GP710

Corporate News

Resources

Stay Connected

Stay up to date with the latest news from Microchip Technology.