PDA

View Full Version : meProg configuration vs setting fuses in code



AndrewC
- 9th June 2008, 23:21
So I write in Microcode studio, compile and then use a melabs programmer to program my PIC.
Which takes precedence ?

a) Fuse settings I set in my code or
b) the configuration options in "meProg - configuration" ?

If I uncheck the Options/More Options/Program/Configuration in melabs Programmer does that stop the "meProg - configuration" from doing anything ?

Thanks, Andrew

skimask
- 10th June 2008, 04:07
Which takes precedence ?

I don't use the melabs programmer, but I think the order is:
Highest - Programmer options that are ticked (unless the hex file has the config bits in them, then it'll use those unless you start checking/unchecking before writing the hex file)
Next - whatever is in the PBP .inc file for the PIC that you're using.

See this thread to get a handle on it all:
http://www.picbasic.co.uk/forum/showthread.php?t=543&highlight=config+fuse+preset

tenaja
- 10th June 2008, 14:00
So I write in Microcode studio, compile and then use a melabs programmer to program my PIC.
Which takes precedence ?

a) Fuse settings I set in my code or
b) the configuration options in "meProg - configuration" ?

If I uncheck the Options/More Options/Program/Configuration in melabs Programmer does that stop the "meProg - configuration" from doing anything ?

Thanks, Andrew
The MeProg has a menu selection for this. Under Options, the first one (in my version) is Update Configuration From File. If you check this, then the file takes precedence; if not, then the programmer configs do. What I often do for testing purposes is set the fuses in the code, and turn this on before you open the file to program--that makes the programmer accept those PBP config settings. Then, turn off the menu item, make adjustments if necessary, then program.

I always put it back on before closing the program...that way I don't forget it next time and wonder why my 18F configs are set to default again (typically that's what happens when you switch from different PIC types) or all out of whack (what happens when you have two projects with different configs).