MCLR pin

Status
Not open for further replies.

Cantafford

Member
I have a question about the MCLR pin of the microcontroller.

So basically driving this pin to 0 will erase the program from my pic. But what if the MCRL is disabled in hardware and software via the configuration bits. What does that mean and will it still erase the programming contents from my pic when driven low if it's disabled?
 
So basically driving this pin to 0 will erase the program from my pic.
Not quite..... Driving MCLR low just resets the PC to 0... ( Program counter ) If MCLR is enabled you need to keep it high to run a program and breifly short it to ground to reset the pic...

If it is disabled, then the pin is used as a input ( sometimes an output as well )..
 
And if it's disabled how can I erase the program from the pic?
Or I can just download a hex file on it and it will overwrite the previous one?
 
And if it's disabled how can I erase the program from the pic?
Or I can just download a hex file on it and it will overwrite the previous one?

Same as you always do, by entering programming mode and erasing the PIC - although it's rare to do this without programming it as well, as the first part of programming is wiping of the existing memory.

Disabling MCLR only applies when the PIC is running, so you need to enter programming mode before the PIC can start running - if you don't enter programming mode fast enough, then it won't enter programming mode at all. However, as a user this isn't your problem, it's only a concern for the writer of the programming software (which is how I'm aware of it).
 
Ok, thanks!
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…