To start with, the DATA and EEPROM commands only work at compile time. Use READ and WRITE during run time.
Concept to receive data via USB then WRITE to eeprom.
Send a small array to the MCU then check the array for a specific value.
If the value is X the jump to a WHILE or DO loop.
Wait for data to be recieved that you want to WRITE to the eeprom.
Use a FOR/NEXT loop to loop through the array received via USB, (this will be a different array/buffer than before)
WRITING each byte of the array to the next address of the eeprom.
When finished change the variable X to another value that do not mean GOTO the DO loop.
RETURN to main program.
These may help
http://www.picbasic.co.uk/forum/show...rray+to+eeprom
http://www.picbasic.co.uk/forum/show...rray+to+eeprom
http://www.picbasic.co.uk/forum/showthread.php?t=544
I am not in a place to write code at the moment but you may get the idea.





Bookmarks