Hi all,
I am starting a new project using a PIC16F1705.
I willl use the "pic_data_hef" library.
This libray requires the definition of a constant containing the start address of the HEF, and named HEF_ADDRESS_OFFSET.
For the 16F1705, that value is 0x1F80
My
suggestion: Couldn't that constant be defined in the device include
file, so that, if I decide to port my code to another PIC, the value of
the constant would be automatically updated, and thus, avoiding possible
errors ?
In my application, the user will be able to select a "mode". I would like that the selected mode be written in the HEF, so that at the next boot, the last selected mode is automatically picked up.
At the very first usage, there will also be a default mode defined
(I am simplifying here, because in fact there is not only one byte to save in HEF but several data, but let's keep the question simple)
My question is: How can I define those default values in HEF for the very first start of the application ? For example, how can I force the value "0x15" in location 0x1F80 which is the adress of the first HEF location during programming time ?
Thanks all for your help
David