Config words with PIC24FJxxGA002

Author
rmteo
Super Member
  • Total Posts : 1006
  • Reward points : 0
  • Joined: 2007/05/02 20:33:25
  • Location: Colorado, USA
  • Status: offline
2008/01/07 11:23:10 (permalink)
0

Config words with PIC24FJxxGA002

I have the older style (black button) Pickit2.  I am trying to use if with the following devices:
 
PIC24FJ32GA002, PIC24FJ48GA002 and PIC24FJ64GA002.
 
I am using Ver 2.40.  Here is the last 4 lines of a sample HEX file:
:020000040001F9
:0857F000FFFFFF00FFFFFF00B7
:0857F800FFF900007FBF000073
:00000001FF
 
Per line 3 above, the config words should be:
CONFIG2: 0xF9FF
CONFIG1: 0xBF7F
 
However, when the HEX file is imported, it reports the config words as:
CONFIG2: 0x81F7
CONFIG1: 0x3F5F
The config words are at the right locations (0xABFC and 0xABFE for the 64k device) but do not appear to be correct.  Can you tell me what is wrong here? Thank you.
 
#1

3 Replies Related Threads

    DarioG
    Scheisse Menschen
    • Total Posts : 52408
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: hi there
    • Status: offline
    RE: Config words with PIC24FJxxGA002 2008/01/07 13:07:20 (permalink)
    0
    Hmmm, could it be that some bits are not-implemented?
    How are those CONFIG values defined, in terms of Config-Bits names? (just to re-check)
    #2
    PICkit2Dev
    Super Member
    • Total Posts : 994
    • Reward points : 0
    • Joined: 2006/09/27 08:41:47
    • Location: 0
    • Status: offline
    RE: Config words with PIC24FJxxGA002 2008/01/07 13:07:23 (permalink)
    0
    In this version of the PICkit 2 software, all "unimplemented" configuration bits are masked off to zero. 

    Looking at section 23.1 of the "PIC24FJ64GA004 Family Datasheet", Register 23-1 a bitmask of the configuration bits that are implemented is:
    0x7FDF  (ignoring upper nibble, and with bit 10 included as at one point it was to be an active bit)

    For CW2, all the meaningful bits set to one gives:
    0x87F7

    Applying these masks to the hex file gives:
    CONFIG1: 0xBF7F AND 0x7FDF = 0x3F5F
    CONFIG2: 0xF9FF AND 0x87F7 = 0x81F7

    These are the values you are seeing in PICkit 2.  None of the meaningful bits have changed; it has just masked off the "Don't Care" bits to '0'.

    NOTE: When checking configuration word values, only the meaningful bits as defined in the datasheet should be examined.  The others are "don't care".

    PICkit 2 always has and always will display Configuration Words in the upper portion of the window with unimplemented bits masked off to make them more readable as "don't care" bits are always zero.

    However, presently (v2.40 and earlier) PICkit 2 also programs the PIC24FJ configuration words with unimplemented bits as '0'.  MPLAB the PIC24FJ PICkit 2 support in MPLAB (v8.01) set these bits to '1'.  The next version of the PICkit 2 Programmer software will program them to match MPLAB, with unimplemented bits set as '1'.
    #3
    rmteo
    Super Member
    • Total Posts : 1006
    • Reward points : 0
    • Joined: 2007/05/02 20:33:25
    • Location: Colorado, USA
    • Status: offline
    RE: Config words with PIC24FJxxGA002 2008/01/07 13:16:26 (permalink)
    0
    Moderator, thank you very much.  You are de Best!!!
     
    #4
    Jump to:
    © 2017 APG vNext Commercial Version 4.5