Go Down

Topic: Multiple timers halt execution (Read 398 times) previous topic - next topic

Flynn

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: [Select]

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.

PaulS

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.

Krodal

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.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy