Blank Variable


Closed Thread
Results 1 to 12 of 12

Thread: Blank Variable

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by GatorGuy View Post
    Quick EEPROM question while I'm at it. How reliable is the EEPROM memory? I want that value to stay there once the user selects it no matter how many shutdowns/powerups there are.
    They have something like 1,000,000 erase/write cycles.
    Just make sure a write is not happening during power down.

    And no " " " " " " " " " "
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Feb 2009
    Location
    Southern California
    Posts
    86


    Did you find this post helpful? Yes | No

    Default

    I usually add this near the top of my code before any variable declarations

    Code:
    data @0, 0(256)             'set all EEPROM data to 0 on initial programming
    Just be mindful of how much EEPROM your chip has, and you might want to write 255 instead of 0. You might only use 10 locations and that would look like

    Code:
    data @0, 255(10)             'set 10 EEPROM data to 255 on initial programming
    Then early in the loop read and check for the default value

    David

Similar Threads

  1. EEPROM Variables (EE_Vars.pbp)
    By Darrel Taylor in forum Code Examples
    Replies: 79
    Last Post: - 26th October 2012, 00:06
  2. Variable PWM PIC18F2431
    By trr1985 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th June 2009, 06:03
  3. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  4. set flags within a variable?
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 24th October 2006, 11:07
  5. WORD vs BYTE variable lengths
    By bartman in forum General
    Replies: 0
    Last Post: - 28th November 2005, 21:16

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