Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

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
40
Trophy points
1,308
Location
Islamabad Pakistan
Activity points
4,542
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.
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
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
 

ctownsend

Advanced Member level 2
Joined
Nov 27, 2004
Messages
574
Helped
93
Reputation
188
Reaction score
63
Trophy points
1,308
Location
Canada
Activity points
3,652
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.
 

vijaya_narayana

Full Member level 3
Joined
Jun 12, 2007
Messages
172
Helped
11
Reputation
22
Reaction score
1
Trophy points
1,298
Location
India
Activity points
2,158
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top