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

HLVD Power Down Save

Microchip Technology

This example demonstrates using an HLVD interrupt to quickly detect when power has been cut from the microcontroller.

About this Code Example

HLVD Power Down Save code example for PIC18F46J11 at 3.3V.

This example demonstrates using an HLVD interrupt to quickly detect when power has been cut from the microcontroller.

While powered, the firmware simply increments a counter variable and displays the value on the serial port. When power is cut, the firmware quickly saves data to non-volatile FLASH memory during the short period of 
time where capacitors are keeping the microcontroller running.

When power is restored, the firmware reads FLASH memory, finds the most recently stored data and restores state.The counter then continues where it left off.

Read more in the zip file.

Categories

Release History

  • Jul 21, 2011

    Version: 1.0.0

    Initial code release on 9/16/09.

Download Contact the Developer

*Required Fields

  • Current Version:1.0.0
  • Created:Jul 21, 2011
  • Updated:Feb 26, 2015
  • Downloads:4230
  • MPLAB Version:latest
  • C Compiler:C18 v3.3 or above
  • Development Tools:n/a
  • Supported Devices:PIC18F46J11

Corporate News

Resources

Stay Connected

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