View Full Version : Config fuse i n PBP3.0 - PIC16F828A

- 22nd January 2013, 22:27
Hello Dear,

I built a circuit and ran the LED on off code. I am using U2 programmer. I got an error 'ilegal opcode' when I defined the config fuses in the code. The code works fine without config fuse inserts but then I have to pick them in the programmer every time I download the code into the chip. Is there a way around?

Thank you,

Oops! I typed 828A instead of 628A in the subject line and I can't change it now.

- 23rd January 2013, 07:10
If you have PBP3 you should enclose your config directive in a #CONFIG / #ENDCONFIG block. When such a block is found in the PBP source file it will replace the default config in the device specific include file without the need to edit that file. Example:

__config _XT_OSC & _WDT_OFF & _MCLRE_OFF & _LVP_OFF & _CP_OFF

Note the double underscore in __config and make sure to indent it.


- 23rd January 2013, 17:36
Thank you Henrik,
It works.

- 4th March 2013, 02:22
Hi , I'm new here, upgrading from stamp based projects as I've exceeded their limits.
Steep learning curve right now
Also having reg. CONFIG1/ #config issues, I think I have seen the answers here.
When I see the word "fuses" I get nervous
Are these a pgm once and forever sort of thing? Or are these some kind of EEPROM that can be changed?
What I'm doing is developing a MIDI based product [serial 31.25 kbd.] but the internal 8mhz oscillator doesn't seem to get me that baud rate.
So I'm trying to use a 16meg external xtal instead Using PIC16F887

- 4th March 2013, 07:21
No need to worry, as long as you don't use OTP-parts the "fuses" are reprogrammable - just as the program flash.
Even if you set read and write protection you can always ERASE the PIC to get back to square one.