So do I use
@ MCLR_OFF
or
MCLR_OFF
Hi Darrenmac,
If you have not changed your settings as per Joe S's last post then you are using the PM assembler as this is what Microcode Studio defaults to. In this case see Post#2 in this thread.
If you have changed your settings as per Joe's last post then you need to use:
CheersCode:@ __CONFIG _INTOSC & _MCLRE_OFF
Rob
Hi Darrenmac,
Now after you do all this you will get a compile error telling you you are overwriting the configs . . . that's because you are. In your PBP directory you will have many files with the suffix .inc and the filename will be the number of your PIC. Open it and you will see the following code:
just put a semi colon at the beginning like this:Code:__config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF
save the file and then no more error. This config is the " DEFAULT" config setting in case you forget to put in any config so your program will still work sometimes.<br>Code:;__config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF
Now, why go through all of this? Well suppose you DO NOT want to use the internal oscillator? The DEFAULT configs will not work with a crystal or resonator or EXT oscillator, so do it now and get used to setting the fuses early into your adventure into PIC Magic![]()
Last edited by Archangel; - 21st February 2008 at 12:49.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Still having issues, I think that I am going to be better off by setting them in the programmer. At least I can get it to work. Thanks for every one who has tried to help
Setting them in the programmer works. but if you ever want to just program a chip from a saved hex file, your going to get bit in the behind if you don't remember what settings you used in the programmer. its really a two step operation. PBP is the basic compiler, it creates an assembler file. then either pm or msasm compiler assembles that into your hex file that gets programmed into the chip. the fuse names/settings are written into your basic program but are dependant upon which assembler you use. The assembler is what uses these config commands. PBP passes these to the assembler with the @. so your line would be eitherorCode:@_config MCLR OFFdepending on if pm or msasm is used.Code:@_config MCLRE OFF
thats actuallyorCode:@_config _MCLR_OFFthe hs osc you were trying should beCode:@_config MCLRE_OFForCode:@_config _HS_OSCsomeone please check my writing, i can't see the _'s during preview on here. (not at home and using my phone lol)Code:@_config HS_OSC
Bookmarks