use one button to on/off Pic24

Status
Not open for further replies.

vuha85

Newbie level 5
Hi everyone, i have a problem with Pic24. I use a reset button to push ON/OFF Pic24fj64ga002. on my design, i connect this button with RB15 of microcontroller. how can i do for this problem? I think i should use interrupt but i can't understand what would i do,please help me?

rohitkhanna

Banned
Yes it's feasible to use an interrupt to put the uC into Sleep/ Wakeup. However if you are new to uC's then maybe the pic24xxxx *may* not be the right processor to start with.

cheers!

horace1

Hi everyone, i have a problem with Pic24. I use a reset button to push ON/OFF Pic24fj64ga002. on my design, i connect this button with RB15 of microcontroller. how can i do for this problem? I think i should use interrupt but i can't understand what would i do,please help me?

are you talking about the hardware reset of the PIC24FJ64GA002 which should look something like

or using RB15 as a digital input pin for a software reset?
if so remember RB15 is also an analogue input pin so your have to make the pins digital, e.g.
Code:
    AD1PCFGL = 0xFFFF; 			// IO pins are digital
you can poll the pin or use interrupt, see section 10.3 Input Change Notification of the data sheet

vuha85

vuha85

Points: 2

vuha85

Newbie level 5
thank horace1, follow your help, i have just resolved this problem. Thank you so much

Status
Not open for further replies.