12F629 Wakes only once


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Try setting bit 7 in OPTION_REG to disable internal pull-ups. WPU powers-up with all internal
    pull-ups enabled, and with OPTION_REG = %01000000 you'll have internal pull-ups ON.

    I suspect it works on mine due to a slight difference in the internal pull-up. That should cure
    it unless you have a problem with your switch circuit.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  2. #2


    Did you find this post helpful? Yes | No

    Default

    trying to use "temp = GPIO.2" without declaring the temp variable is probably your syntax error.

    "temp var byte" (word whatever) near/at the beginning would solve that.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Thanks for your help, guys! OPTION_REG = %1100000 solves the problem. But why does it work the first time, and not the second time????

  4. #4
    Join Date
    Aug 2008
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    Sounds weird to me, have you tried using another chip, is it the same result too?

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Mystery solved: My homemade development board has 3 other PIC sockets, 2 of which are occupied with 2 different PICs, running different programs. All of these parts share the same switch. This switch has a 5K resistor to ground, and pulls to +5V. The 16F688 has it's external interrupt pin connected to the switch, and also had it's internal pullups enabled. With only the 12F629 attached (internal pullups enabled), the voltage on the INT pins was +1V. With both PICS attached, the voltage rises to +2V. The external interrupt pins are Schmitt trigger inputs. The data sheet says the minimum voltage for "a 1, or a high" is 0.8V.
    So the 12F629 was seeing a high when it should have been a low. I have the software set to trigger on the rising edge of the switch, so it went HIGHER, LOWER, and then HIGHER. With both PICS having their internal pullups disabled, the voltage is now +2mv, and all is well. So much for "weak" pullups! As usual, I learned a lesson. Thanks to everyone for your help.

  6. #6
    Join Date
    Aug 2008
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    You're welcome. Glad that your problem is finally solved.

Similar Threads

  1. 12F629 LDR - Light Dependant Resistor
    By Dennis in forum Schematics
    Replies: 15
    Last Post: - 18th February 2010, 23:33
  2. Basic help for 12F629
    By Gene Choin in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd September 2009, 05:06
  3. sleep on 12f629
    By sirvo in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 8th February 2007, 15:08
  4. Servo control with 12F629
    By achilles03 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th June 2005, 00:34
  5. 12F629 I2C problems
    By AIW128ProGuy in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 12th November 2004, 00:41

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