avr-hal icon indicating copy to clipboard operation
avr-hal copied to clipboard

Add attiny841 and attiny861

Open jaxter184 opened this issue 4 years ago • 3 comments

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

jaxter184 avatar Nov 27 '20 08:11 jaxter184

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.

jaxter184 avatar Nov 27 '20 21:11 jaxter184

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 ...

Rahix avatar Dec 10 '20 09:12 Rahix

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.

jaxter184 avatar Dec 10 '20 17:12 jaxter184

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

jaxter184 avatar Aug 28 '23 00:08 jaxter184