Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

AT89C52 software Reset ?

Status
Not open for further replies.

hameeds01

Advanced Member level 2
Joined
Aug 23, 2005
Messages
599
Helped
75
Reputation
156
Reaction score
41
Trophy points
1,308
Location
Islamabad Pakistan
Activity points
4,540
software reset 8051

Hey every one I want to know that is there any way to reset the microcontroller (AT89C52) by using command in assembly or C without using the reset pin 9.
 

Although in the original 8051's core there is no such a command, you can create one by yourself ..
Just do what the processor does on power-on ..
The internal reset algorithm writes 0s to all the SFRs except the port latches, the Stack Pointer and the SBUF ..
Then the port latches are initialized to FFh and the Stack Pointer to 07h ..

So, create section of code and call it RESET, include all of the above and the best place to put it is right at the beginning of the code ..
Something like this:

START:

RESET: ..

Main_Loop: .. da da da ..
..
..


Regards,
IanP
 

you could have an external circuit that would reset the device using a pin on the 89C52, or in software just jump to address 0 in your code. Whatever reg's you want reset, do this @ reset addr 0.
 

i think you can jmp to the orgin wehen ever you want to reset you code r just use an external circuit connected to your reset pin and control that circuit from any one of the pin i think it might become complex
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top