Hello, welcome to our forum.

It looks like you have registered but you have not yet posted and messages. Our requirements are that you must post at least two messages, to allow the moderators to review your registration, before you will be allowed access to the full range of forum areas.

Please make a couple of posts, until then you may see a notice that says you are banned from certain forum areas.


Thank you.

Remove Text Formatting
Loading...

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    736

    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

    Cheers

    Sheldon




    Code:
    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
    Location
    PERTH AUSTRALIA
    Posts
    736

    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

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