CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Using or not MCLR~

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
gjs_rsdi



Joined: 06 Feb 2006
Posts: 468
Location: Bali

View user's profile Send private message Send e-mail

Using or not MCLR~
PostPosted: Fri May 01, 2020 6:37 pm     Reply with quote

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 Smile

Best wishes
Joe
Ttelmah



Joined: 11 Mar 2010
Posts: 19219

View user's profile Send private message

PostPosted: Sat May 02, 2020 12:25 am     Reply with quote

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.... Sad

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

View user's profile Send private message Send e-mail

PostPosted: Sat May 02, 2020 2:17 am     Reply with quote

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: 9102
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat May 02, 2020 4:58 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Sat May 02, 2020 5:17 am     Reply with quote

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: 9102
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat May 02, 2020 5:58 am     Reply with quote

I'm old and like 40 pin DIPs. They are 'small' to me when compared to Teledyne-Philbrick OpAmps of the 70s !!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group