Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Why must set MCLR to 5v???

Status
Not open for further replies.
I bet he hooked a led to mlcr and 5volts vdd it lights up and looks good better have resistor there with that led. That's it maybe ??
 
Last edited:
1st, i feed a music to my RA0 as ADC input, then i just ADC the input and display all to my PORTB. When i got connect the MCLR to 5V, the LED look all turn on.If i dint not connect MCLR, the LED from RB0_RB7 will follow the music amplitude to light on.If amplitude high,led turn all on,if low.....
 
To answer your title question, MCLR is a pin that resets the PIC. Its not an input/output pin. By applying 5V to it, you ensure that your code runs from start to end. If its connected to gnd, then your code does not run, at all. It resets the address to the very beginning and just sits there. If you leave it unconnected (ie. floating), you can get something called floating ground. Basically, sometimes the code will run, and sometimes it wont.
 
I have a hard time understanding what you're trying to say. Normally a 10K resistor from MCLR to VDD will do the trick. You can then use a pushbutton to ground to reset the MCU.
 
if you dont put anything to MCLR, it MAY or not MAY NOT work. It will be completely UNRELIABLE. To make sure it WORKS, make sure that 5V is applied to MCLR by way of pullup resistor (as blueroomelectronics stated)
 
thx to u all.I noe wat u all say, plugging a 10k from MCLR to 5v.The problem is,when i do like this,i lose a nice pattern.If i do the correct way,i need to set the pattern again,but i have no ideal on it.............T_T
 
if you dont put anything to MCLR, it MAY or not MAY NOT work.

this is one of the things that confused me greatly when I first started with PICs about a month ago. I'd set up a basic led blinker and it seemed to switch on or off when i put my fingers near it. I didn't know to connect MCLR to anything, so it was up to the subtle energy fields surrounding the device, for a while i was confounded by its seemingly hand-detecting operation.

btw, im just a beginner, but coulden't he just turn off MCLR in code and not worry about it? thats what i usually do.
 
If MCLR is off and your programmer does not support VPP before VDD you may never be able to reprogram it.

how would that happen? I know I've cut the power to my chips while they were running and didn't have this issue.
 
Status
Not open for further replies.

Latest threads

Back
Top