Weak pullups failing?


Closed Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Oct 2004
    Posts
    448

    Default Weak pullups failing?

    I have a 16F676, with a couple of switches on the port 'A'. I had enabled the internal weak pullups, and they seemed to be working fine. Until now...

    The circuit started behaving very unexpectedly, till I noticed that the internal pullups did not seem to be doing their job; it was as if the switches were all permanently pressed. I confirmed this by using a fresh device, which worked perfect.

    Now, I wonder how safe is it to rely on the inernal pullups? Is this likely to happen again? To be fair, this is the first time I've had a pic go bad in this particular fashion.

    Regards,

    Anand

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default What about comparators?

    Did you disable comparators ?


    ----------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Sure thing; as I mentioned, a fresh chip works flawlessly.

    Regards,

    Anand

  4. #4
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ardhuru
    .....

    Now, I wonder how safe is it to rely on the inernal pullups? .....

    Anand


    Check this post here:
    http://www.picbasic.co.uk/forum/show...t=weak+pullups

    Look especially at what Melanie says about Weak Pullups.


    Regards.



    ----------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  5. #5
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    I've started sharing Steve's apprehensions about weak pullups after reading that thread.

    Again, its the first time (and on the first device) after having used them many times in the past that this has happenned to me, but then if t *can* happen at all, maybe it would be safer to have external pullups.

    Regards,

    Anand

  6. #6
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    There is no problem with weak pull-ups on switches...

    How are you enabling them?

    Apart from OPTION_REG you also have to set them in the WPUA register in this chip.

  7. #7
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default

    Reading the data sheet of my 16F88, I can't find the way how to enable pull-ups on PORTB one by one.

    I don't understand what "latch" means (in french, latch is translated as a kind of lock)?

    Bit 7 of OPTION_REG sais: "PORTB pull-ups are enabled by individual port latch values".

    Does it that mean you have to enable the pull-ups for all PORTBs and then, if you'd like to disable it for one or another port, to set this port as an output?

    There are no pull-ups for PORTA. Is this correct?
    Roger

  8. #8
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    flotulopex, Yes that is correct. There are no pullups available for porta..

    Dave Purola,
    N8NTA

  9. #9
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    OPTION_REG.7=0 will enable ALL PortB weak pull-up's for this PIC. You cannot enable or disable pull-up's on an individual basis on this device. You are correct that this PIC doesn't have pull-up's on PortA.

  10. #10
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie
    There is no problem with weak pull-ups on switches...

    How are you enabling them?

    Apart from OPTION_REG you also have to set them in the WPUA register in this chip.
    Hi Melanie,

    (this is a 16F676)
    OPTION_REG.7 = 0 ' ENABLE WEAK PULLUPS
    WPUA = 255 ' ALL PULLUPS ON

    Since a fresh chip works flawlessly, I do not think the issue is to do with the code or configuration. From your mail and the earlier ones, I gather that this is an extremely rare happenning. Just how rare is my worry; often enough to justify external pullups?

    Anand

  11. #11
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    If this is anything other than a random happening then I'm in deep sh*t, because my top ten best selling designs all use weak pull-up's. Never, ever had a single return that has a fault on a pull-up input - and that's after years of sales...

  12. #12
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    mmm, i don't know but you really have a PIC with a faulty internal pull-up?
    If you add a external pull-up it works?

    Is there any chance somewhere in your code some pin change from input to output? in this case it could disable some internal pull-up but...

    Maybe some electrostatic discharge burned it? but if so... i guess it should go deeper than only the internal weak pull-up no? Strange...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  13. #13
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    mmm, i don't know but you really have a PIC with a faulty internal pull-up?
    If you add a external pull-up it works?

    Is there any chance somewhere in your code some pin change from input to output? in this case it could disable some internal pull-up but...

    Maybe some electrostatic discharge burned it? but if so... i guess it should go deeper than only the internal weak pull-up no? Strange...
    Yes, I think that last part should be it. I have an ICSP arrangement, with +5 to the target being supplied exclusively from an external supply. At times, when I'm not working on the project, this supply is switched off. And the programmer (an Epic clone), still connected to the PC, keeps the Vcc (not an issue in this case) *and* Vpp high, unless the programmer s/w (WinPic800) is initialised (loaded). The Pic therefore is exposed to Vpp without getting Vcc.

    I think this kind of abuse might have caused the damage.

    And yes, I confirm that external pullups work.

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


    Did you find this post helpful? Yes | No

    Default

    Do you have a 0.1uF capacitor across the supply lines as near to the PIC. I found that without this I would sometimes have strange issues with the way a PIC would behave. Maybe this has some bearing on the problem here ?

Similar Threads

  1. 16C65B internal pullups
    By Michael in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 20th January 2009, 16:26
  2. Pullups and pulldows
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 1st April 2008, 21:15
  3. dual 7-segment countdown timer code
    By dr.ragh in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 30th April 2007, 13:19
  4. Effects of Current Draw Using Internal VS External PullUps
    By rixtalbert in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th September 2006, 09:43
  5. Pullups DS18S20 and DS1307
    By DynamoBen in forum General
    Replies: 1
    Last Post: - 27th July 2006, 18:32

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