Pages: [1]   Go Down
Author Topic: Multiple timers halt execution  (Read 261 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all tinkerers,

I have this issue with using timer 0 and any other timer at the same time to call functions.
if I have
Code:
Timer1.initialise(200000);
 Timer1.attachInterrupt(<function_name>);

 Timer2.initialise(100000);
 Timer2.attachInterrupt(<function_name>);

The code halts on the second timer. I know that my timers work, because the functions do get called when there is only one timer running.


I am baffled.
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 553
Posts: 46284
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I am baffled.
I am too, since that snippet does even compile. Snippets-r-us.com is down the internet a ways. Here, we want to see ALL of your code. Picky, I know, but, that's the only way to try to reproduce your error.
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1010
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Flynn, what library do you use ? Please post a link.
Which Arduino Board are you using ? Is the microcontroller TIMER2 capable of 16 bits ?
Do you use any PWM signal or the tone() function, that is conflicting with TIMER1 or TIMER2.
Logged

Pages: [1]   Go Up
Jump to: