Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Inconsistent behaviors of analogWrite and pinMode on Due and Uno #2455

Closed
Assignees
Labels
Architecture: SAMApplies only to the SAM microcontrollers (Due) Board: Arduino DueApplies only to the Due Component: CoreRelated to the code for the standard Arduino API
@HanaJin

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.
image

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.

image

Is this behavior expected on Due? Which mode should I set it to for PWM on the Due to make it work?

Metadata

Metadata

Labels

Architecture: SAMApplies only to the SAM microcontrollers (Due) Board: Arduino DueApplies only to the Due Component: CoreRelated to the code for the standard Arduino API

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /