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 handle external interrupts and TIMER0 in PIC

Status
Not open for further replies.

slaamdunk@gmail.com

Junior Member level 1
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.
 

use like this:
int.PNG

enable hardware interrupt and then each time you press any of the button, it will create an interrupt signal. So you don't need to use TMR0.

Hope this helps.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top