Hi, I am trying to have a TXT file which stores some data. This data is to be read by the microcontroller. Where can I store such a file on the board.
If something similar to this has been done then please share.
Board: MCB2300 Processor: LPC2388 with ARM7
Thanks
Note that the concept of a text file doesn't matter anything for a microcontroller
So you want to store data. Then you must consider if you want to add a file system just because you want to store a file - and who would be the interested reader of this file at a later time.
Or maybe you would do better by just storing binary data.
Anyway - one thing to consider is how often you need to update the data, since the memory regions available for permanent storage are not designed for infinite numbers of erase/rewrite cycles.
The processor has the code flash, but this is only updated in sector-sized chunks. Not good for adding a character at a time to a file, but fine if you expect your product need maybe 1000 updates during the lifetime. Actually more than that, but a safety margin doesn't hurt.
Note that it is far simpler to play with binary data, than to add a file system just to then work with a text file.
Of course, people have done something similar. People have implemented file systems based on Keil libraries. Or based on own code. Or based on Internet-available file systems.
And people have implemented solutions using just the raw flash surface together with the IAP support available in the processor.
And people have implemented solutions using memory cards too, allowing the file data to be copied to the memory card before it is inserted in the embedded unit.
You don't even mention the size required for your text file, i.e. if the flash is a possibility, or if only an external memory card can handle the amount of data. Size is just as important as the frequency of updates. Or the source of the new data.
Per Westermark:
Binary data would be a bit of a problem as we want Humans to be able to eventually read/write/modify the data.
BUT: worst case we can also work with this (though we prefer not to)
There would be alot of updating. But we dont really need a complex file system, just one datafile that can be used to store data (please see the other post to know what kind of data and what we want to do with the data)
I am ok with implementing external memory, but im not sure how to do it.
Still very new at this