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.

How to program RESET coding in micro controller

Status
Not open for further replies.

exalive

Newbie level 3
Joined
May 26, 2009
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,302
Hi! I need to know how to write the coding for RESET internally , i want my program to AUTO RESET after processing some coding in assembly lauguage
 

Some microcontrollers have a RESET instruction in assembly (I think PIC does). For most other microcontrollers all you can do is to activate the watchdog, disable interrupts and enter an infinite loop waiting for the watchdog to timeout and reset the controller.
 

there are RESET instruction available in many microcontrollers.u can use that. for ex.. PIC18 series has RESET instruction, using that resets program counter and also some registers .but in PIC16 series there is no Software RESET instruction,where u can use GOTO 0x0000.it will force the program counter to start from Initial location but it doesn't reset any Registers or variables,where u can Manually clear all the register if your application need so
 

I think you should use watchdog timer if you are using AVR microcontroller.

regards
m.yasir
 

In PICmicro use GOTO 0000 to reset your process. Using the TO and PD bits you can initialise or leave the registers as is.

If the PICmicro has come out of a WD timeout, the TO bit will have to be checked and if PICmicro has come out from a power up situation, the PD TO bit will have to be checked and decission taken.

Cheers

Ravi
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top