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

Add attiny841 and attiny861 #105

Closed
wants to merge 4 commits into from
Closed

Conversation

jaxter184
Copy link

Preliminary pull request adding attiny841 and attiny861 chips. I tested a blink example on both, and it works in both cases, but I haven't tested much else.

It might also be worth mentioning in the README or something that the attiny841 is not supported by the current version of avrdude, so you need to add a section to the .avrduderc

Copy link
Owner

@Rahix Rahix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey,

thanks for this PR! How similar are these two MCUs? Would it make sense to provide a single HAL crate for both of them? I'm looking into keeping the number of HAL crates as low as possible, see #94 ...

chips/attiny841-hal/.cargo/config.toml Outdated Show resolved Hide resolved
chips/attiny861-hal/.cargo/config.toml Outdated Show resolved Hide resolved
avr-specs/avr-attiny841.json Show resolved Hide resolved
@jaxter184
Copy link
Author

I've made the requested changes

On combining the crates, these two chips are unfortunately pretty different (different number of pins, different peripherals), so I don't think it would make sense to group them together.

@Rahix Rahix added the mcu-support Support for a new Microcontroller label Dec 3, 2020
@@ -28,6 +28,12 @@
"attiny88": {
"cpu": "attiny88",
},
"attiny841": {
"cpu": "attiny841",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be avr25 to recreate your original spec files:

Suggested change
"cpu": "attiny841",
"cpu": "avr25",

"cpu": "attiny841",
},
"attiny861": {
"cpu": "attiny861",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here:

Suggested change
"cpu": "attiny861",
"cpu": "avr25",

@Rahix
Copy link
Owner

Rahix commented Dec 10, 2020

On combining the crates, these two chips are unfortunately pretty different (different number of pins, different peripherals), so I don't think it would make sense to group them together.

Different pins shouldn't be a problem. Can you list the peripheral differences? The key question is whether the peripherals that exist in both devices differ from each other. If not, I'd be very much in favor of a single HAL. I know I am pushing pretty strong for the unification because, as outlined in #94, the current state of many crates with duplicated code is absolutely unmaintainable for me ...

@jaxter184
Copy link
Author

t841 t861
gpio a a,b
timer 1x 8bit, 2x 16bit 1x 8bit, 1x 16/8bit hybrid
adc 10bit 10bit
ac 2x 1x
comms SPI,I2C (slave only), 2x USART USI

The biggest difference is the serial communication options. I'd say the t861 is closer to the t85 than the t841 in terms of peripherals.

@Rahix Rahix changed the base branch from main to old July 11, 2021 09:46
@Rahix Rahix added the old This issue/pr targets the old version of avr-hal label Jul 11, 2021
@jaxter184
Copy link
Author

If I do fix this pull request, I'll probably do it by reimplementing it from scratch.

@jaxter184 jaxter184 closed this Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mcu-support Support for a new Microcontroller old This issue/pr targets the old version of avr-hal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants