Fuses? Switches? Pic settings help!! MCS5 help


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    262

    Default Fuses? Switches? Pic settings help!! MCS5 help

    I have upgraded to PBP3 gold and the PicKit 3, and its a bit different to program chips now. so I need some help in my processes of how to go about making some settings changes. before: using MCS4 I would make my rogram and compile a HEX file, then I would open my software (chinese programmer) load my HEX file, open FUSES, set my OSC, WDT, MCLR, Etc... , then Hit program and thats it. currently: My MCS5 handles my PicKit 3 programmer directly, however I cannot find a location anywhere to set my Fuses/Switches. Is there a way? if not am I going to have to hard code my "defaults" I like in the Chip .inc files, or will I have to do it with code each time Usually all I used to do is turn off WDT, MCLR, Brownout, and set my OSC to internal, however there are times I want to use a crystal or ttl clock.
    Chris


    Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."

  2. #2
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: Fuses? Switches? Pic settings help!! MCS5 help

    i'm by no means an expert and I have not tried the pickit3 (I have and love my pickit2)
    I also have PBP3

    you should be able to set your configuration bits by doing something like the following...

    Code:
        #IF __PROCESSOR__ = "16F1828"
            #CONFIG
            __CONFIG _CONFIG1, _FOSC_INTOSC & _WDTE_ON & _PWRTE_OFF & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOREN_OFF & _CLKOUTEN_OFF & _IESO_OFF & _FCMEN_OFF
            __CONFIG _CONFIG2, _WRT_OFF & _PLLEN_OFF & _STVREN_OFF & _BORV_25 & _LVP_OFF
            #endconfig
        #ELSE
            #IF __PROCESSOR__ = "16F690"
                #CONFIG
                __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_OFF & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOD_OFF & _IESO_OFF & _FCMEN_OFF
                #endconfig
            #ELSE
                #ERROR "Program does not support " + __PROCESSOR__
            #ENDIF
        #ENDIF
    
        #msg "compiling for target " + __PROCESSOR__
    The above allows you to set the configuration bits for more than one processor.

    NOTE: some of the configs above begin with just 1 underscore "_" and some have two
    and I believe it is important to get that correct.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,520


    Did you find this post helpful? Yes | No

    Default Re: Fuses? Switches? Pic settings help!! MCS5 help

    Hi,

    Open up the manual and look at the #CONFIG, #ENDCONFIG directives. Then open up the DEVICE_REFERENCE folder in the PBP3 installation directory and look at the file for your particular target device, it will show you exactly what the PBP default configuration for that device IS and all the available options.

    The "format" of what goes in between the #CONFIG and #ENDCONFIG directives depends on the device family, PIC16, PIC18 etc so it looks a little bit different.

    /Henrik.

  4. #4
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Fuses? Switches? Pic settings help!! MCS5 help

    As I recollect when MCSPBP installs it creates an INFO folder. In that folder, for at least most of the PICs, there is file showing the format of the configs and what fuses are available but most importantly what they're called. Just copy and paste, delete what you don't need and/or comment out what you don't need.

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


    Did you find this post helpful? Yes | No

    Default Re: Fuses? Switches? Pic settings help!! MCS5 help

    Hi,

    Remember that as soon as you place the #CONFIG/"ENDCONFIG block in your program it replaces ALL PBP defaults.
    So you need to include ALL configs that you need to change from the whatever is the default when the flash is cleared - which you need to look up in the datasheet. It's usually best to copy the PBP defaults and change/add what you want.

    /Henrik.

  6. #6
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    262


    Did you find this post helpful? Yes | No

    Default Re: Fuses? Switches? Pic settings help!! MCS5 help

    Thanks for the quick reply's! Henrick, I just ordered my cd and manual, I had forgotten to download the PDF manual. Just did that. reading it now, however sometimes its a bit hard to read ebook version. I can't wait to get my paper copy. a few questions, looking at your code " if this processor then.." could I make a bas file with all the processors I use and just do an include to pull it in? if so, can I use REM " ' " to make notes on it also?
    Chris


    Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."

  7. #7
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,520


    Did you find this post helpful? Yes | No

    Default Re: Fuses? Switches? Pic settings help!! MCS5 help

    Hello,

    a few questions, looking at your code " if this processor then.." could I make a bas file with all the processors I use and just do an include to pull it in? if so, can I use REM " ' " to make notes on it also?
    Well, it wasn't me posting the code but yes you can do all of that if you want.

    /Henrik.

  8. #8
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    262


    Did you find this post helpful? Yes | No

    Default Re: Fuses? Switches? Pic settings help!! MCS5 help

    hehe sorry henrick, i glanced at the name to quick, it was hecklers code. but thanks for the help. ill try it.
    Chris


    Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."

Similar Threads

  1. Hall-effect Switches and pic Inputs
    By andybarrett1 in forum Schematics
    Replies: 4
    Last Post: - 3rd October 2014, 16:21
  2. Replies: 17
    Last Post: - 15th March 2013, 23:11
  3. Controlling switches with a PIC
    By TonyA in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 4th March 2008, 22:44
  4. Coding Style - PIC 18F4620 config fuses
    By BrianT in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th January 2008, 20:05

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