1

I have an Arduino Duemilanove on which I would like to use the internal 16-bit timer to do PWM on pin 9 and not pin 10 (I have a Wifi shield in my project which requires the use of pin 10).

Is it possible to configure the timer to send a signal on pin 9 but to not touch pin 10?

5
  • You should be able to do PWM output on pins 3, 5, 6, 9, 10, and 11. Why would you think that using pin 9 would touch pin 10? Commented Apr 25, 2011 at 15:41
  • 2
    Yes, using analogWrite(), but this uses the 8-bit timer. I'm looking to do 16-bit PWM. Commented Apr 25, 2011 at 15:49
  • OK, so you're using your own mechanism to do 16-bit PWM. Why would outputting on pin 9 affect pin 10? Commented Apr 25, 2011 at 16:07
  • Most of the sample code I've seen online just configures the timer without really configuring pins and the implication is that there will be output on both those pins from that timer... If that's not the case, great :) Commented Apr 25, 2011 at 16:49
  • You should post some actual sample code, then. Commented Apr 25, 2011 at 16:57

1 Answer 1

1

The answer is yes, you can. I used the TimerOne library: http://www.arduino.cc/playground/Code/Timer1

in setup()

  Timer1.initialize(5000)
  Timer1.disablePwm(10); //WiServer needs pin 10!
  Timer1.pwm(9, 0); //set up pin 9
Sign up to request clarification or add additional context in comments.

3 Comments

Could you summarize how you used it?
I mean summarize in your answer how to do it, to make it into a good answer instead of just links. meta.stackexchange.com/questions/7656/… meta.stackexchange.com/questions/8231/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.