12C671 - GP3 problem


Closed Thread
Results 1 to 37 of 37

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Question Update

    Hi, thanks for the reply.
    I did changed the config and enabled the WDT. The code looks like this now:
    Code:
    DEFINE OSC 4
    Define OSCCAL_1K 1
    @ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _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 = %10001000
    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,["G4"]
    Low ToTx
    pause 10
    endif
    
    goto send
    end
    My circuit only gets power when any button is pressed. I can try to scan the paper after drawing the circuit or try to find a software over the net if you think the circuit could be the culprit.
    But I would like to add that rest all the buttons are working fine, so I believe the circuit is ok, GP3 is connected the same way as all other pins. Even the voltage on that pin behaves the same way as on any other pin under same circumstances but no DATA OUTPUT is there.
    ___________________
    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

    Can you try making GPIO3 active high?
    Dave
    Always wear safety glasses while programming.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Yes I can do it to check but I really need to find an answer to make it work Active Low. I will reply with an update with Active High.
    ___________________
    WHY things get boring when they work just fine?

  4. #4


    Did you find this post helpful? Yes | No

    Question

    I tried one method in which I gave continues supply to the PIC for 5v. All pins work fine as expected (Active Low).
    The problem of GP3 only strikes when circuit gets power only when button is pressed and pin is made low.
    ___________________
    WHY things get boring when they work just fine?

  5. #5
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Not sure about the 12C chip, but on 12F series GPIO3 is the MCLR pin and what could be happening is by grounding this you are resetting the PIC - there is a way of disabling the reset function on the 12F series, so you might need to do the same on the 12C chip

  6. #6


    Did you find this post helpful? Yes | No

    Question

    Quote Originally Posted by malc-c View Post
    Not sure about the 12C chip, but on 12F series GPIO3 is the MCLR pin and what could be happening is by grounding this you are resetting the PIC - there is a way of disabling the reset function on the 12F series, so you might need to do the same on the 12C chip
    Hi, I already have disabled the MCLR - (in Config). I also mentioned in the post above that PIC works fine when 5V supply is continues. Thanks
    ___________________
    WHY things get boring when they work just fine?

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


    Did you find this post helpful? Yes | No

    Default

    PIC works fine when 5V supply is continues.
    What exactly do you mean?
    Dave
    Always wear safety glasses while programming.

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