Skip to content

Incorrect mapping of analog pins to ADC channels for ATmega1284/P, ATmega644/A/P/PA #2055

Closed
@JChristensen

Description

@JChristensen

For the ATmega1284/P and 644/A/P/PA MCUs, analogRead() uses a hardcoded algorithm that causes it to incorrectly map analog pin numbers to ADC channels for certain popular boards including some of those defined in maniacbug's mighty-1284p core.

Calling analogPinToChannel(), similar to what is already in place for the ATtinyX5 MCUs, would address this issue and allow better flexibility for future boards that may be developed.

Pull request to follow.

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