PWM pin doesn't work

Hi all!

I'm trying to control 4 engines with an Arduino Due board. I'm using these pins: PWM 6, PWM 7, PWM 8, PWM 9.
Apparently I have no problems when I use PWM 7, 8 or 9 but I do when I use the PWM 6 pin. In addition I've tested the voltage on the pins with an oscilloscope and I get the values I expect using PWM 7, 8 or 9 but when I try the PWM 6 pin, the voltage is lower and the squared wave gets distorted.

¿Has anyone had the same problem? ¿Is the arduino board maybe working badly?

I need to use these pins, so the solution wouldn't be to change one of them.

Thanks in advance!

What are you driving from the pins? Could you be overloading one? Have you checked the offending pin works with digital write?

I agree with Mark --- also try disconnecting your control signals when checking with the digital write command.

Pins 6, 7, 8 and 9 should have higher drive capability (source 15mA, sink 9mA). An easy way to check if your hardware is functioning within spec would be to compare the signal levels on each pin while driving a known load, for example, when using a 1K resistor.

To check if pin 6 can adequately sink 3.3mA, tie the other end of the 1K resistor to 3.3V and scope the signal. If the pin is weak you will measure a higher than expected voltage while using digitalWrite(6, LOW). Compare with results from your other pins while using the appropriate digital write commands.

To check if pin 6 can adequately source 3.3mA, tie the other end of the resistor to ground and scope the signal. If the pin is weak you will measure a lower than expected voltage while using digitalWrite(6, HIGH). Compare with results from your other pins while using the appropriate digital write commands.

Compare with DC Characteristics on the SAM3X/A datasheet.

Hi. Just a quick question on this post. Can any one of you guys tell me where can I get the what the information for what PWM frequencies do the DUE pins operate at and how and what can they be divided with!

Cheers!
appreciate your help :slight_smile:

Hello to all,
I have the same question.
How can i change the frequency of PWM in arduino Due?I want to create a 200KHz waveform.

There's just been another posting on this:
http://forum.arduino.cc/index.php?topic=219378.0

yes you can change the PWM frequency search after the (PWM01.H) code. It will enable you to change the frequency

so3ody:
yes you can change the PWM frequency search after the (PWM01.H) code. It will enable you to change the frequency

Here I think:
http://forum.arduino.cc/index.php/topic,144446.msg1149044.html#msg1149044