Hi,
You can have as many ARRAYWRITE in your program as the program memory of your device allows but as with any other command only one is executing at the time.
The data is stored in the specified and previously declared array, ie in RAM.
Code:
myFirstArray VAR BYTE[30]
mySecondArray VAR BYTE[30]
ARRAYWRITE myFirstArray, ["This is a test with Arraywrite"]
ARRAYWRITE mySecondArray, ["This is also a test", 10, 13]
Now the first "location" of myFirstArray contains "T", the second "location" contains "h" and so on. Again, remember that they execute sequentially - first myFirstArray is loaded THEN mySecondArray is loaded.
If your trying to load the array with data coming in over the USART or something like that I don't think ARRAWRITE is the way to do it. Sure, you can specify where in the array to start writing but since you still have to keep a "pointer" of "where you are" in the array you might as well fill the array "manually".
If you have several "streams" of data coming in simultanously from several devices you'll have to use a PIC with several USARTs. There's no way of capturing several "serial inputs" simultanoulsy with the SERIN/SERIN2/DEBUGIN commands.
/Henrik.
Bookmarks