PICKit2 - warning about configuration words


Closed Thread
Results 1 to 27 of 27

Hybrid View

  1. #1
    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.

  2. #2
    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.

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    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

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    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 " !!!
    *****************************************

  5. #5
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    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

  6. #6
    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).

  7. #7
    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

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 : 0

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