What is the difference between MCLR and switching VDD OFF-ON?


+ Reply to Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,042

    Question What is the difference between MCLR and switching VDD OFF-ON?

    16F18877
    MeLabs U2 USB programmer
    Breadboard powered from wall adapter.


    I just spent an ungodly amount of hours tracking a problem, turned out MCLR was NOT making a "complete RESET". I had to power down the breadboard and turned it back on for programming to take effect completely.

    DAT and CLK only used by MeLabs programmer

    Standard MCLR circuit:
    - MCLR pin on PIC to 10K to VDD
    - MCLR pin on PIC to 100R to MCLR on MeLabs U2 USB programmer
    - MCLR pin on programmer to pushbutton to VSS

    Power:
    - 12V Wall adapter to rocker switch (VDD)
    - rocker switch to DC-DC converter
    - DC-DC converter to breadboard

    My CONFIG in case it's relevant:

    Code:
    #CONFIG
        __config _CONFIG1, _FEXTOSC_OFF & _RSTOSC_HFINT32 & _CLKOUTEN_OFF & _CSWEN_OFF & _FCMEN_ON
        __config _CONFIG2, _MCLRE_ON & _PWRTE_OFF & _LPBOREN_OFF & _BOREN_ON & _BORV_LO & _ZCD_OFF & _PPS1WAY_OFF & _STVREN_ON & _DEBUG_OFF
        __config _CONFIG3, _WDTCPS_WDTCPS_11 & _WDTE_OFF & _WDTCWS_WDTCWS_7 & _WDTCCS_LFINTOSC
        __config _CONFIG4, _WRT_OFF & _SCANE_available & _LVP_OFF
        __config _CONFIG5, _CP_OFF & _CPD_OFF
    #ENDCONFIG
    Last edited by Demon; - 21st October 2024 at 21:26.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,546


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: What is the difference between MCLR and switching VDD OFF-ON?

    the major difference is that a power cycle resets all the bits and pieces that are in play on the breadboard, even the ones that are sulking cause the pic stopped talking to them quite rudely when it was reset
    Warning I'm not a teacher

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,042


    Did you find this post helpful? Yes | No

    Default Re: What is the difference between MCLR and switching VDD OFF-ON?

    Ok.

    So if I wanted a complete reset, I'd be better to do a complete shut-down of power to the entire circuit (USB PIC along with multiple secondary PICs and MCP23017).

    Would a pushbutton to a 555 timer that controls a PNP that feeds the circuit be a good way to do this?
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,037


    Did you find this post helpful? Yes | No

    Default Re: What is the difference between MCLR and switching VDD OFF-ON?

    Why use a 555 and not directly connect the pushbutton to the /MCLR?

    Ioannis

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,042


    Did you find this post helpful? Yes | No

    Default Re: What is the difference between MCLR and switching VDD OFF-ON?

    Quote Originally Posted by Ioannis View Post
    Why use a 555 and not directly connect the pushbutton to the /MCLR?

    Ioannis
    That was my plan. I've been doing that since forever, and it's only now causing problems.

    I'm "guessing" it's because I'm using more and more peripherals in the PICs (timers, Interrupts, ADC, PWM, things I didn't really use much). I'm now using a lot more registers, and I'm guessing some of them are easily offended.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,042


    Did you find this post helpful? Yes | No

    Default Re: What is the difference between MCLR and switching VDD OFF-ON?

    10uF and 100K generate a pulse of 1.1 seconds; should be enough for a complete reset of all ICs.

    https://www.allaboutcircuits.com/too...table-circuit/
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: What is the difference between MCLR and switching VDD OFF-ON?

    one thing that can happen is if you have any +5 volt on any of the peripheral pins, the input to the pins inside the PIC have diodes pointing to the supply voltage and then that 'could' keep the pic from resetting..... then, I don't know what..... maybe back to software instruction to reset....@RESET. Or if you take away/turn off power, would have to turn off the power for all external parts Name:  pic pins.JPG
Views: 200
Size:  92.4 KB

Similar Threads

  1. Display Vdd
    By davesatu in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 14th February 2010, 09:34
  2. ICSP with differents vdd level..
    By sirvo in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th February 2008, 03:29
  3. PIC sinking voltages higher that Vdd???
    By manumenzella in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 27th February 2007, 20:39
  4. Vcc Vdd etc
    By bearpawz in forum Off Topic
    Replies: 11
    Last Post: - 2nd April 2005, 22:49
  5. switching external vref+ and vdd vref
    By alejandro_halon in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th February 2005, 21:13

Members who have read this thread : 9

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