Page 1 of 1

"Write config on download" -- meaning/use

Posted: Thu Jul 23, 2015 4:15 pm
by gtc
Version 6.1.2.0

In Project Options --> Configure there's a tick box for "Write config on download", which appears to be unticked by default.

What does that do, and when should I use it?

(No mention of this feature in the associated Wiki page text, only a screenshot showing it ticked.)

Re: "Write config on download" -- meaning/use

Posted: Thu Jul 23, 2015 4:35 pm
by Benj
Hello,

The option specifies if the config settings are added to the output hex file or not. If they are not added then the current config settings will be retained when reprogramming your device.

For a PIC, dsPIC etc the config memory is the same as the program memory and so the config can be reprogrammed again and again.

For an AVR the config memory can only be changed a few times and so the tick box allows you to disable the programming of the config settings when re-programming the same device multiple times.

Re: "Write config on download" -- meaning/use

Posted: Thu Jul 23, 2015 8:11 pm
by QMESAR
Benj wrote: For a PIC, dsPIC etc the config memory is the same as the program memory and so the config can be reprogrammed again and again.

For an AVR the config memory can only be changed a few times and so the tick box allows you to disable the programming of the config settings when re-programming the same device multiple times.
Just one of the many reasons why a PIC is a better Micro Controller than any AVR :D :D

Re: "Write config on download" -- meaning/use

Posted: Fri Jul 24, 2015 4:16 am
by gtc
Benj wrote:Hello,

The option specifies if the config settings are added to the output hex file or not. If they are not added then the current config settings will be retained when reprogramming your device.
Thank you.

So for a PIC device (e.g. 16F88), if I don't tick that box, then no config settings will be included in the hex file?

Also, would your Wiki maintainer kindly add your description to the Project Options page.

Re: "Write config on download" -- meaning/use

Posted: Mon Jul 27, 2015 4:15 pm
by Benj
Hello,
So for a PIC device (e.g. 16F88), if I don't tick that box, then no config settings will be included in the hex file?
That is correct. You can see if the config data is included or not by looking near the top of the Flowcode C file.

Might look something like this for an 8-bit PIC.

Code: Select all

#ifdef _BOOSTC
#pragma DATA 0x2007, 0x3F62
#endif
#ifdef HI_TECH_C
__CONFIG(0x3F62);
#endif
#ifdef _BOOSTC
#pragma DATA 0x2008, 0x3FFE
#endif
#ifdef HI_TECH_C
__CONFIG(0x3FFE);
#endif
Also, would your Wiki maintainer kindly add your description to the Project Options page.
This should now be done.