Skip to content

Commit

Permalink
Added attiny84_cw_pinmap board option
Browse files Browse the repository at this point in the history
Created a board for ATtiny84 using the reverse (clockwise) pin mappinig, as opposed to the default CCW pinmapping. Reads from the "tinyX4_reverse" board variant.

Why? Tldr: the mapping has changed over time, and newer projects generally use CW mapping. It's odd that pio defaults to CCW. Adding this to the list would at least make it easily (and EXPLICITLY, no ambiguity) selectable, without breaking pre-existing projects by modifying the original "attiny84" board.

See https://github.com/SpenceKonde/ATTinyCore/blob/v2.0.0-devThis-is-the-head-submit-PRs-against-this/avr/extras/ATtiny_x4.md for details on why this pinmapping exists. 

Found it exhausting to manually add the variant every time despite it pre-existing in the boards list.
  • Loading branch information
nickyonge authored Oct 18, 2024
1 parent f4fe4c4 commit 33af4ce
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions boards/attiny84_cw_pinmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"build": {
"core": "tiny",
"extra_flags": "-DARDUINO_AVR_ATTINYX4",
"f_cpu": "8000000L",
"mcu": "attiny84",
"variant": "tinyX4_reverse"
},
"debug": {
"simavr_target": "attiny84"
},
"frameworks": [
"arduino"
],
"name": "Generic ATtiny84",
"upload": {
"extra_flags": "-e",
"maximum_ram_size": 512,
"maximum_size": 8192,
"protocol": "usbtiny"
},
"url": "http://www.atmel.com/devices/ATTINY84.aspx",
"vendor": "Atmel"
}

0 comments on commit 33af4ce

Please sign in to comment.