MCLR Question.


Closed Thread
Results 1 to 7 of 7

Thread: MCLR Question.

  1. #1
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216

    Question MCLR Question.

    G'day again everyone.
    Today's question is: Is there any consequence of holding MCLR low for an extended period of time (could be days). The rest of the chip and all other parts of the circuit are powered up normally. I just want to start the thing working by removing the low on MCLR and let it rise to 5v via its pullup R. Also, under these actions, what would be the state of the program while in reset? Does reset send the program back to the beginning at the falling edge, the low level or the rising edge??? And what would be the state of the output pins while in reset??
    I know this probably is not the kosher way to control a device, but it is what needs to be done...(trust me), so I don't really want to hear all the alternatives, just intrigued by the answer to the questions
    Thanks, in advance, for the great responses I know I will get.
    Peter Moritz.

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink Sleep while snoring ...or not ?

    Hi, Peter

    This question is quite difficult to answer ...as we all have left a circuit "a certain time" under reset, and probably none had further problems.

    I think the best way could be to post your thread on Microchip's users Forum or to Microchip support team ... They're great pros.

    you should get a trustable answer from a Microchip product Engineer ...

    Alain

    PS: I left Logic CMOS circuits for very long time in the "reset" state ...so why wouldn't the PIC's do the same ??? ...
    Last edited by Acetronics2; - 5th September 2005 at 09:25.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default

    There is no problem with doing this.

    The PIC will start your program normally from the beginning, once MCLR rises above it's threshold and POR timesout and the other conditions for running such as Vdd and Oscillator are present.

    The state of the internal Registers will be as per the table found in the back of the Datasheet for your PIC in the section "Special Features of the CPU". Read the section on Reset to determine how your PIC handles the condition.

    Do not rely on your program variables being zeroed on start-up (you shouldn't anyway).

  4. #4
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Thanks people.
    Mel, the real part I need to know is what do the ports do, while in reset, ie do they turn off, or on, or no change? They will be off'ed at startup, but is a semi permanent reset equivelent to "startup"?, Intriguing, ain't it?
    Where do I come up with these bloody questions??

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink Wake up !!!

    Hi Peter

    At reset ( or power up ...) all ports are INPUTS ...but output flip flops do not have a specific reset value ...
    that's why, it's better to write output values at start before defining inputs and outputs ...

    read you soon ...
    Alain

    PS: hi, Mel
    sometimes output values have to bet set to 1 at power up !!! ... with no "0 " transients allowed !!! Programmable curve Electronic ignition program available today ... which shows it ... don't say it's pure assembler to the list !!!
    Last edited by Acetronics2; - 5th September 2005 at 12:05.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default

    Datasheet!

    If you Power-On your PIC yet hold MCLR Low, your PIC will be in the Power-On start-up state until MCLR goes high. Port I/O's will be INDETERMINATE. They can be pulled High, or Low or be High-Impedance Input.

    Only once you've set TRIS and assigned an initial I/O state, subsequently then when MCLR goes low, the I/O's will REMAIN in the state prior to MCLR stopping the show.

    Let me reitterate in case you missed it, if you've never run your PIC following power-on (because MCLR is being held low), you CANNOT guarantee the state of the I/O's.

    Read the Datasheet for your PIC.

  7. #7
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Right, thanks heaps Mel.
    Funny as it may seem that's just what I figured after reading, in more detail, about various chips. It's good to have someone who knows these things inside out to agree with me.
    That comes from working with PICs all day, every day as I gather from your various posts.

    Thanks again Mel, and Alain.
    Your sort of comitment to this gear is what makes this a great forum for the old twits like me.

Similar Threads

  1. Question on using MCLR pin for interupt. (PIC12F683)
    By g-hoot in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 7th February 2009, 02:15
  2. Silly MCLR question
    By kevj in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th November 2007, 03:12
  3. Please answer my first question
    By John_001 in forum Off Topic
    Replies: 1
    Last Post: - 15th September 2006, 06:49
  4. What does this MCLR instruction mean?
    By bartman in forum General
    Replies: 16
    Last Post: - 30th November 2004, 00:32
  5. I/O pin and MCLR
    By Dwayne in forum FAQ - Frequently Asked Questions
    Replies: 1
    Last Post: - 15th July 2004, 10:52

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