PIC12f683 GPIO.0 Trouble


Results 1 to 12 of 12

Threaded View

  1. #1
    Join Date
    Dec 2012
    Location
    Georgia, USA
    Posts
    20

    Default PIC12f683 GPIO.0 Trouble

    Trying to build small power reset circuit using a PIC12f683.
    When GPIO.1 goes high, I set GPIO.0 high to MPS2222
    Transistor to make the circuit. Trouble is GPIO.0
    dosen't go low, or if it does it's only for a MS, then goes high again.
    and PIC12F683 starts to get hot.

    Code:
    '************************************************* ***************
    '* Name : RelayHold.BAS *
    '* Description : Pull Relay and Hold 15 seconds *
    '************************************************* ***************



    PRELAY Var GPIO.0 'Pull Relay turn off power to old controller 15 seconds
    RESETME Var GPIO.1 'GPIO.1 to Wait For 1 to Go High From Old Controller
    STAT Var GPIO.4 'Alias GPIO.4 to Turn on LED while relay is on


    ANSEL = 0 'Set all digital

    CMCON0 = 7 'Analog comparators off
    TRISIO =101110 'Set Pin I or O

    low STAT
    low PRELAY


    mainloop:

    If RESETME = 1 Then 'PIC Requesting Reset
    gosub ReSet_Ctrllr
    Endif
    Goto mainloop ' Do it forever

    End

    ReSet_Ctrllr:

    High PRELAY 'Turn on Relay connected to GPIO.0 to power cycle old controller
    High STAT 'Turn On LED If Present
    PAUSE 15000 'Hold Relay High for 15 seconds
    low PRELAY 'Turn Off Relay connected to GPIO.0
    low STAT 'Turn Off LED If Present
    PAUSE 50000 '50000 ' Give Old Controller Chance to Recover Pause about a minute

    return

    See attached drawing for details.

    Thanks in advanced,

    Larryd
    Attached Images Attached Images  

Similar Threads

  1. 12F683: I change GPIO.5 but GPIO.0 also changes...why?
    By chicowoodhill in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th December 2012, 17:09
  2. Replies: 1
    Last Post: - 29th February 2012, 09:37
  3. Trouble with PIC12F683 - GP0 GP1 as inputs
    By erice1984 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 30th March 2009, 04:32
  4. pic12F683 , gpio.5 not accessible...
    By flipper_md in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 9th May 2008, 05:25
  5. Using the pic12F683
    By TonyA in forum General
    Replies: 2
    Last Post: - 6th April 2006, 12:46

Members who have read this thread : 1

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