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.

[SOLVED] software reset instruction

Status
Not open for further replies.

Raady Here

Full Member level 5
Full Member level 5
Joined
Jun 8, 2013
Messages
242
Helped
26
Reputation
52
Reaction score
26
Trophy points
28
Location
India
Visit site
Activity points
1,571
PIC30F5011,
MPLAB 8.8v
interfaces rtc, keypad, lcd.

Hi,

I want to know how to reset MC using the software instruction.
when I am pressing a button it just recognize the button prints the statement and does nothing after that. i am already displaying rtc on lcd and it doesnt get interrupted and no more buttons of the keypad work.

Code:
#include<reset.h>
...
...
main(){
....
while(1)
{
	if(PORTFbits.RF6)             // checking if button is pressed
        {
	    printf("soft reset ");  
	    TimerDelay_10ms(10);
	    __asm__ volatile ("reset") ;  // asm("reset");
	}		
}
}
 

its works

__asm__ ("RESET");

thanks for your time.

instruction is found in the header file of the particular processor.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top