I was super stoked to get my ATTiny85. I love tiny electronics. Well, they came in, and they run BLINK, but I cannot get them to control my WS2812 LEDs.
I've confirmed that my LEDs are all fine -- can control them easily from my MSP430 Launchpad.
I've tried lots of different things to get them to work with the ATTiny: three different LED libraries, three different ATTiny board definitions, I tried running my ATTiny at 16MHZ instead of 8MHZ, I tried different versions of Arduino (1.6+ and 1.0+), and I've tried different physical ATTinys themselves. I do have a capacitor on my power supply. I've confirmed that my ATTiny is running at 5v. I do have a resistor on my data channel. Again, my LEDs work perfectly on my MSP430 without any hardware change except moving the data wire. I'm at a loss. All they do is turn full bright white -- a blinding reminder of my failure.
Yeah. If you want help, follow the forum rules. Post your code, schematics, pictures etc. The forum rules are designed to help us non-psycic form members to help you.
I can tell you that an attiny85 can control ws2812 leds at 8MHz, I have done it myself.
My LEDs are powered from computer's USB port, running ~.9 amp 5V power. I stuck a capacitor here, as suggested.
They work perfectly:
Now, for the ATTiny85. I'm running it thru the Tiny AVR Programmer VIA Sparkfun
I'm running a 5k resistor out of port 1, as suggested. This leads to my LEDs lighting up, but being completely unresponsive and looking just like this:
Here's my arduino code. It is identical to my Energia code but uses the standard Adafruit Neopixel library:
As i said in the original post: I've tried every variation of setting i could think of beyond this (ws2812 librarys, arduino versions, attiny board definitions, power config of hardware, clock speed, physical chip), so I'm out of ideas.
I've now tried 15k, 5k, 510, 220, and none-at-all. It seems like anything above 10k sends too low of a signal and they don't even turn on. Every other value has the same blinding result of all white with no responsiveness.
Reducing the the size of the LED strip does in fact reduce the LEDs that get turned to full white. Reducing my strip size to 7 does, in fact, only light up 7 unresponsive LEDs.
Did you select the higher clock speed and burn the fuses ? I thought the ATTiny can only manage 8MHz with its internal resonator ? are you using an external crystal in the design ? Otherwise I think it defaults to 1MHz
ATTiny can actually go to 20MHz, I think. ATTiny specs
I've confirmed that I am getting 5V to the chip.
For both chips I tried, I started both chips by flashing BLINK at 1MHz. I then tried using 8MHz and running the adafruit strandtest example (as included above), and it's already unresponsive.
That's what made me use the two other board definitions that allow the 85 to go to 16MHz -- I thought maybe it needed that jolt.
(some time passes here)
I actually just came across this link talking about 16MHz ATTiny85, and this line came up:
One caveat of programming is, when using a brand new chip, or when changing the clock speed, you need to choose Burn bootloader from the menu. This will set the fuses on the chip so that it runs at the selected clock speed.
If your LEDs aren't responding correctly, make sure you've burned your bootloader.
And everytime you change the clock setting (and probably some other possible board settings) make sure you burn your bootloader.