PICKit 2 and 16F57 questions

Author
budiman
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2008/04/14 23:40:18
  • Location: 0
  • Status: offline
2008/04/15 00:06:22 (permalink)
0

PICKit 2 and 16F57 questions

This is  my first time to use Pic mcu.
I just buy Pickit2 Debug Express and a lot of 16F57.
 
I try my project in the demo board and everything is ok.
 
Then I find out that : MPLAB IDE does not support 16F57 for Pickit2, why ?
 
How can I set configuration bit in PICKit2 pgrammer (2.50.00) ?
 
Thank you
 
Budiman
 
 
 
#1

7 Replies Related Threads

    vloki
    always on da run
    • Total Posts : 6583
    • Reward points : 0
    • Joined: 2007/10/15 00:51:49
    • Location: Germany
    • Status: offline
    RE: PICKit 2 and 16F57 questions 2008/04/15 00:35:23 (permalink)
    0
    Hmm, I may be wrong because never used PICkit 2 prog. application
    - but why do you want to set configuration bits here ?

    I guess you did it in the config menue of MPLAB up to now.
    (I prefere to do it in code)

    When you compile your program the configuration bits are included in *.hex file that you get.
    #2
    NY
    Super Member
    • Total Posts : 348
    • Reward points : 0
    • Status: offline
    RE: PICKit 2 and 16F57 questions 2008/04/15 00:51:24 (permalink)
    0
    Hi
    The list of devices supported by PICkit2 can be found in the PICkit2 Readme file (by default, found in C:\Program Files\Microchip\MPLAB IDE\Readmes). You can use PICkit2 only for those devices under the Full Support list or Beta Support list. Other devices are not supported by PICkit2.
     
    Configuration Bit settings can be made either in code or from Configure>Configuration Bits in MPLAB IDE.
     
    More information can be found from the PICkit2 Help file (Help>Topics>PICkit2 in MPLAB IDE).
     
    Regards,
    NY
     
    #3
    budiman
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2008/04/14 23:40:18
    • Location: 0
    • Status: offline
    RE: PICKit 2 and 16F57 questions 2008/04/15 01:05:50 (permalink)
    0
    Well, my problem is I don't know how to do it in code.
     
    How I can  set : CP_ON, RC_OSC , WDT_OFF in code ? (16F57).
     
    Thank you.
     
    Budiman
     
    #4
    vloki
    always on da run
    • Total Posts : 6583
    • Reward points : 0
    • Joined: 2007/10/15 00:51:49
    • Location: Germany
    • Status: offline
    RE: PICKit 2 and 16F57 questions 2008/04/15 01:16:11 (permalink)
    0
    you can have a look at the templates.

    ...Microchip\MPASM Suite\Template\...
    ...
        list      p=16F57             ; list directive to define processor
        #include <p16F5x.inc>         ; processor specific variable definitions

        __CONFIG   _CP_OFF & _WDT_OFF & _RC_OSC

    ; '__CONFIG' directive is used to embed configuration word within .asm file.
    ; The lables following the directive are located in the respective .inc file.
    ; See respective data sheet for additional information on configuration word.
    ...


    the possibilities are listed in *.inc
    ...
    ;==========================================================================
    ;
    ;       Configuration Bits
    ;
    ;==========================================================================


    _CP_ON                       EQU     H'0FF7'
    _CP_OFF                      EQU     H'0FFF'
    _WDT_ON                      EQU     H'0FFF'
    _WDT_OFF                     EQU     H'0FFB'
    _LP_OSC                      EQU     H'0FFC'
    _XT_OSC                      EQU     H'0FFD'
    _HS_OSC                      EQU     H'0FFE'
    _RC_OSC                      EQU     H'0FFF'
    ...

    #5
    budiman
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2008/04/14 23:40:18
    • Location: 0
    • Status: offline
    RE: PICKit 2 and 16F57 questions 2008/04/15 01:25:27 (permalink)
    0
    Thank you very much
     
     
    Budiman
    #6
    FunnyNYPD
    Super Member
    • Total Posts : 1553
    • Reward points : 0
    • Joined: 2007/09/28 20:06:59
    • Location: USA & Canada
    • Status: offline
    RE: PICKit 2 and 16F57 questions 2008/04/15 05:02:46 (permalink)
    0
    You can set the configuration bit with MPLAB.
    Or include the configuration bit info on your source code , it will be added to the hex file automatically.
    #7
    PICkit2Dev
    Super Member
    • Total Posts : 994
    • Reward points : 0
    • Joined: 2006/09/27 08:41:47
    • Location: 0
    • Status: offline
    RE: PICKit 2 and 16F57 questions 2008/04/15 08:10:40 (permalink)
    0
    budiman,
     
    Setting the config bits in code is the best method.
     
    However, please also note that you can set them manually in MPLAB, then select File > Export and export everything to a hex file, including the configuration settings.
    #8
    Jump to:
    © 2017 APG vNext Commercial Version 4.5