disabling the master clear bit MCLR OR MCLRE or using gpio.3 or pin4 or RA3


Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Feb 2011
    Posts
    26

    Default disabling the master clear bit MCLR OR MCLRE or using gpio.3 or pin4 or RA3

    see:
    http://www.picbasic.co.uk/forum/cont...o-your-Program


    disabling the master clear bit MCLR OR MCLRE or using gpio.3 or pin4 or RA3
    see below the ?? for how I did this.

    ??????????????????????????

    Is there a better way to do this than changing the .INC file for each chip??
    Perspiring minds want to know

    doing this:
    @ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF

    gets this error
    [error 118] ... overwriting previous address 2007h
    ??????????????????????????

    Want to use pin4?
    It will only be an INPUT.

    ' WHEN PROGRAMMING PROGRAM $2007.5 TO LOW THIS WILL ENABLE GPIO.3 / RA3 AS AN INPUT
    '
    ' Set the 2007 Register BIT FIVE [5] to ZERO [0] *****************
    ----> I currently do this just before programming in the programmer configuration menu.
    '
    'OR
    ' change the config file
    ' OR IN THE C:\PBP\chip.INC
    ' i.e. C:\PBP\12F683.INC

    change this line to:
    device pic12F683, intrc_osc_noclkout, wdt_on, mclr_off, protect_off

    and this line to:
    __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF

    Code:
    ;****************************************************************
    ;*  12F683.INC                                                  *
    ;*                                                              *
    ;*  By        : Leonard Zerman, Jeff Schmoyer                   *
    ;*  Notice    : Copyright (c) 2005 microEngineering Labs, Inc.  *
    ;*              All Rights Reserved                             *
    ;*  Date      : 08/31/05                                        *
    ;*  Version   : 2.46a                                           *
    ;*  Notes     :                                                 *
    ;****************************************************************
            NOLIST
        ifdef PM_USED
            LIST
            include 'M12F683.INC'	; PM header
            device  pic12F683, intrc_osc_noclkout, wdt_on, mclr_off, protect_off
    ;        device  pic12F683, intrc_osc_noclkout, wdt_on, mclr_on, protect_off
    
            XALL
            NOLIST
        else
            LIST
            LIST p = 12F683, r = dec, w = -302
            INCLUDE "P12F683.INC"	; MPASM  Header
            __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF
    ;        __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF
    
            NOLIST
        endif
            LIST
    Last edited by ofuzzy1; - 23rd February 2011 at 05:00.

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