[PIC] Reset Handling Problem with MCLR

Status
Not open for further replies.

Thota Suresh Avionics

Member level 2
Joined
Jul 15, 2013
Messages
45
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Visit site
Activity points
345
Hi,
I am Using PIC30F 5011 micro controller to handle different types of resets like POR and BOR and MCLR i am using terminal program.every time i am Power on the micro controller without pressing MCLR reset,
in hyper terminal showing results MCLR reset occurred.

my question is every time power up i expect POR and BOR only to flag but why does MCLR(EXTR) get flagged?
Code:
while(1)
{
    if(RCONbits.POR)
    {
        printf("POR Reset occurred");
        RCONbits.POR = 0;
        RCONbits.BOR = 0;
    }
    if (RCONbits.BOR)
    {
    printf("BOR Reset occurred");
    RCONbits.BOR = 0; 
    }
    if(RCONbits.EXTR)
    { 
     printf("MCLR Reset occurred");
     RCONbits.EXTR = 0;
    } 
}

- - - Updated - - -

Hardware Information:

Vcc is connected to Pull up resistor (4.7 k)
MCLR is connected to External reset Switch with Pull down resistor (47k)
 

Attachments

  • Capture.PNG
    70.5 KB · Views: 113

what happens if you reduce the voltage until it is not operational then raise it?

I would expect you to get a MCLR reset when you press the reset button and a POR reset when you switch on power (you may get an MCLR as well depending on the circuit)

I assume you have BOR enabled - what is the BOR reset trip point?

note that you are clearing the BOR bit (in the POR test) before testing it so it will never indicate if you get POR
 
Last edited:

i tried for BOR values at 2.0, 2.7 v, 4.2 and 4.7 as well.
but i when drop and raise voltages below BOR, MCLR doesnt get high.
but when i switch off - on RCONbits.EXTR gets flagged, but why ?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…