Go Down

Topic: Virtual Wire and PWM (Read 2514 times) previous topic - next topic


Oct 14, 2010, 04:31 pm Last Edit: Oct 14, 2010, 04:35 pm by HULK Reason: 1
I am running the Diecimila board with both TX and RX connected to it, all communication works fine both ways.
But when i try to run a PWM signal with the command analogWrite on pin 9 something in the virtualwire code is preventing me.
I have managed to find that when i un-comment vw_setup(2000) PWM signal works just fine.
Anybody had this issue or knows of a solution?

Default IO pins appointed for the Virtual Wire are 12, 11 and 10 so pin 9 should not be effected ?


Oct 14, 2010, 04:44 pm Last Edit: Oct 15, 2010, 01:05 pm by HULK Reason: 1
After some searching outside the forum i found that some PWM pins need the TIMER1 function to run. And according to my understanding pin 9 and 10 are the ones on Arduino that are using the TIMER1, is that correct?


It seems as the virtual wire library in some way changes the TIMER1 settings and basically the PWM signal for pin 9 and 10 is effected. But i have not tested to change pins yet as my application is build in and i need to do some work to reach the pins. So if anyone can confirm my thought it would be great.
My only hope is that other PWM pins will not be effected.


Well, after testing my self i can now confirm that PWM on pin 5 and 6 works fine when running the virtual wire library.
But pin 9 and 10 will not do so at all.

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!

via Egeo 16
Torino, 10131