Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JChristensen opened this issue May 7, 2014 · 2 comments

Comments

@JChristensen
Copy link
Contributor

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.

@Lauszus
Copy link
Contributor

Lauszus commented May 7, 2014

This was implemented almost a year ago: #1368.

@JChristensen
Copy link
Contributor Author

Yes, I see that now, I was mis-reading the code. Sorry for the inconvenience. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants