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.

Resources about using timer interrupt in PIC uCs.

Status
Not open for further replies.

arnab913

Junior Member level 3
Joined
Jul 27, 2012
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Chittagong, Bangladesh
Activity points
1,515
Hi all,I am trying to learn using timer interrupt in PIC uCs.
Can anyone suggest or link me(with code) which 'll helpful for understanding timer-interrupt for pic .....
Please......
 

Re: Timer interrupt in PIC uC

There are many examples if you Goggle for them. You haven't even specified which language and which PIC you are working in.

Basically:
1. create an interrupt routine. this is what gets called when the timer interrupt occurs.
2. load the timer with the value you want - remember it counts UP and creates the interrupt as it rolls over from maximum value to zero.
3. enable the timer interrupt. Also enable the global interrupt bit if necessary.

Now when the timer reaches maximum value and then tries to increment again, it will roll over to zero and the interrupt routine will be called.
Depending on what your assembler/compiler already does, you might need to clear the interrupt bit to make it ready for next time. If you are creating interrupts at fixed intervals you might have to reload the timer value in your interrupt routine.

Brian.
 

    V

    Points: 2
    Helpful Answer Positive Rating
Re: Timer interrupt in PIC uC

Check this link...it's useful you should bookmark it..... PIC WITH MICROC

embedded-lab.com
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top