Using MCLR pin at Input


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: Using MCLR pin at Input

    I have this in my program (PBP2.60C) and am using GP3 as an input and it works fine.

    @ DEVICE PIC12F683, intrc_osc_noclkout, wdt_on, mclr_off, protect_off , bod_on

    INCLUDE "ALLDIGITAL.pbp"

    The ALLDIGITAL.pbp just makes sure I have everything set as digital.


    The problem is that the PBP assembler uses mclr and mpasm uses MCLRE , see the .inc file

    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_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_ON & _CP_OFF
            NOLIST
        endif
            LIST

  2. #2
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: Using MCLR pin at Input

    "device pic12F683, intrc_osc_noclkout, wdt_on, mclr_on, protect_off"
    "__config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF"

    I believe to use the MCLRE pin as a digital input these 2 lines must read "mclr_off" and "_MCLRE_OFF"

    Mike

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Using MCLR pin at Input

    Quote Originally Posted by mpgmike View Post
    "device pic12F683, intrc_osc_noclkout, wdt_on, mclr_on, protect_off"
    "__config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF"

    I believe to use the MCLRE pin as a digital input these 2 lines must read "mclr_off" and "_MCLRE_OFF"

    Mike
    But ONLY if you always want it OFF - and then have to remember to change it in the program, when you want it on.

    The inc file is for general use, and idealy should be left unchanged, - you use the config statements in your program to over ride, as per the statement at top of post 3

    @ DEVICE PIC12F683, intrc_osc_noclkout, wdt_on, mclr_off, protect_off , bod_on

Similar Threads

  1. MCLR Pin
    By Aussie Barry in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th July 2013, 08:58
  2. ICSP with MCLR as input
    By Luckyborg in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th June 2013, 16:40
  3. Q: using MCLR for Input on 12F683
    By picster in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 31st January 2009, 15:25
  4. MCLR line input only
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 10th April 2008, 23:14
  5. Mclr As Input Pin?
    By omid_juve in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th December 2007, 06:33

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts