+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2012

    Cool read command of EEprom errors

    Hi guys ,

    this bit of code is giving some strange results when i look at the values loaded into the test Variable STDByteTmp which i cant explain and solve

    the code is to read the values stored on the eeprom into a varable pointed to by V

    what is happening is that V is counting ok and reading the values of location 1 and 2 correctly into STDbyteTmp , but as V counts to 3, it appears to load the value stored at location 3 ( $7 ) into V and then V goes to value of 8 and i cant see why this the case.

    all the variables are defined as byte and i can see the data in the eeprom is correct

    can someone tell me why this is the case



    DATA @1,$9,$8,$7,$6                                ' stores these values from location 1  to the eeprom at programming time
     For V = 1 to 4
             read V,STDByte(V)                           ' read from location 1 - 4  data byte
             STDByteTmp = STDByte(V)                ' get into temp var   for testing
     next V

  2. #2
    Join Date
    Feb 2012

    Default Re: read command of EEprom errors

    well found the problem after a lot of playing , the variable STDByte did not have number of elements defined for an array variable

    Hi, we are pleased to see that you are using our forum.

    We'd like you to become a member of our community. Membership is FREE, please REGISTER and view our forums without these annoying reminders!

    Once registered you may post on the forums, download from the file areas and use the WIKI without interruption.

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