Closed
Description
I connected an RC circuit between D3 and A1 pins. Basically, D3 is connected to a 100K resistor, then to a 1uF capacitor. The voltage drop on the capacitor is measured on pin A1.
With the code below, I get reasonable readings on Uno R3.
However, using a Due and the same code, after changing the pinMode to INPUT and then OUTPUT manually, analogWrite stopped working as shown below. You can rule out the malfunctioning of analogRead as I had confirmed that using a DMM.
Is this behavior expected on Due? Which mode should I set it to for PWM on the Due to make it work?