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.

use one button to on/off Pic24

Status
Not open for further replies.

vuha85

Newbie level 5
Joined
Dec 15, 2010
Messages
10
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,283
Activity points
1,354
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
Joined
May 1, 2012
Messages
341
Helped
76
Reputation
150
Reaction score
75
Trophy points
1,308
Location
New Delhi, India
Activity points
0
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

Advanced Member level 5
Joined
Nov 18, 2008
Messages
2,123
Helped
596
Reputation
1,188
Reaction score
573
Trophy points
1,393
Location
Norwich, UK
Activity points
13,069
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

RESET.jpg

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
https://ww1.microchip.com/downloads/en/DeviceDoc/39881D.pdf
 
  • Like
Reactions: vuha85

    vuha85

    Points: 2
    Helpful Answer Positive Rating

vuha85

Newbie level 5
Joined
Dec 15, 2010
Messages
10
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,283
Activity points
1,354
thank horace1, follow your help, i have just resolved this problem. Thank you so much
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top