Config fuse i n PBP3.0 - PIC16F828A


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2013
    Posts
    2

    Default Config fuse i n PBP3.0 - PIC16F828A

    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,
    IapIllc

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

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,519


    Did you find this post helpful? Yes | No

    Default Re: Config fuse i n PBP3.0 - PIC16F828A

    Hi,
    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:
    Code:
    #CONFIG
          __config _XT_OSC & _WDT_OFF & _MCLRE_OFF & _LVP_OFF & _CP_OFF
    #ENDCONFIG
    Note the double underscore in __config and make sure to indent it.

    /Henrik.

  3. #3
    Join Date
    Jan 2013
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: Config fuse i n PBP3.0 - PIC16F828A

    Thank you Henrik,
    It works.

  4. #4
    Join Date
    Mar 2013
    Posts
    1


    Did you find this post helpful? Yes | No

    Default Re: Config fuse i n PBP3.0 - PIC16F828A

    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.
    But:
    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

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,519


    Did you find this post helpful? Yes | No

    Default Re: Config fuse i n PBP3.0 - PIC16F828A

    Hi,
    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.

    /Henrik.

Similar Threads

  1. 18F2620 pbp3 example config please
    By retepsnikrep in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 17th December 2014, 01:49
  2. 18F1220 fuse help
    By mr.sneezy in forum General
    Replies: 6
    Last Post: - 24th May 2010, 14:54
  3. Help with config fuse?
    By polymer52 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 27th December 2009, 21:14
  4. fuse options in pbp
    By comwarrior in forum General
    Replies: 10
    Last Post: - 2nd August 2009, 23:07
  5. Fuse Error
    By eoasap in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 29th October 2005, 15:42

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts