AVR Attiny2313. Limit 41 LEDs
Closed this issue · 1 comments
the issue is in this function:
void inline ws2812_sendarray_mask(uint8_t *data,uint16_t datlen,uint8_t maskhi)
If the pointer of type struct cRGB
exceeds a size of 127 Byte the program is going to crash at the very beginning.
The limit is 41 LEDs.
leds * sizeof(cRGB) + pointerSize = 41 * 3 + 4 = 127
. and that's the limit
The Attiny2313 is capable of driving far more LEDs. I tested it on my own with a program which enables all LEDs at the same colour (F_CPU = 12MHz). Even the assemby part was unneccesary, since the whole program was written in C.
Well, the reason for this is fairly obvious: The ATtiny2312 only has 128 bytes of memory.
If you want to control more LEDs, you can write out the data in memory several times. Take a look at the examples.