Go Down

Topic: ATSam3x8e (Due) PWM pins (Read 214 times) previous topic - next topic

CyberOddity

Hi Guys,

I was hoping someone could confirm which pins support PWM on the Arduio Due (ATSAM3x8e). The official Arduino store says "PWM: Pins 2 to 13" but when referencing the unofficial Due pinout below

http://www.robgray.com/temp/Due-pinout.svg

It list PWM pins as digital pins 6-9, 34-45 and 53. Just wondering which is correct or if the is a correlation between the two that I am missing.

WattsThat

Quote
It list PWM pins as digital pins 6-9, 34-45 and 53. Just wondering which is correct or if the is a correlation between the two that I am missing.
Huh? Not in the picture I see. Pins 2-13 in pink/rose whatever color you want to call it as shown for the pwm pins.

Vacuum tube guy in a solid state world

CyberOddity

Hi WattsThat, the part that's confusing me is the white labels "SAM3X8E PIN FUNC". They are listing the digital pins 6-9, 34-45 and 53 as PWM pins so I don't know which is correct. Is it that if I'm using a SAM3X8E on a due board I go by the rose labeled pins 2-13, but if I'm using just the SAM3X8E as a standalone micro controller I use digital pins 6-9, 34-45 and 53?

WattsThat

Ah, now I understand. Yes, those are hardware PWM pins... but they are not supported by the Arduino software. If you use the Arduino core, you're stuck with the pins in pink. Of course YMMV if you roll your own software with Atmel Studio but then you wouldn't be posting on the Arduino forum, you'd be hanging out on AVRFreaks. Right?
Vacuum tube guy in a solid state world

ard_newbie


You are not stuck with anything with the Arduino IDE.

Search in the DUE sub forum, there are numerous example sketches using direct register programming with the PWM peripheral.

CyberOddity

Ah, now I understand. Yes, those are hardware PWM pins... but they are not supported by the Arduino software. If you use the Arduino core, you're stuck with the pins in pink. Of course YMMV if you roll your own software with Atmel Studio but then you wouldn't be posting on the Arduino forum, you'd be hanging out on AVRFreaks. Right?
Thank you again for the Reply, So if I use the SAM3X8E as a stand alone MCU and use the Atmel studio IDE I can use the hardware pines for PWM? I know its completely off topic but does that go for my use of LED as I/O question you replied to as well. By that I mean can I use digital pin 13 as general I/O if I use Atmel studios. I have also bookmarked AVRFreaks as It look like I may be doing some heavy reading there soon, thanks for the site.

Go Up