I didn't quite understand your explanation that it must be split WORD sized in 2 BYtes or how to do that for the particular word variables that I want to use in my DATA statements? If my DATA @ statements must work AS IS then why would the WORD sized variables have to be split into 2 bytes?
It's just because, as far as i'm aware of, DATA statement don't accept the WORD sized data you enter in. I just re-check it, and if you use
DATA @0, $1234,$5678
The DATA will load $34 @0 and $78 @1. Just for that. You'll need to split your data like...
DATA @0,$12,$34,$56,$78
Now Read back the results to the var as i did in the previous example with .LowByte and HighByte.
There's also other way to do it Using MPASM statement and few assembler lines... up to you.
Darrel Did something interesting in the Code example section.
http://www.picbasic.co.uk/forum/show...ghlight=EE_var
There's also another way to do it
Code:
data @0, $12,$34,$56,$78
data word $abcd
data word $A1B2
This will load your EEPROM like this
Code:
Address 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ASCII
0000 12 34 56 78 CD AB B2 A1 FF FF FF FF FF FF FF FF .4Vx.... ........
0010 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
0020 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
0030 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
0040 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
0050 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
0060 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
0070 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
0080 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
0090 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
00A0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
00B0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
00C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
00D0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
00E0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
00F0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........
But you still need to load you value with .LowByte and .HighByte
Bookmarks