Example.
Supposing I have some code where a few small 'files' are sent from a PC via Serial to PIC and stored using ROM.writebyte.
Then retrieved later on in PIC code.
Essentially I'm hoping to replace an EEPROM as i have plenty of space on PIC.
Q1. Assuming these 'files' (simple blocks of data bytes) are to be sent in separate lumps, how do I tell ROM.writebyte to start at a particular location?
i.e. for writing; Set Start location .... ROM.Write the Byte... repeat..
I can follow it for reading back i.e. set the index and go on from there, BUT I can't understand the ROM.Write.
In the example:
Code: Select all
// write values to ROM...
ROM.BeginWrite
For Index = 0 To ROMBufferSize - 1
ROM.WriteByte(Index)
Next
ROM.EndWrite
If so, where do I specify the byte(s) to be written?
No variable for the data byte is apparent.
e.g. if I have byte variable Fred=12 how do I send that to locationX using ROM.Writebyte ?
Is 'Index' an arbitrary value or an absolute value?
(If absolute, where do I find a safe 'start' point after code?)
One final thing, I notice in Proton 'Help' for CWrite it says that "WRTE_ON fuse setting must be included" - is a similar thing needed in SF ?
Any suggestions/prompting/kicking greatly appreciated