View previous topic :: View next topic |
Author |
Message |
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
Using or not MCLR~ |
Posted: Fri May 01, 2020 6:37 pm |
|
|
Hi
Until now I am always using MCLR pin as MCLR~
I would like to know the opinion of people with more knowledge than me if to use/not to use MCLR pin for reset and what are the reasons for using.
Any opinion will be much appreciated
Best wishes
Joe |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Sat May 02, 2020 12:25 am |
|
|
What actual circuit do you connect to the MCLR pin?.
If it is anything very simple like an RC network, then it is probably pretty
pointless. You might as well just let the chips own reset circuit handle this.
However if you are not using PUT, then consider adding this. You may
otherwise find that the circuit behaviour changes as the chip wakes much
quicker compared to the rest of the circuit.
However 'caveat'. The MCLR pin if used as an input, is a slightly 'dangerous'
pin. It does not have any input protection circuit, stopping it going above the
supply rail. If it does go above the rail, you risk the chip 'thinking' it is
being reprogrammed, and at the least resetting or locking, and in some cases
damage to the code....
If you are always programming the chip by taking it out of the board,
then simply add your own protection diode to this pin. This then avoids
problems.
The key reason to use MCLR, is that it does allow you to ensure the
chip resets 'in sync' with other things. If (for example) you use an
external RESET control chip that makes sure the power is stable before
releasing the line, this allows well timed 'wake up' from all the components. |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
|
Posted: Sat May 02, 2020 2:17 am |
|
|
Thank you for the answer Ttelmah.
I will continue using the MCLR pin as MCLR and not taking any chances.
Best wishes
Joe |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Sat May 02, 2020 4:58 am |
|
|
One of the benefits of using a 40 pin PIC is keeping ICSP pins AS ICSP pins and not having to 'share' them with other demands.
As Mr. t points out , you need to read and consider several facots when using the MCLR~ as an input. Been 'bit' by that long,long time ago..... |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
|
Posted: Sat May 02, 2020 5:17 am |
|
|
Hi Temtronic
I never used the MCLR pin for something else that MCLR (and VPP of course)
The reason I asked the question is to understand why I am always using MCLR pin for MCLR.
In the past with PIC16F876 I was using also an external reset chip.
I am using PIC18F26K22 because is 28 pin and I can't afford SMD. The PIC18F46K22 is too big as DIP.
Regarding the ICSP, I am using TX & RX 2 so when I am programming I have just to disconnect a connector.
Best wishes
Joe |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Sat May 02, 2020 5:58 am |
|
|
I'm old and like 40 pin DIPs. They are 'small' to me when compared to Teledyne-Philbrick OpAmps of the 70s !! |
|
|
|