MCLR resistor


Closed Thread
Results 1 to 21 of 21

Thread: MCLR resistor

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697

    Default MCLR resistor

    Hi. This point was raised the other day. I always use a 10K resistor from VCC to MCLR. Ive been told that it should be a 4.7K. Is that the best value to use an what effect does it have by using different values? Would a 1K resistor work?

    While were at it, why does it need the resistor at all?

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I normally just connect MCLR directly to Vdd. However you must ensure you have a clean, noiseless supply to do this.

  3. #3
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    How clean does it have to be? Ive got a 100uf cap and a 0.1uf cap from VDD to VSS

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Cleanliness is down to your design, layout and application. When it's not clean enough, your PIC will soon-enough complain by restarting or by some other delinquent behaviour.

    There is no rule that says 100uF and 100nF is the cure for all ills. Most of my designs have only 10uF following the Regulator but augmented with a liberal sprinkling of 100nF's in places where in my judgement they'll do the best good.

  5. #5
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Oh. I see. I have actually had trouble with a circuit resetting itself (i have another thread about it). Im sure that is due to interference though as it still resets when running from a battery.

    I normally use 10K because a few years ago someone gave me a diagram of how to wire a PIC chip up and ive done it that way since without any problems. I guess its better to know it myself though instead of remembering a diagram

  6. #6
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Just becaise a PIC resets doesn't automatically mean a bum Power Supply.

    You could have noise induced from other ambient sources - some may not be obvious...

    You could have illegal code, missed a RETURN from a GOSUB, forgotten RESUMEs, overspilled stackspace, run off the end of your program, caused a WDT timeout through a negligent loop etc etc etc...

  7. #7
    Join Date
    Aug 2005
    Posts
    57


    Did you find this post helpful? Yes | No

    Default

    I have always tied MCLR thru a resistor,but noticed the other day while looking thru the data sheets for a 16F87xA this note:
    "The behavior of the ESD protection on the MCLR pin
    differs from previous devices of this family. Voltages applied to the pin that exceed its specification can result in both Resets and current consumption outside of device specification during the Reset event. For this reason, Microchip recommends that the MCLR pin no longer be tied directly to VDD. The use of an RCR network, as shown in Figure 14-5, is suggested. "

  8. #8
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Can you show me that figure please. I tried direct to VDD and the results didnt change. when everyone else goes to bed im going to stay up and rebuild the whole circuit from scratch and test every last wire as im putting it together

  9. #9
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    Let me clear up some confusion. From your discussion it sounds like your are creating an all-in-one lighting and EFX controller.

    In the world of lighting there is a hard and fast rule that you shouldn't attach an inductive load to an SCR. This is only true if you are using the SCR to dim the attached load. However Melanie is correct in that if you are only turning the load on/off the above rule about inductive loads doesn't apply.

    The other thing you need to be aware of is an SCR needs a certain amount of current flowing through it to remain in each state (on/off). So if the strobe isn't working reliably try attaching a light bulb to the output. If things suddenly start working then there wasn't enough current to keep the SCR on, and you will need to switch to a relay.

    Hope this helps, you are real close it's easy for frustration to sabotage a project…been there myself recently.

  10. #10
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    I believe ive solved everything

    I ripped everything off my breadboard and started again. I tested everything as i was connecting it up.

    My first problem was the strobe. The way i have been using obv is not going to work. Since i have some boxes pre-made that controll lights (including dimming) i decided to try them out but only telling them to turn on and off. The strobe works fine and doesnt cause any interference. I have noticed that the strobe double clicks once every few seconds while connected to the box but i dont think that would cause a problem. I was just concerned that i might break the box.

    Back to my circuit. Ive replaced the variable PSU with a static one. The variable one will only be used for the solenoid now. Ive added 10 small capacitors and instantly noticed a difference. As long as the relay doesnt turn on the whole circuit can run for about a second without power. PSU faults are now fixed.

    The solenoid is the only thing that still uses a relay. As the solenoid is DC i have put a diode directly onto the solenoid itself. That seems to be fine.

    2 of the smoke machines are now controlled by triacs instead of relays (the third should be the same but ive not tested it yet). They now dont cause problems.

    Still using 10K for MCLR. Tried direct an 1K but there was no change.

    Initial build time: 5 hours
    Debugging time: 9 hours
    Rebuild time: 7 hours

    wow, this has taken ages. It would have taken a lot longer too if it wasnt for you guys. Without the suggestions here i think i would have given up ages ago. No doubt when i turn it on again tomoz something will have broken but all looks good for now

    Anyway, its now 4:30AM and ive been up exactly 24 hours so i think i deserve a break. Ill be back on tomoz to answer any questions you might have and ill upload some pics (just for the fun of it)

  11. #11
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    I have noticed that the strobe double clicks once every few seconds while connected to the box but i dont think that would cause a problem. I was just concerned that i might break the box.
    Try tying an incandescent lamp inline, this may correct this. If it does a 10 ohm 10 Watt resistor should fix it permanently.

Similar Threads

  1. Reading A Photo Resistor using ADC
    By jessey in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 25th January 2007, 09:28
  2. Replies: 5
    Last Post: - 2nd March 2006, 09:21
  3. What does this MCLR instruction mean?
    By bartman in forum General
    Replies: 16
    Last Post: - 30th November 2004, 00:32
  4. I/O pin and MCLR
    By Dwayne in forum FAQ - Frequently Asked Questions
    Replies: 1
    Last Post: - 15th July 2004, 10:52
  5. Do I need that Resistor with my LCD?
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 15th July 2004, 10:50

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts