Num LEDs limited to 78 when using ATtiny85

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
sdarquea
 
Posts: 2
Joined: Thu Sep 14, 2017 3:00 am

Num LEDs limited to 78 when using ATtiny85

Post by sdarquea »

Hello,
I'm trying to use the Adafruit NeoPixel Library (with the Attiny-Core) with an Attiny85-20PU to drive a sk6812 strip with 144 Leds. When using an arduino Uno it works fine with any number of LEDs, but when I use the tiny, if I specify more than 78 LEDs nothing happens. Is there some inherent limitation of the chip - like limited memory - that's preventing it from working? Or, might it have something to do with the library? Thanks!

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Num LEDs limited to 78 when using ATtiny85

Post by dastels »

Yes, it only has 512 bytes of RAM... that's half a K. At 3 bytes per NeoPixel. Conceivably you could fit a buffer for 170 pixels... but you have other things using RAM as well. My guess is that when the code tries to allocate the NeoPixel buffer it can't. When that happens, the library happily sets things to use no pixels. It doesn't crash... it just doesn't control any pixels.

The MCU in the UNO is an ATmega328P that has 2K of ram... 4 times as much.

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”