sleep dependant on 12v source


Closed Thread
Results 1 to 2 of 2
  1. #1
    BTlab's Avatar
    BTlab Guest

    Default sleep dependant on 12v source

    Hi all,
    Im currently building an automotive project using a 16F876, and I'm nearing completion but one last thing is that I want the pic to sleep when it is not receiving power from accessory (+12v), so that the variables do not get erased when the car is switched off
    the project contains an LCD which I also wish to shut down.

    what is the best way to acheive this? would I have to run the 12v through another regulator or can it be done some other way?

    code wise I guess I just use port change interrupt?

  2. #2
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi BTlab,

    Why don't you just write your variables to eeprom just before the power to the PIC dies then read them back into your program when the PIC powers up again? Use the READ and WRITE commands. You should also have an input that monitors the incoming power supply and put a 100uF capacitor across the PICs power to keep alive long enough to store the variables in memory. I believe there have been previous questions about this on the forum in the past.

    HTH,

    BobK
    Last edited by BobK; - 14th February 2007 at 15:41.

Similar Threads

  1. Won't go back to SLEEP after 1st Interrupt
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 29th June 2009, 09:00
  2. Filling pdu array with gps data!
    By camolas in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th October 2008, 00:54
  3. Replies: 0
    Last Post: - 15th December 2006, 19:16
  4. 16F628A current high during sleep
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th October 2006, 10:21
  5. Wierd sleep issue
    By orca in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th March 2006, 22:06

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts