Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top