1. ching fong kee

    Thread Starter Member

    Jun 23, 2010
    42
    0
    in PIC
    Pulling the MCLR pin low, will reset the CPU

    i'm very confusing with this
    by clicking the Button that is connected to the MCLR , it will reset the PIC
    then why it is not pulling the MCLR to high ?

     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Can you please post your reset circuit
     
  3. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    you need to have a pullup resistor (10K) connected from MCLR pin to Vcc (+), then have the switch connected to MCLR and Ground(-), when the switch is pressed it will pull MCLR low to reset pic, when you release the switch, MCLR will be pulled back high via the resistor.

    B. Morse
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    I could be wrong, but don't some PIC parts have an internal "pullup" connection to VCC? Especially on parts where MCLR is a multi-function pin.
     
  5. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Microchip do have something they call weak pull-ups. That can be enabled separately via a register. The current is about 250uA at 5 volt for typical non low power variants. How this implemented may vary. Like you may not find it on every port. Then the MCLR is enabled this option will be turned on automatic. At least for the chip I am using most of the time.
    Edit: Not all PIC MCUs do have this option
     
    Last edited: Aug 3, 2010
  6. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    It's also important to note that the weak pull up on MCLR is usually, if not always, a configuration option, and requires rewriting of the flash to change.
     
  7. ching fong kee

    Thread Starter Member

    Jun 23, 2010
    42
    0
    this will be my PIC circuit.
     
  8. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234

    MCLR looks to be connected properly, but why is the base of the NPN transistor pulled high? It should be pulled low so the transistor stays off until you set the I/O (RB4) high....

    Since the circuit seems to be wired correctly, now lets see the code to see if you have MCLR configured properly to be used as a Master Reset...

    B. Morse
     
  9. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Your circuit looks OK regarding the reset button. A explanation why reset is active low may be this. Then a digital input is not connected to anything (a term named floating) it will most probably sense a high input level. To avoid false trigging, it is often more preferable to use active low for such important signals.
     
  10. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    This could causing the latch up on the MCLR pin when the switch is pressed:

    So it may be wise to add the series resistor between the switch and VDD.

    B. Morse
     
  11. Ved Varat Sharma

    New Member

    Aug 8, 2010
    1
    0
    I can send the MCLR PIC ckt. for Reset for High pull, send ur mail ID.I can send the attachment if you have Express PCB Free Software installed on ur Computer.
     
  12. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    Just take a screenshot, use the PrtScrn key on your keyboard and paste it into any good image program; if you're on Windows, then Paint will be adequate. Try and save it as a PNG since it's a screenshot.
     
Loading...