Hi all
Can we use 2 interrupt at the same time?
(i)TMR1 act as sending pulse 4.32 second to the driver.
(ii)TMR0 act as 1 second elapsed to create time and date.
Please advice
Thanks
Hi all
Can we use 2 interrupt at the same time?
(i)TMR1 act as sending pulse 4.32 second to the driver.
(ii)TMR0 act as 1 second elapsed to create time and date.
Please advice
Thanks
Yes you can do it, you can use ALL PIC interrupts at the time. In the ISR you need to track it down. Bear in mind to keep your ISR as short as possible.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi
Thank to the advice.
*************ISR you need to track it down????******************
Below are the basic program:-
Is that what you mean????
' Initialization of TMR0 and TMR1
'
ON INTERRUPT clockpulse
ON INTERRUPT elapsed time
main:
'
'some coding here
'
'
goto main
DISABLE
clockpulse:
'some coding here
'
'
'
'
'
RESUME
DISABLE
elapsed time:
IF tick<16 then
tick = 0
bs = bs + 1
'some coding here
'
'
' reset tmr0 flag
RESUME
END
Please advice thank
DragonBall,
You have now asked the same question in atleast three different threads and you are not reading the responses you are getting.
You can not use two ON INTERRUPT statements. You have to, in one SINGLE ISR, determine what caused the interrupt by looking at the different interrupt flags, located in INTCON, PIR1 and PIR2 (For16F87x). If you have TMR0 and TMR1 running and interrupts enabled for both, when the interrupt fires you look at the T0IF and TMR1IF flags to determine which one caused the interrupt.
I think you are making this more comlicated than it needs to be, IMO you only need one timer interrupt. Look for a suggestion in one of the other threads where you asked this question.
/Henrik Olsson.
Hi Henrik Olsson.
I actually had read all the threads that ppl send to me. I just want to heard ppl's suggestion. If I know that the multiple interrupt will make me complicated then I will heard to your advice.
I really appreciated all the ppl's reply.
one thing is i have success doing the LCD diplays.
Thank to your reply again.
Please advice me and guide me if i have problem thanks.
Bookmarks