Clrf Pcl

Status
Not open for further replies.

TronicBrain

Member
Recently I was making a program of advanced security access door using a 3X4 keypad
and PIC 16F630 which had efforts system and alarm system and timer for invalid presses
and tamper.
and it was complicated somehow

An idea came to mind when I needed to make reset to the whole program when the program in five level subroutine
It was
CLRF PCL

But several problems had occurred after doing that
I really don’t remember the reason but I were in doubt that this method is right to make a software reset.

Any one tried to do that before?
 
Last edited:
The port pin to MCLR may work but it will probably go high impeadance as soon as MCLR* is recognized.

To do a clean hardware reset

1. Disable Interrupts
2. Allow the watchdog timer to expire and force a reset by executing the following assembly language code
Code:
        bcf   INTCON,GIE
loop:
        goto  loop
or the equivalent c code
Code:
    GIE = 0 ;  /* disable interrupts */
    while(1) ; /* execute the null statement until the "dog" expires */
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…