MPLAB Configuration


Results 1 to 5 of 5

Threaded View

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


    Did you find this post helpful? Yes | No

    Default Re: MPLAB Configuration

    Ok, Art

    PM did not call the config options as MPASM does ...

    so, what to do ???

    Open the .inc file corresponding to your processor in the MPASM folder ...

    here: C:\Program Files\Microchip\MPASM Suite

    example for 16F628 ...

    at the bottom of the file, you see :

    ;================================================= =========================
    ;
    ; Configuration Bits
    ;
    ; NAME Address
    ; CONFIG 2007h
    ;
    ;================================================= =========================

    ; The following is an assignment of address values for all of the
    ; configuration registers for the purpose of table reads
    _CONFIG EQU H'2007'

    ;----- CONFIG Options --------------------------------------------------
    _FOSC_LP EQU H'3FEC' ; LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN
    _LP_OSC EQU H'3FEC' ; LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN
    _FOSC_XT EQU H'3FED' ; XT oscillator: Crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN
    _XT_OSC EQU H'3FED' ; XT oscillator: Crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN
    _FOSC_HS EQU H'3FEE' ; HS oscillator: High-speed crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN
    _HS_OSC EQU H'3FEE' ; HS oscillator: High-speed crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN
    _FOSC_ECIO EQU H'3FEF' ; EC: I/O function on RA6/OSC2/CLKOUT pin, CLKIN on RA7/OSC1/CLKIN
    _EXTCLK_OSC EQU H'3FEF' ; EC: I/O function on RA6/OSC2/CLKOUT pin, CLKIN on RA7/OSC1/CLKIN
    _FOSC_INTOSCIO EQU H'3FFC' ; INTRC oscillator: I/O function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN
    _INTRC_OSC_NOCLKOUT EQU H'3FFC' ; INTRC oscillator: I/O function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN
    _FOSC_INTOSCCLK EQU H'3FFD' ; INTRC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN
    _INTRC_OSC_CLKOUT EQU H'3FFD' ; INTRC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN
    _FOSC_ERIO EQU H'3FFE' ; ER oscillator: I/O function on RA6/OSC2/CLKOUT pin, Resistor on RA7/OSC1/CLKIN
    _ER_OSC_NOCLKOUT EQU H'3FFE' ; ER oscillator: I/O function on RA6/OSC2/CLKOUT pin, Resistor on RA7/OSC1/CLKIN
    _FOSC_ERCLK EQU H'3FFF' ; ER oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, Resistor on RA7/OSC1/CLKIN
    _ER_OSC_CLKOUT EQU H'3FFF' ; ER oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, Resistor on RA7/OSC1/CLKIN

    _WDTE_OFF EQU H'3FFB' ; WDT disabled
    _WDT_OFF EQU H'3FFB' ; WDT disabled
    _WDTE_ON EQU H'3FFF' ; WDT enabled
    _WDT_ON EQU H'3FFF' ; WDT enabled

    _PWRTE_ON EQU H'3FF7' ; PWRT enabled
    _PWRTE_OFF EQU H'3FFF' ; PWRT disabled

    _MCLRE_OFF EQU H'3FDF' ; RA5/MCLR pin function is digital input, MCLR internally tied to VDD
    _MCLRE_ON EQU H'3FFF' ; RA5/MCLR pin function is MCLR

    _BOREN_OFF EQU H'3FBF' ; BOD Reset disabled
    _BODEN_OFF EQU H'3FBF' ; BOD Reset disabled
    _BOREN_ON EQU H'3FFF' ; BOD Reset enabled
    _BODEN_ON EQU H'3FFF' ; BOD Reset enabled

    _LVP_OFF EQU H'3F7F' ; RB4/PGM pin has digital I/O function, HV on MCLR must be used for programming
    _LVP_ON EQU H'3FFF' ; RB4/PGM pin has PGM function, low-voltage programming enabled

    _CPD_ON EQU H'3EFF' ; Data memory code protected
    DATA_CP_ON EQU H'3EFF' ; Data memory code protected
    _CPD_OFF EQU H'3FFF' ; Data memory code protection off
    DATA_CP_OFF EQU H'3FFF' ; Data memory code protection off

    _CP_ALL EQU H'03FF' ; 0000h-07FFh code protected
    _CP_75 EQU H'17FF' ; 0200h-07FFh code protected
    _CP_50 EQU H'2BFF' ; 0400h-07FFh code protected
    _CP_OFF EQU H'3FFF' ; Program memory code protection off

    ;----- DEVID Equates --------------------------------------------------
    _DEVID1 EQU H'2006'

    ;----- IDLOC Equates --------------------------------------------------
    _IDLOC0 EQU H'2000'
    _IDLOC1 EQU H'2001'
    _IDLOC2 EQU H'2002'
    _IDLOC3 EQU H'2003'

    LIST
    All what you are looking for is here ... with the right spelling !

    ah ... take care to check it for every processor you use as options spelling is not always consistent from a chip to another ...
    ( a Microchip specialty ... )

    Moreover ... I strongly suggest to you to update MPLAB to the last available version ...
    http://ww1.microchip.com/downloads/e...B_IDE_8_92.zip

    so your Pickit2 ...
    http://www.microchip.com/stellent/id...cName=en023805

    Alain
    Last edited by Acetronics2; - 14th October 2013 at 15:01.

Similar Threads

  1. Replies: 6
    Last Post: - 29th December 2011, 21:39
  2. Configuration of 18F268x
    By Mike2545 in forum General
    Replies: 6
    Last Post: - 2nd October 2011, 18:02
  3. 16F726 configuration
    By Byte_Butcher in forum General
    Replies: 2
    Last Post: - 8th February 2009, 17:53
  4. Configuration...again...?
    By Ruben Pena in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th September 2008, 23:44
  5. Configuration bits
    By Perrin` in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 3rd July 2008, 14:40

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