Circuit will not power up initially - 12F629


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Location
    Fayetteville Arkansas
    Posts
    44

    Default Circuit will not power up initially - 12F629

    This is the segment of code at the beginning on of my program. On startup Power (pin 2) is suposed to go High to activate powering up an external item. Does anyone see anything that would prevent this? It just sits in a Low condition.

    @ DEVICE pic12F629, INTRC_OSC_NOCLKOUT ; System Clock Options
    @ DEVICE pic12F629, WDT_ON ; Watchdog Timer
    @ DEVICE pic12F629, PWRT_ON ; Power-On Timer
    @ DEVICE pic12F629, MCLR_OFF ; Master Clear Options (Internal)
    @ DEVICE pic12F629, BOD_OFF ; Brown-Out Detect
    @ DEVICE pic12F629, CPD_ON ; Data Memory Code Protect
    @ DEVICE pic12F629, PROTECT_OFF
    ' I/O definition
    TRISIO = %00011000
    ;
    'WEAK PULLUPS
    WPU = %00100111
    ;
    ' Variable Definition
    POWER VAR GPIO.5
    DNITE VAR GPIO.4
    TRIGGER VAR GPIO.0
    INPUT dnite
    BO VAR word
    ;
    'SET BO COUNTER TO 0 INITIALLY
    BO = 0
    ;
    ; Set External interrupt (GPIO.2) with falling edge trigger...
    OPTION_REG = %00001000 ; Falling edge trigger on GP.2
    CMCON = 7
    INTCON = %10000000 ; Set GIE - clear interrupt enable bit and flags.
    ;
    'BODY OF CODE BEGINS
    high power
    pause 15000
    low power
    GOTO BASE ; Skip past interrupt handler

  2. #2
    GregK's Avatar
    GregK Guest


    Did you find this post helpful? Yes | No

    Default

    Hi

    I had a similar problem with a 12F683. Read Bruce's reply to my thread "12F683 Startup" posted on March 17. Look and compare both chips, I believe they have similar features. If they do, I would replace your settings with his.

    A couple things I see missing are: OPTION_REG.7 = 0 'Enable internal p/u's., ANSEL = 0 'If all digital inputs, CMCONO = 7 'Comparators off. Also your internal pullups don't match your TRIS settings, pullups only on inputs.

    Are you properly interfacing the output pin to the load? I believe 20ma. max.

    Hope this helps.

    Greg

Similar Threads

  1. Circuit Design Question
    By bradb in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 11th August 2009, 08:18
  2. PIC backup power supply: switchover ???
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 18th April 2008, 17:05
  3. Circuit reliability issues
    By hkpatrice in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd November 2007, 14:55
  4. 12F629 Strange interupt behavior
    By BGreen in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 25th May 2007, 15:35
  5. Programming 12F629 low power (Sleep)
    By Warrier in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 29th November 2004, 14:45

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