Skip to content

attiny88 woes #536

Closed
Closed

Description

@moosepr

Howdy

I have come across your library while trying t get round some issues I am having while trying to make an attiny88 work with a WS2812 LED

I had tried the adafruit neopixel library to no avail, so i thought i would give fastled a go

I am using attinycore (https://github.com/SpenceKonde/ATTinyCore/blob/master/avr/extras/ATtiny_x8.md) and arduino and am unable to get any of your examples to work. The led is attached to the pin PA3/PCINT27 which links to pin 26 in arduino terms, however fastled has issues with that pin number

/home/petay/sketchbook/libraries/FastLED/fastpin.h:207:2: error: static assertion failed: Invalid pin specified static_assert(validpin(), "Invalid pin specified"); ^ exit status 1

although after further testing, it seems to have issue with an pin!!

Activity

  1. focalintent commented on Dec 7, 2017

    @focalintent
    Contributor

    Can you turn on verbose compile output and dump the full output into gist.github.com and link to it here?

    Right now, FastLED has no pin/port definitions for the ATTiny 88 -- those are all defined in platforms/avr/fastpin_avr.h (these need to be defined because FastLED, at compile time, turns pin accesses into direct io register accesses for performance - but this means that the pin number to io register/port mapping has to be setup and known at compile time, not runtime.

  2. moosepr commented on Dec 7, 2017

    @moosepr
    Author

    sure, the dump is here

    https://gist.github.com/moosepr/264d71722ea4d52d93001210e045c68d

    i did expect it may be the case of nobody being mad enough to try it on an attiny88 before :P

  3. brickstuff commented on Nov 3, 2018

    @brickstuff
    Contributor

    Hi, did this ever get fixed? I have an ATTiny88 as well and can’t get it to work with FastLED. I’ve looked at the fastpin-avr.h file and see all the chip defs but don’t know enough about the structure of how this is written to add a new section for the 88. It’s a nice chip, with hardware SPI and I2C which is almost unheard of with Tinys, so having FastLED support would be amazing.

  4. moosepr commented on Nov 3, 2018

    @moosepr
    Author

    I tried the adafruit library instead but that wouldn't work either! In the end I moved to an atmega 328 and that solved all my issues

  5. brickstuff commented on Nov 3, 2018

    @brickstuff
    Contributor

    Yeah, that's not an option in my case-- pricing for the 328 is too high for my application. I'll keep plugging away with the 88.

  6. moosepr commented on Nov 3, 2018

    @moosepr
    Author

    I got it working on an 85, but software i2c was a little patchy, and I'm assuming that you are in need of the extra pins

  7. brickstuff commented on Nov 3, 2018

    @brickstuff
    Contributor

    Correct, not just the pins but hardware SPI support. The 88 is a really neat little chip in that way.

  8. moosepr commented on Nov 3, 2018

    @moosepr
    Author

    Yeah it is a great chip. I'm not sure if it's the lower clock speed, or some kind of interrupt issue

  9. brickstuff commented on Nov 3, 2018

    @brickstuff
    Contributor

    I'm going to see if I can add pin definitions on my own. Need to make a large pot of coffee and spend a few hours with datasheets, but it has to be possible.

  10. moosepr commented on Nov 3, 2018

    @moosepr
    Author

    Good luck!

  11. leachim6 commented on Apr 11, 2019

    @leachim6

    Was this ever fixed in any future iterations of the library?
    I'm having the same issues with Attiny88.

  12. brickstuff commented on Apr 11, 2019

    @brickstuff
    Contributor

    Was this ever fixed in any future iterations of the library?
    I'm having the same issues with Attiny88.

    As far as I know, nothing has been done. I was unable to get it to work, which is too bad, because I have another project coming up where the 88 would be a great fit.

  13. added
    platform: avr
    area: core
    status: stale
    status: triage
    on Apr 16, 2026
  14. zackees commented on Jun 3, 2026

    @zackees
    Member

    Tracked in FastLED/fbuild#389 for AVR / megaAVR / ATtiny fbuild platform/build support validation.

    That fbuild issue is scoped to board metadata, toolchain/backend support, and FastLED smoke-build evidence. Any remaining FastLED source/platform-code blocker should stay linked from both sides.

  15. zackees commented on Jun 3, 2026

    @zackees
    Member

    fbuild build-system status update (tracker: FastLED/fbuild#389)

    This issue is on the FastLED side. The fbuild build system already supports ATtiny88 fully:

    • Board metadata attiny88.json present.
    • ATTinyCore framework (tiny) is registered in avr_frameworks.json.
    • Smoke fixture at tests/platform/attiny88/ builds cleanly.

    The remaining work is the static_assert(validpin(), "Invalid pin specified") in fastpin.h:207 for ATtiny88 pin numbers above what the existing pin map covers. That's FastLED-side, not a build-tool issue.

  16. zackees commented on Aug 1, 2026

    @zackees
    Member

    Closing as completed — ATtiny88 is supported now, and has been for a while.

    @moosepr, @brickstuff, @leachim6: the static_assert(validpin(), "Invalid pin specified") you all hit was exactly what @focalintent diagnosed in 2017 — FastLED had no pin/port map for the part, and it needs one at compile time because pin access is turned into direct register access.

    That map now exists, at src/platforms/avr/attiny/pins/fastpin_attiny.h:127:

    #elif defined(__AVR_ATtiny48__) || defined(__AVR_ATtiny88__)
    
    #define MAX_PIN 25
    _FL_DEFPIN( 0, 0, D); ... _FL_DEFPIN( 7, 7, D);   // PD0-PD7
    _FL_DEFPIN( 8, 0, B); ... _FL_DEFPIN(14, 7, B);   // PB0-PB5, PB7
    _FL_DEFPIN(15, 2, A); ... _FL_DEFPIN(18, 1, A);   // PA2, PA3, PA0, PA1
    _FL_DEFPIN(19, 0, C); ... _FL_DEFPIN(25, 7, C);   // PC0-PC5, PC7
    
    #define SPI_DATA 11
    #define SPI_CLOCK 13
    #define SPI_SELECT 10
    #define AVR_HARDWARE_SPI 1
    #define HAS_HARDWARE_PIN_SUPPORT 1

    @brickstuff — note AVR_HARDWARE_SPI 1. The hardware SPI you specifically wanted the 88 for is wired up, not just the GPIO.

    The pin map came from @vladimir Shatalov in 2023; a dedicated CI job (.github/workflows/build_attiny88.yml) was added in Dec 2024, so the build is now verified on every push and carries a badge in the README's ATtiny row.

    One thing to watch, since it's what started this thread. @moosepr, you described your LED on "PA3/PCINT27 which links to pin 26 in arduino terms." In FastLED's map above, PA3 is pin 16, not 26 — and MAX_PIN is 25, so 26 would still fail the assert. Core-specific numbering for the x8 parts varies, so use the port-based mapping above rather than whatever number your core's pinout diagram prints. _FL_DEFPIN(16, 3, A) is the authoritative statement that FastLED pin 16 drives PA3.

    Also worth knowing before you start: the ATtiny88 has 512 B of RAM, and ci/boards.py:272 classifies it as a tiny-memory target. At 3 bytes per LED plus overhead you have room for a modest strip and not much else — the CI job builds a reduced example set for this reason. If something compiles but behaves strangely at larger LED counts, suspect RAM before suspecting timing.

    @moosepr — sorry it took this long; glad the 328 unblocked you at the time.

  17. moved this from Triage to Done in FastLED Trackeron Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreplatform: avrstatus: stalestatus: triage

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions