Skip to content

PWM on digital pin 2 acts strange #29

@MCUdude

Description

@MCUdude

Hi!
I'm working on an implementation for the ATmega48PB/88PB/168PB/328PB family and stumbled upon an issue I want to discuss. First you'll have to merge the pending PR in order to reproduce the issue.

The issue is PWM on digital pin 2 (PD2). It doesn't matter if TIMER3B or TIMER4B is used (in pins_arduino.h), the problem is the same. When running the Fade.ino example, the pin only "fades down" from 255-0, not up again like it should. If I change the boundaries from 0->10 and 255->200, it won't output any signal. I've attached my oscilloscope to verify this.

My implementation uses its own Arduino core files, but I haven't been able to figure out what's wrong. Any idea?

Here's a GIF to show you what's going on:
https://ephmedia.giphy.com/69aeb183-b0bc-440e-b60c-faa4d751e3c3.gif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions