16f1824 MCLR pin going low causes PIC to reset - what am I missing?


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: 16f1824 MCLR pin going low causes PIC to reset - what am I missing?

    Quote Originally Posted by rsocor01 View Post
    Are you using an external pullup resistor for your switch configuration?

    no...if i'm reading the datasheet correctly, it is possible to use a weak pullup for that pin, which is what i've done...

    Code:
    OPTION_REG.7 = 0
    WPUA =  %00011000
    IOCAN = %00011000

  2. #2
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: 16f1824 MCLR pin going low causes PIC to reset - what am I missing?

    Quote Originally Posted by HankMcSpank View Post
    no...if i'm reading the datasheet correctly, it is possible to use a weak pullup for that pin, which is what i've done...
    Hmmm, try using an external resistor (maybe 4.7K Ohms) and see if you have the same problem. You might be drawing too much current when closing the switch and that might be causing the problem.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  3. #3
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: 16f1824 MCLR pin going low causes PIC to reset - what am I missing?

    just tried an external pullup resistor on RA3 (vs internal weak pullup)- same results.....if I ground RA3 (MCLR pin), the PIC resets

    ...aaaaaaarrrrgggHHHH

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


    Did you find this post helpful? Yes | No

    Default Re: 16f1824 MCLR pin going low causes PIC to reset - what am I missing?

    Before programming your PIC, you've checked the configuration bits in your device programmer software and they match your code right?

    Are you sure your programmer do it right?
    Steve

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

  5. #5
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: 16f1824 MCLR pin going low causes PIC to reset - what am I missing?

    If it helps, I'm using a Pickit2 programmer ...whilst I've been away from all of this for a while, I don't recall having to do anything special previously wrt the programmer when using RA3 as a digital input (albeit probably using a different chip).

    Just moved the Sitch off RA3...to another input pin, device is not resetting now whe the switch is pressed, so it is definitely related to when RA3 goes low, the 16f1824 is resetting!

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


    Did you find this post helpful? Yes | No

    Default Re: 16f1824 MCLR pin going low causes PIC to reset - what am I missing?

    post your .hex files here, just for double-checking purpose.

    Are your compiling under MPLAB or MCS?

    Still on PBP 2.60?
    Steve

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

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


    Did you find this post helpful? Yes | No

    Default Re: 16f1824 MCLR pin going low causes PIC to reset - what am I missing?

    A shot in the dark, but what if you add
    _LVP_OFF
    to config_2
    Dave
    Always wear safety glasses while programming.

  8. #8
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: 16f1824 MCLR pin going low causes PIC to reset - what am I missing?

    Quote Originally Posted by mackrackit View Post
    A shot in the dark, but what if you add
    _LVP_OFF
    to config_2
    "A long shot....but it might just work" (as they say in the movies), and whaddayaknow.....

    BINGO!

    with _LVP_OFF ....no resetee, ....*but* without that _CONFIG2 entry, my 16f1824 resets every time RA3 goes low.


    So Mr Mackrackit ...choose any cuddly toy from the top shelf!

    How bizarre - many thanks, it would have taken me a few weeks to get that one! (& it's just come flooding back why I took a break from these puppies in the first place - ie. somtimes they're *way* obtuse!)


    Thanks for *everyone's* input!
    Last edited by HankMcSpank; - 6th May 2012 at 18:12.

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