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.

PicBasic, program with timer1 and timer0

Status
Not open for further replies.

AlexNadal

Junior Member level 3
Joined
Nov 28, 2006
Messages
25
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,459
When I work with the timer1 and timer 2 in picBasic, how can I distinguish which has interrupt the program?! wich flags?! And how I can do differents things depends on the interruption?!

thanks
 

In the ISR, the fist things to do are check the interrupt flags.
For example:

Code:
btfsc  PIR1, TMR1IF
goto  TMR1_interrupt

btfsc  PIR1, TMR2IF
goto  TMR2_interrupt

btf..... and so on


TMR1_interrupt:    ;code for TMR1


TMR2_interrupt:    ;code for TMR2
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top