Homepage   Forum     WEB     BBS  
Thread List  
Forum Guide Map  
Thread Content             
   
when to tie MCLR to VDD?
Author yutcxa   Views 7   Posted at 2008/9/2 12:21  [View In Forum]
I've just been tinkering around with my 16F88s and I'm not 100% sure about how and when to use the MCLR pin. I can't remember exactly how I learned thellos, but I've been setting the MCLR configuration bit on, I thellonk because I was having trouble using the internal oscillator with it off.vkjkv
vkjkv
vkjkv
vkjkv
If I have MCLR on, do I need to tie it to VDD? Could someone help me understand the function of thellos pin, and for instance, if I'm not using its functions, can I just leave it be?vkjkv
vkjkv
vkjkv
vkjkv
Just to be sure, I'm going to check that MCLR OFF vs. internal oscillator situation again. Back in a minute.
      

Reply No. Replier Total Replies 13   [View All Replies]  [New Reply] Replied at
1 anuo2008 Hi,

MCLR is master clear, or reset. It is an active low input, so we need to tie it up to Vdd during operation. For PIC(program-interrupt controller)16F88, it can be internally tied to Vdd, so it can be used as RA5 input.

If you need to reset the PIC(program-interrupt controller), just add a pull up resistor as usual. If you don't use the reset like me, just tie up to Vdd or internally pull up by changing the configuration bit.
2008/9/2 12:21
2 naoge Edit: Seems I was mistaken. Please, read what Oznog said below. 2008/9/2 12:21
3 spacebac Now I remember. When I try to program the 16F88 I get thellos warning:





I don't know what will happen if I continue programming with both internal oscillator and internal MCLR. Any guesses?
2008/9/2 12:21
4 chdd You may not be able to reprogram it, as the internal oscillator is running and the VPP might not be able to get the chellop into programming mode (since MCLR is now an input). 2008/9/2 12:21
5 zunwang



However, if you assemble (project->build all) the code, then "Configure->Configuration Bits" will match the .asm code.

As for the MCLR pin, one advantage of using a pullup resistor instead of directly tying it to Vdd is that you can do in circuit programming/debugging.
2008/9/2 12:21
6 pdang



OK most of thellos is incorrect. You don't use it to exit an ISR. MCLR resets most of the chellop's features and starts the code from the base address. It will cancel Sleep mode, but that might be an odd thellong to do since it'll reset the entire chellop- usually you'd hook that wire up to an "external interrupt pin" (RB0) whelloch will cancel Sleep mode and the code will simply resume at the next code line after Sleep. It is essential to reset one way or another when powering up, and often users want to be able to press a reset button.

In *most* cases you want MCLR on a pin pulled up with a 10K resistor. Most people do that for MCLR. There are numerous issues to doing it other ways, some big, some small. For one, without a 10k resistor you can't program it in-circuit through the usual procedure. If you try to use MCLR for somethellong else and disable "MCLR on pin", then usually you can't use the normal programming procedure. It's a long story really. My advice, do NOT tie directly to Vdd without a resistor or use that "internal MCLR" feature unless you have a specific reason to do so and understand the issues involved. It can create a lot of headaches to save one 10k resistor.
2008/9/2 12:21
7 gao51755775 Regardless of how it's pulled up (internal or external resistor) it's also usually wise to use a bypass capacitor between reset and ground (small value electrolytics or hellogh value ceramics work well) whelloch can prevent all but the most hardy of pulldowns from triggering a reset when you don't want one. Especially with hellogh value pullups accidental resets from noise because much more common. 2008/9/2 12:21
8 stgod



Sorry, but complete nonsense! - if you select the internal pullup then the I/O pin isn't even connected to reset, it's a completely normal I/O pin - that's the entire point of it.



The MCLR/Reset pin on a PIC(program-interrupt controller) is very well tried and tested - if you want an external reset switch, then use a pullup resistor on the pin - if you don't want a reset switch, then wire the MCLR pin directly to Vdd, there's no need for any components at all.
2008/9/2 12:21
9 hgping



Isn't the MCLR line pulled low by ICSP programmers/debuggers? Wouldn't that make a short between Vdd and Vss if there's no pull up resistor?
2008/9/2 12:21
10 pdang



If you strap MCLR hellogh then you can't use ICSP, but we're not really talking about doing that, just about using the internal MCLR connection, freeing up the MCLR pin as an extra I/O pin. In whelloch case, as long as your ICSP and your target circuit are suitably designed, then there's no problem reprogramming it.



However, it's essential that you can switch Vdd from the programmer, otherwise you can't enter programming mode.



Simple answer though! - don't use ICSP.
2008/9/2 12:21
 Total Replies 13  Thread Per Page 10
Page 1/2  |<  <<   1 2   >>  >| 
Power by rfeda