Skip to content

AVR64EA28 PIN_PD6 cannot be used as output. #590

@wke67

Description

@wke67

When using PIN_PD6 as output and writing via digitalWrite(PIN_PD6, 0), the pin loses the direction bit, i.e. PORTD.DIR bit 6 is cleared. This is caused by the turnOffPWM() function in wiring_digital.c. At the very and of this function, if the output pin is DACOUT it will be switched to input. I have no idea why this piece of code is there anyway, it should be deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions