The best way to record non-volatile data


Closed Thread
Results 1 to 4 of 4
  1. #1
    johnson's Avatar
    johnson Guest

    Default The best way to record non-volatile data

    Hi all,

    I am implementing a counter system which will record down every count of an event into eeprom. The way I'm using is, whenever the even occurs, counter will incremented by one, and the value will be saved into eeprom. However, I realize that this way is a kinda wasting of time and resources (if i am not mistaken, there is a limitation for writting data into PIC's eeprom in number of time). Hence, I am thinking of another way, ie. whenever PIC detect the voltage supply is low, it will only backup the data into its eeprom instead of writting data continuously into eeprom (it will caused damage to eeprom). Is there anyway to implement it in Pic Basic? Thanks



    cheers,

  2. #2
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257


    Did you find this post helpful? Yes | No

    Default

    Johnson,
    How often doyou think this event would occur?
    JS

  3. #3
    johnson's Avatar
    johnson Guest


    Did you find this post helpful? Yes | No

    Default

    the event occurs very often.......

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Simply be creative with the Power Supplies within your circuit. The supply to the PIC on it's OWN can be 'isolated' from the main supply to the rest of the circuitry through a Diode with a large Capacitor acting as a Reservoir connected on its output. Power-fail detect is taken to a PIC pin from before the Diode. This way the PIC can detect power fail (or Power-OFF) and will continue to function for a few seconds after main power is removed - certainly enough to save your variables into EEPROM. If additional ON time is required, increase the size of the Capacitor.

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Read/Write Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th February 2010, 01:51
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

Members who have read this thread : 1

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