Go Down

Topic: Arduino servos (Read 612 times) previous topic - next topic

dirkwillem

Hello

The page of the arduino servo library says that use of the servo blocks PWM pins 9 and 10, is this also the case for the Due (as it uses a different core)

MarkT

No, the Due is completely different hardware.  It may also be the case that there are
clashes between the Servo timer(s) used and some PWM pins, that probably involves
reading the code and pinout details to be sure. 

On the Due some of the PWM pins use the native PWM peripherals to drive them and
others use the TC (timer counter) peripherals.  The Servo library uses some of the
channels of some of the TC units - I would ferret around in the sources
to work out what's going on, but you need to know your way around a bit to do that.

<distrubution>/hardware/arduino/sam/variants/arduino_due_x/variant.cpp

is a good file to start with, has lots of pin definitions.

And the defnitions in

<distrubution>/libraries/Servo/arch/sam/ServoTimers.h

show which TC units/channels the Servo library uses.
[ I won't respond to messages, use the forum please ]

Go Up