EEPROM Issue


Closed Thread
Results 1 to 14 of 14

Thread: EEPROM Issue

Hybrid View

  1. #1
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: EEPROM Issue

    Thanks for the thoughts. I tried something, in the subroutine to SaveChanges I used WRITE 132,150 instead of WRITE 132,CB. The retrieved value was 150. It's not an EEPROM issue after all. Somehow my variables are getting corrupted somewhere. I'm reviewing all code with a "magnifying glass in one hand and a fine tooth comb in the other" to try to find where things are going awry. Thanks all.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: EEPROM Issue

    write 132,CB is not correct. You have to write 132,$CB.

    Ioannis

  3. #3
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: EEPROM Issue

    No, CB is the name of my variable, not the value.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,621


    Did you find this post helpful? Yes | No

    Default Re: EEPROM Issue

    Do you have (or can you add) a debug port (EUSART, SEROUT, DEBUG)?
    If so, then print the value of your variable out before calling the write routine, before executing the write command, after executing the write command, read the value back immediately after and print it out again.

    Is CB declared as a BYTE?

    If you're indexing arrays somewhere then doublecheck that you're not writing outside the range of the array.

  5. #5
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: EEPROM Issue

    CB is declared as a BYTE. I checked the arrays' indexing several times. I have a spread sheet with all the variables listed, size (BIT, BYTE, etc), USB ID#, the internal code used to communicate each variable with other PICs on the board (there are a total of 6), and some other criteria. I've been working on this project for the past several years. It's due in less than 2 weeks.

    I decided to rebuild the HIDmaker side of things. I found several variables, including arrays, that were structured as signed bytes. I'm dealing with the sign in software and forgot I did that earlier. I will be totally revamping it around the proper non-signed bytes and try again.

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: EEPROM Issue

    This makes me wondering, how can one follow every detail in a large program.

    Too many variables and chances are something will go wrong.

    Ioannis

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,680


    Did you find this post helpful? Yes | No

    Default Re: EEPROM Issue

    much easier in C
    local vars and scope make life easier , user defined structures remove all doubt
    Warning I'm not a teacher

Similar Threads

  1. SPI SS Issue
    By sstt1976 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th October 2014, 00:04
  2. IF-THEN issue
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th February 2014, 22:09
  3. EEPROM or DATA issue with 16F1503
    By scasale in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th October 2013, 04:46
  4. 12F675 - another issue
    By fratello in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 26th August 2011, 19:26
  5. Code Issue - select case or 'if' issue - not sure why
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 7th October 2007, 08:52

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