Skip to content
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

Added support for ATtiny44 & ATtiny84 #52

Closed
wants to merge 2 commits into from

Conversation

wvmarle
Copy link

@wvmarle wvmarle commented Jan 24, 2020

Added support for the ATtiny44 & ATtiny84

Changed interrupt pin definition of the ATtiny441 and ATtiny841 to match the pin number as used by ATTinyCore.

@PaulStoffregen
Copy link
Owner

Which pin is correct for CORE_INT0_PIN?

@SkullKill send the PR that defined CORE_INT0_PIN as pin 1

@olimexsmart has a pending PR that defines CORE_INT0_PIN as pin 8

This PR changes CORE_INT0_PIN to pin 9.

@wvmarle
Copy link
Author

wvmarle commented Jan 24, 2020

You're mixing up PRs :-) The current CORE_INT0_PIN for the ATtiny441/841 in your master branch is 9. No definition for the ATtiny44/84 there.

The comment at the ATtiny45/85 points to http://hlt.media.mit.edu/?p=1229, which redirects to http://highlowtech.org/?p=1229, that page in turn says it's obsolete and points to yet another page: http://highlowtech.org/?p=1695. This page, which is also old, refers to the old attiny core by damellis (https://github.com/damellis/attiny), where the INT0 pin (physical pin 3) was indeed Arduino pin 9. So that's where the pin 9 comes from.

I don't know if anyone still uses the damellis core; it's basically been superseded by the ATTinyCore by SpenceKonde (https://github.com/SpenceKonde/ATTinyCore). That core uses different pin numbering, now INT0 is pin 1. So that's what I used.

Of note, this pin 9 is in a definition for the ATtiny441/841, which are not supported by the Damellis core at all (the ATtiny44 and ATtiny84 are). So it's definitely wrong.

I have no idea where that pin 8 would come from.

The PR as I submitted is what I use on an ATtiny84 project. It reads my encoder just fine.

@olimexsmart
Copy link

Hi to everyone,
yes for some reason there was a change in pin numbering for the ATtiny84.

But IMO @wvmarle you are wrong saying that there was a change from Damellis to SpenceKonde, simply because the menu selection "Pin Mapping" from the IDE says so 😅 But this doesn't matter much.

Conclusion: take a look to the nice pinout schemes in the README of the SpenceKonde repo. Considering that the Pin Mapping used now one is Clockwise:

ATtiny441 CORE_INT0_PIN 9
ATtiny84 CORE_INT0_PIN 8

What I don't understand is that in the master branch the ATtiny441 definition is already there, at line 120 of interrupt_pins.h and is correctly defined at 9. So I'm not understanding what is going on 😕

@PaulStoffregen
Copy link
Owner

other pull requests already made this change, closing this old one

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

Successfully merging this pull request may close these issues.

3 participants