Skip to content

Arduino Uno PWM frequency too high #1760

@soypat

Description

@soypat

As of TinyGo 0.17, Arduino Uno's PWM on pin 10 runs at 3922 Hz.This makes it unsuitable to control actuators such as Servos which usually rely on a pulse width of around 3-0.5ms.

Arduino's official documentation puts PWM frequency at 490 Hz and 980Hz, depending on the pin used.

My measurements on an oscilloscope put frequencies at:

  • D10: 3922Hz
  • D6: 490Hz (should be 980 according to Arduino) (pins 5 and 6: 980 Hz)
  • D5: 490Hz (should be 980)
  • D3: 490Hz
  • D9: 3922Hz
  • D11: 490Hz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions