How to handle external interrupts and TIMER0 in PIC

Status
Not open for further replies.

slaamdunk@gmail.com

Junior Member level 1
Joined
Aug 27, 2013
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
130
Hi,

I am working on 16F1526 microcontroller and I want to know how to handle external interrupts. I have a push button scheme connected to my PORT B.
Can I define a button push as an external interrupt to the PIC

2) Is there any way to stop TIMER0 from running continuously ?

Thanks for the help
 

To use an external interrupt you should enable GIE and INTE bits.Inside the ISR you must clear the INTF.
Timer zero enabling and disabling is done through the TMR0IE bit as thunderboympm said.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…