Ted, you're right on this. I goofed. But you got the idea though![]()
Ted, you're right on this. I goofed. But you got the idea though![]()
Yes. But it does not seem to be efficient enough.
A one or two-liner should be enough. Maybe using the remainder // ?
When you say efficient, do you mean speed or code size?
Dave
Always wear safety glasses while programming.
If you alias the Word array as a Byte array, you can just write 1 byte at a time in the loop.
Code:arraysize CON 20 Array VAR WORD[arraysize] @ByteArray = _Array ByteArray VAR BYTE EXT FOR ArrayPosition = 0 TO (arraysize*2-1) WRITE ArrayPosition, ByteArray(ArrayPosition) NEXT ArrayPosition
DT
The latter.When you say efficient, do you mean speed or code size?
I've only done this once a while back but all I did in my program at WRITE time is:
WRITE 0,X.BYTE0 : WRITE 1,X.BYTE1
At READ time:
READ 0,X.BYTE0 : READ 1,X.BYTE1
I don't remember having any problems. Hope it works.
It does.
You know, the issue here is filling the eeprom with data from a word array. Your line is only a part of it.
This should help some.
Once you know what the EXT modifier does, it should make more sense.
The EXT (external) modifier.
http://www.picbasic.co.uk/forum/showthread.php?t=3891
<br>
DT
Bookmarks