
Originally Posted by
Tear
I have one question though, if you dont mind. Using DATA WORD 1500 works, but I am guessing that it places it at memory slot 0 of the EEPROM. How can I place another variable like this after the first one? I am sure that I need to includethe address in the command somehow.
OK,
we are talking about the DATA statement.
It preloads the EEPROM at program time.
If you want to specify a location (other than the current pointer position) there is only one choice:
use DATA @Location,Byte1,Byte0.......
There is NO way of specifying a location (other than the current pointer position) a WORD is to be written to.
But this is not much of a problem, since the WORD is written to the location starting from the current pointer position.
(Bear in mind, a WORD is written LowByte first!)
So:
DATA @0,$11,$22
DATA WORD $AABB
DATA $33
DATA $44
DATA WORD $CCDD
would result in the following EEPROM content:
11 22 BB AA 33 44 DD CC
Just try it !
However,
I would always use DATA with Bytes (since READ and WRITE only deal with Bytes), because later on in your program is a lot easier, you don't, have to remember wether or not you have to swap the order of the two bytes you have just "READ".
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Bookmarks