12C671 - GP3 problem


Closed Thread
Results 1 to 37 of 37

Hybrid View

  1. #1

    Exclamation 12C671 - GP3 problem

    Hi, I am having problems with GP3 of my 12C671. I am trying to use it as an input along with others (GP0,1,2,...,4). MCLR is off. All are held high with 10K, but pressing GP3 low, does not result in PIC performing accordingly.
    Any ideas please as how I can use this pin properly? Thanks
    ___________________
    WHY things get boring when they work just fine?

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Does your config look something like this?
    Code:
    __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF
    Dave
    Always wear safety glasses while programming.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Does your config look something like this?
    Code:
    __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF
    It is:
    __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_ALL
    ___________________
    WHY things get boring when they work just fine?

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


    Did you find this post helpful? Yes | No

    Wink

    Hi, Finance

    could we see your config and declare stubb ???

    better, whole PBP program if possible ?

    Many, many reasons possible .... and crystal ball saturated.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5


    Did you find this post helpful? Yes | No

    Default

    DEFINE NO_CLRWDT
    DEFINE OSC 4
    Define OSCCAL_1K 1
    @ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_ALL
    '// For PIC12C671
    include "modedefs.bas"

    '// Define variables
    ToTx VAR GPIO.0
    PAUSE 30
    '// OSCCAL=0
    TRISIO = %111110
    OPTION_REG = %10000000
    ToTx = 0
    INTCON=0
    ADCON0.0=0
    ADCON1=7

    send:
    if gpio.1=0 then
    serout ToTx,N2400,["G0"]
    Low ToTx
    pause 10
    endif

    if gpio.2=0 then
    serout ToTx,N2400,["G1"]
    Low ToTx
    pause 10
    endif

    if gpio.3=0 then
    serout ToTx,N2400,["G3"]
    Low ToTx
    pause 10
    endif

    if gpio.4=0 then
    serout ToTx,N2400,["G5"]
    Low ToTx
    pause 10
    endif

    goto send
    end
    ___________________
    WHY things get boring when they work just fine?

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Question

    re,

    1) did you try a simple pin test ??? just to verify pin is still alive ???

    2) did you verify your 10k is Ok ??? ( logic 1 on pin when nothing done )

    Also, Did you try enabling the CLR Watchdog ??? ...

    Do all '671 react like this ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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