save data in pic


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2006
    Location
    johor,Malaysia
    Posts
    57

    Default save data in pic

    hello..

    i use pic16f84a for count something.. but if power supply off the data is lost.
    how can i save the data in pic and if i on the supply back the data will be use.
    can some one help me.

  2. #2
    Join Date
    May 2004
    Location
    New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Save the data to the on-board EEPROM - I think the F84 has 64 bytes.

  3. #3
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    MELabs has sample code to do what Archilochus suggest here
    http://www.melabs.com/resources/samples/pbp/eeword.bas
    also check the samples file in your PBP folder for another example (ee.bas)

    Paul Borgmeier
    Salt Lake City, Utah
    USA

  4. #4
    Join Date
    Feb 2006
    Location
    johor,Malaysia
    Posts
    57


    Did you find this post helpful? Yes | No

    Default

    thankQ.

    i try this tonight

    and how can i give signal for write data to eeprom before power supply off.

    i cant save the data every time because my system loop forever
    Last edited by PoTeToJB; - 11th May 2006 at 18:27.

  5. #5
    Join Date
    Jan 2006
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    there is a code example post by Melanie that addresses this as far as I remember. Do a quick search, youll find it.

  6. #6
    Join Date
    Feb 2006
    Location
    johor,Malaysia
    Posts
    57


    Did you find this post helpful? Yes | No

    Default

    thankQ

    now i know how to read and write data to pic.

    i have anathor question.

    can i use interrupt and write progran to save data in pic..

    i try use interrupt and write program to write data to pic. but cant function..

    why..

    or i cant use write program if i use interrupt
    Last edited by PoTeToJB; - 14th May 2006 at 17:24.

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    I can't believe it's impossible.. just post your code here first!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  8. #8
    Join Date
    Jul 2005
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    and how can i give signal for write data to eeprom before power supply off.
    Well... keep a copy of the data in a register, and compare your new value in the loop to the existing register value.

    When and only when you have a new value, send the new value to the EEPROM, and update your register value too. Don't do it too often, as there is a limited number of cycles on that memory.

Similar Threads

  1. Going Loopy - How do i get my Loops sorted out ???
    By gtvmarty in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th September 2009, 05:02
  2. Nokia 3310 display text
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th August 2007, 03:39
  3. Need the code to write to a memory
    By Hamlet in forum General
    Replies: 0
    Last Post: - 20th August 2007, 00:22
  4. PIC to PIC Serial data using Cat5 cable
    By Andy Wood in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd May 2007, 02:42
  5. Long varible strings
    By flashg in forum Serial
    Replies: 0
    Last Post: - 14th October 2006, 04:40

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