PICKit2 - warning about configuration words


Closed Thread
Results 1 to 27 of 27
  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891

    Default PICKit2 - warning about configuration words

    Hello,

    I'm using a 16F88 PIC and every time I program it with my PICKit2, I get this warning:
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2744&stc=1&d=121630516 0">
    The programming will succeed anyway.

    My prog starts like this:
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2746&stc=1&d=121630540 0">

    Something missing/wrong?
    Attached Images Attached Images   
    Roger

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Talking Rtfds !!!

    Hi, Roger

    Generally, you don't care about some fuses cause general use of Pic do not involve their use.

    Each have a DEFAULT setting ( ON or OFF ... type of osc ....)

    Here Pickit just warns you, coz' you didn't care with some ... that's all.

    MPLAB show you the full window ... just look at those you didnt set or clear.

    OR Open the MPLAB 16F88.inc file ( Not the PbP one !!! ) ... you'll find everything there !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi Roger,
    Just off the top of my head, doesn't microchip software use MPASM assembler? If so then you need MPASM formatted config statement, or possibly I am all wet
    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.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    Hi Roger,
    Just off the top of my head, doesn't microchip software use MPASM assembler? If so then you need MPASM formatted config statement, or possibly I am all wet
    Yes, but the output of that assembler (be it PM or MPASM) that the PICKIT2 cares about is the .HEX file, which, for all practical purposes, should be identical to each other.

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Yes, but the output of that assembler (be it PM or MPASM) that the PICKIT2 cares about is the .HEX file, which, for all practical purposes, should be identical to each other.
    See, I don't have a PICKIT2, and what he posted wasn't hex, therefore my MISTAKE was logical. Sorry Roger. Here is the configs avail. for 16f88:
    Code:
    _CONFIG1                    EQU     H'2007'
    _CONFIG2                    EQU     H'2008'
    
    ;Configuration Byte 1 Options
    _CP_ALL                      EQU     H'1FFF'
    _CP_OFF	                     EQU     H'3FFF'
    _CCP1_RB0		    		 EQU     H'3FFF'
    _CCP1_RB3                    EQU     H'2FFF'
    _DEBUG_OFF                   EQU     H'3FFF'
    _DEBUG_ON                    EQU     H'37FF'
    _WRT_PROTECT_OFF             EQU     H'3FFF'	;No program memory write protection
    _WRT_PROTECT_256             EQU     H'3DFF'	;First 256 program memory protected
    _WRT_PROTECT_2048            EQU     H'3BFF'	;First 2048 program memory protected
    _WRT_PROTECT_ALL             EQU     H'39FF'	;All of program memory protected
    _CPD_ON                      EQU     H'3EFF'
    _CPD_OFF                     EQU     H'3FFF'
    _LVP_ON                      EQU     H'3FFF'
    _LVP_OFF                     EQU     H'3F7F'
    _BODEN_ON                    EQU     H'3FFF'
    _BODEN_OFF                   EQU     H'3FBF'
    _MCLR_ON		   		     EQU     H'3FFF'
    _MCLR_OFF                    EQU     H'3FDF'
    _PWRTE_OFF                   EQU     H'3FFF'
    _PWRTE_ON                    EQU     H'3FF7'
    _WDT_ON                      EQU     H'3FFF'
    _WDT_OFF                     EQU     H'3FFB'
    _EXTRC_CLKOUT		    	 EQU     H'3FFF'
    _EXTRC_IO		    		 EQU     H'3FFE'
    _INTRC_CLKOUT                EQU     H'3FFD'
    _INTRC_IO		    		 EQU     H'3FFC'
    _EXTCLK			    		 EQU     H'3FEF'
    _HS_OSC                      EQU     H'3FEE'
    _XT_OSC                      EQU     H'3FED'
    _LP_OSC                      EQU     H'3FEC'
    
    ;Configuration Byte 2 Options
    _IESO_ON                     EQU     H'3FFF'
    _IESO_OFF                    EQU     H'3FFD'
    _FCMEN_ON                    EQU     H'3FFF'
    _FCMEN_OFF                   EQU     H'3FFE'
    I think errors are lines 16,22,23
    Last edited by Archangel; - 18th July 2008 at 03:59.
    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.

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    See, I don't have a PICKIT2, and what he posted wasn't hex, therefore my MISTAKE was logical. Sorry Roger. Here is the configs avail. for 16f88:
    No biggie... Most programmer software needs a HEX file to do the actual programming of the PIC itself. I really can't think of any other file type, other than a straight binary file, that a programmer would use.

    If you look in the P16F88.INC file in your MPASM directory, you'll find all of the various config options listed near the end of that file.
    OR...near the beginning of the M16F88.INC file in your PBP directory if your using the PM assembler rather than MPASM.
    Last edited by skimask; - 18th July 2008 at 04:10.

  7. #7
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default

    I tried to use the config settings as visible in post#5 (original MPASM .INC file). MCS will give me syntax errors when using some of those.

    I.e., instead of "CCP1_RB0", I will have to use "CCPMX_OFF" (see code post #1 for more).

    Then, I compared with the .DEV file found in MPASM too. Looks like this:
    Code:
    # <!-- XML:DCRs:Begin() -->
    cfgbits (key=CONFIG addr=0x2007 unused=0x0)
        field (key=OSC mask=0x13 desc="Oscillator")
            setting (req=0x13 value=0x13 desc="EXTRC-OSC2 as Clock Out" freqmin=32000 freqmax=4000000)
            setting (req=0x13 value=0x12 desc="EXTRC-OSC2 as RA6" freqmin=32000 freqmax=4000000)
            setting (req=0x13 value=0x11 desc="INTRC-OSC2 as Clock Out")
            setting (req=0x13 value=0x10 desc="INTRC-OSC2 as RA6")
            setting (req=0x13 value=0x3 desc="EXTCLK as Port IO" freqmin=32000 freqmax=40000000)
            setting (req=0x13 value=0x0 desc="LP" freqmin=32000 freqmax=200000)
            setting (req=0x13 value=0x1 desc="XT" freqmin=200000 freqmax=4000000)
            setting (req=0x13 value=0x2 desc="HS" freqmin=4000000 freqmax=25000000)
        field (key=WDT mask=0x4 desc="Watchdog Timer" min=1)
            setting (req=0x4 value=0x4 desc="On")
            setting (req=0x4 value=0x0 desc="Off")
        field (key=PUT mask=0x8 desc="Power Up Timer")
            setting (req=0x8 value=0x8 desc="Off")
            setting (req=0x8 value=0x0 desc="On")
        field (key=MCLRE mask=0x20 desc="RA5/MCLR Pin Function Select")
            setting (req=0x20 value=0x20 desc="MCLR")
            setting (req=0x20 value=0x0 desc="RA5")
        field (key=BODEN mask=0x40 desc="Brown Out Detect")
            setting (req=0x40 value=0x40 desc="On")
            setting (req=0x40 value=0x0 desc="Off")
        field (key=LVP mask=0x80 desc="Low Voltage Program")
            setting (req=0x80 value=0x80 desc="Enabled")
            setting (req=0x80 value=0x0 desc="Disabled")
        field (key=CPD mask=0x100 desc="Data EE Read Protect")
            setting (req=0x100 value=0x100 desc="Off")
            setting (req=0x100 value=0x0 desc="On")
        field (key=WRT_ENABLE mask=0x600 desc="Flash Program Write")
            setting (req=0x600 value=0x600 desc="Write Protect Off")
            setting (req=0x600 value=0x400 desc="0000 to 00FF write protected")
            setting (req=0x600 value=0x200 desc="0000 to 07FF write protected")
            setting (req=0x600 value=0x0 desc="0000 to 0FFF write protected")
        field (key=BACKBUG mask=0x800 desc="Background Debug" flags=h)
            setting (req=0x800 value=0x800 desc="Disabled")
            setting (req=0x800 value=0x0 desc="Enabled")
        field (key=CCP1MUX mask=0x1000 desc="CCP1 Mux")
            setting (req=0x1000 value=0x1000 desc="RB0")
            setting (req=0x1000 value=0x0 desc="RB3")
        field (key=CP mask=0x2000 desc="Code Protect")
            setting (req=0x2000 value=0x2000 desc="Off")
                checksum (type=0x0 protregion=0x0-0x0)
            setting (req=0x2000 value=0x0 desc="All")
                checksum (type=0x20 protregion=0x0-0xfff)
    cfgbits (key=CONFIG2 addr=0x2008 unused=0x3ffc)
        field (key=FCMEN mask=0x1 desc="Fail-Safe Clock Monitor Enable")
            setting (req=0x1 value=0x1 desc="Enabled")
            setting (req=0x1 value=0x0 desc="Disabled")
        field (key=IESO mask=0x2 desc="Internal External Switch Over Mode")
            setting (req=0x2 value=0x2 desc="Enabled")
            setting (req=0x2 value=0x0 desc="Disabled")
    # <!-- XML:DCRs:End() -->
    Where's the truth?

    I couldn't find any MCS file about those CONFIG settings syntax correspondances. Maybe the fish is here.
    Roger

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Wink Ayayayayayyyyyyy ...

    Hi, Roger

    With MPASM used ... you're to use MPASM syntax !
    With PM used ... you're to use PM syntax !

    That written ...

    MPASM .INC files give you ALL the settings available ... in the MPASM syntax, of course !!!

    ... capito ???

    and, first of all CCPMX_OFF doesn't exist ... you've to CHOOSE your output Pin ...

    yes ... D.A.T.A.S.H.E.E.T. !!!

    Dur, dur ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  9. #9
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default Ouille, ouille, ouille - Oui, oui, oui....

    MPASM .INC files give you ALL the settings available ... in the MPASM syntax, of course !!! ... capito ???
    ¡Si Señor! I think I know that. So where can I find the correct syntax for MCS then??? Me parece qué esto es más difícil.
    first of all CCPMX_OFF doesn't exist ... you've to CHOOSE your output Pin..
    Hereunder, I highlighted the parameters I replaced by the ones I use normally (in comment) and see what happens (error msg) when the program is compiled by MCS.

    Ah?
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2753&stc=1&d=121639034 1">
    Oh!
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2754&stc=1&d=121639034 1">
    Hmmmm...
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2755&stc=1&d=121639034 1">
    As you can see, some "original" syntax from the MicroChip file won't be accepted in MCS. I understand MCS is not using "as is" all or part of the content of .INC files. Am I really wrong?
    Attached Images Attached Images    
    Last edited by flotulopex; - 18th July 2008 at 15:53.
    Roger

  10. #10
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex View Post
    So where can I find the correct syntax for MCS then???
    It's not so much the correct syntax for MCS, it's more the correct syntax for the compiler/assembler you are using.
    If it's MPASM, the config registers are listed in that particular MCUs INC file in the MPASM directory near the end of the file (usually).
    If it's PM, their listed in that particular MCUs INC file in the PBP INC directory near the beginning of the file (usually).

  11. #11
    Join Date
    Feb 2003
    Location
    Sydney, Australia
    Posts
    126


    Did you find this post helpful? Yes | No

    Default

    OK - first things first.

    Are you compiling with MPASM or the PM assembler ? A look at the Compile and Program Options from the View menu in MCS.

    Here is an example of a config line from a project that uses MPASM:
    @ __CONFIG _CONFIG1H, _IESO_OFF_1H & _FCMEN_OFF_1H & _OSC_INTIO2_1H

    I have also founds that the PicKit2 will complain about this if you do not define every single CONFIG register. I normally define what I know I need to set and leave the rest. It burns and runs fine.

    there are a series of defaults in the .INC file in the PBP folder for each chip.

    For the 16F87 it looks like :
    <code>
    ;************************************************* ***************
    ;* 16F87.INC *
    ;* *
    ;* By : Leonard Zerman, Jeff Schmoyer *
    ;* Notice : Copyright (c) 2004 microEngineering Labs, Inc. *
    ;* All Rights Reserved *
    ;* Date : 01/07/04 *
    ;* Version : 2.45 *
    ;* Notes : *
    ;************************************************* ***************
    NOLIST
    ifdef PM_USED
    LIST
    include 'M16F87.INC' ; PM header
    *** device pic16F87, hs_osc, wdt_on, lvp_off, protect_off
    XALL
    NOLIST
    else
    LIST
    LIST p = 16F87, r = dec, w = -302
    INCLUDE "P16F87.INC" ; MPASM Header
    *** __config _CONFIG1, _HS_OSC & _WDT_ON & _LVP_OFF & _CP_OFF
    NOLIST
    endif
    LIST

    </code>

    It have put *** to hi light the default the compiler will insert. Using PM the program will use the ones you specify in your code rather than the ones in the INC file. Using MPASM you will get warning about over-writing the contents of the CONFIG bits.

    When I moved to MPASM I had to spent a bit of time working out what things were called as some of the names changed. Check out the MPASM INC files to workout what things are called.


    bill

    EDIT: Looking at you original post you are using PM. Just ignore the warnings - its just the PicKit2 being anal about making sure everything is defined.
    Last edited by bcd; - 20th July 2008 at 01:34. Reason: Clarification of original message

  12. #12
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default

    I use PM.

    Thanks for this clarification.

    PICkit2 is really great and I was just wondering about those warning I don't get with other PICs.
    Roger

  13. #13
    Join Date
    Nov 2008
    Posts
    12


    Did you find this post helpful? Yes | No

    Default Problem with pickit2

    I too sometimes have a problem with pickit2 recognizing the 16f88. It will state that the device is unsupported. It always has a problem with the hex file not having a complete configuration. I gave up using the 16F88 with pickit2.

  14. #14
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    The missing CONFIG words are because the 16F88 has two CONFIG words.

    When using PM, DEVICE sets CONFIG1 and DEVICE2 sets CONFIG2.
    Code:
    @ DEVICE  HS_OSC, WDT_OFF, PWRT_ON ; etc
    @ DEVICE2 FCMEN_OFF, IESO_OFF
    Quote Originally Posted by botsmaker
    I too sometimes have a problem with pickit2 recognizing the 16f88. It will state that the device is unsupported.
    Hmmm, that's odd.
    No idea for that one.
    <br>
    DT

  15. #15
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    botsmaker, and others... Have any of you out there updated the OS for the pickit2? I havent had any problems with it programming 16F88 or any other pic's...

    Dave Purola,
    N8NTA

  16. #16
    Join Date
    Nov 2008
    Posts
    12


    Did you find this post helpful? Yes | No

    Default pickit2 warning

    Just updated application software to 2.61 and updated OS to 2.32. I get the same response. It will recon the device when I connect it, then when I load the hex file I get the warning. "Device Error-hex file not loaded", "Unsupported part". I'm using micro studio and PBP.

  17. #17
    Join Date
    Nov 2008
    Posts
    12


    Did you find this post helpful? Yes | No

    Default Warning Message

    This is the warning message I get from pickit2

  18. #18
    Join Date
    Nov 2008
    Posts
    12


    Did you find this post helpful? Yes | No

    Default Use mplabfor 16f88

    I gave up trying to program the 16f88 with the pickit2 application program. Just use the mplab ide and select pickit2 as the programmer. I was able to program the 16f88 just fine with MPLAB. I used the same ic in both cases, so the ic is ok. I don't know what the problem is, but I need to get back to work.

  19. #19
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by botsmaker View Post
    This is the warning message I get from pickit2
    I have gotten that error too, and when it does so it usually sets code protection too!
    The fine print in the pickit2 docs say to reselect the chip ( select another pic and then reselect the one you are using) and then write the chip without selecting a hex, then select your hex and write.
    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.

  20. #20
    Join Date
    Nov 2008
    Posts
    12


    Did you find this post helpful? Yes | No

    Default Pickit2 programs now

    I went back to using the pickit2 with the 16f88 and now it will program. Still get a "hex file not loaded error", but at the end of programming I get the green box.

    The problem is intermittent. I got less failure when running power of the board instead of powering through the pickit2. In other words, it always programmed.

    I did manage to build my own 4 digit meter with a 16f88 and PBP using some of the example code at MEL about driving led displays. This meter will display from 0 to 100.0 volts if you use a rail to rail opamp instead of the LT1077 I got in it now. Below are links to drawing and code.
    Hex
    Code
    Drawing

  21. #21
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    The problem is intermittent. I got less failure when running power of the board instead of powering through the pickit2. In other words, it always programmed.
    Back when I was using a PIC Start I had to add a couple of capacitors across VDD-VSS or it would not program some of the 18Fs.

    Maybe a similar problem???
    Dave
    Always wear safety glasses while programming.

  22. #22
    Join Date
    Nov 2008
    Posts
    12


    Did you find this post helpful? Yes | No

    Default Meter Photo

    I added a photo of the meter at my profile album. I designed a pcb to make up the circuit and had Expresspcb make it. The board can be configured into a frequency counter or event counter. Just load a different program for a new function. Its a multipurpose board. You can also bring out the ports through a 16 pin ribbon connector instead of a 4 digit display.

  23. #23
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Looks like a useful piece of work! I like the dual function idea.
    Dave
    Always wear safety glasses while programming.

  24. #24
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Thumbs up That's it!

    Quote Originally Posted by Darrel Taylor View Post
    DEVICE sets CONFIG1 and DEVICE2 sets CONFIG2.
    Darrel,

    Where a hell did you find this information? Come on, tell us, you're working for the NSA or ex-KGB people, no?

    Anyway, thanks a lot!!!
    Roger

  25. #25
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Where a hell did you find this information?
    It's explained in the PM assembler manual. PM.TXT.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  26. #26
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Bruce knew where it was...

    Quote Originally Posted by flotulopex View Post
    Come on, tell us, you're working for the NSA or ex-KGB people, no?
    I'd tell you, but then I'd have to kill you.
    <br>
    DT

  27. #27
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default maybe he's in the same gang as you

    Brrrrr!!!

    Some freezing sweat drops fall along my back. Okay then, I better never ever ask this question again

    NB: just a shame this info was not in some help file (MCS or PBP); would have been easier to find for me.
    Roger

Similar Threads

  1. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 09:54
  2. Warning: Some configuration words not in hex file
    By Byte_Butcher in forum General
    Replies: 2
    Last Post: - 14th December 2009, 06:25
  3. 16F726 configuration
    By Byte_Butcher in forum General
    Replies: 2
    Last Post: - 8th February 2009, 17:53
  4. running of page warning and error 16f877
    By earltyso in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th November 2007, 01:05
  5. 16F630 OSCCAL value warning - PICKit2
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 3rd September 2007, 19:12

Members who have read this thread : 2

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