i didn't understand how you could manage a TLC5940 with an ATtiny
did you use a library?
great i was reading that there are some problems with SPI on attinys... Did you solved them?
did you modify the TLC library for arduino or did you make a new one? Is that library public?
you haven't published it in some website yet, do you?
It would be great if you could share the library.
The CPU spends most of its time generating a clock output on a pin at about 4MHz (the tlc5940 needs a clock signal for the PWM). That's 100% in my book...
Quote from: fungus on Oct 04, 2012, 11:31 amThe CPU spends most of its time generating a clock output on a pin at about 4MHz (the tlc5940 needs a clock signal for the PWM). That's 100% in my book...Why not use one of the 2 counter/timers in the ATtiny85 to generate the 4MHz clock?
OK, here's a copy of my library...hope somebody finds it useful!http://www.artlum.com/arduino/tinytlc.html
#if defined (__AVR_ATtiny85__) || (__AVR_ATtiny84__)
well, i tried it and it worked very well: http://www.youtube.com/watch?v=3Br7PhvEIF0thank you for sharing it!
i had some problems because you suggested not to use millis and delays, but i see that the problems are caused only by delays, so we can use millis and micros... we just need to do the update method very often, right?
i've a question, i'm not an expert of making libraries, but to make this library work in an attiny84 do i just need to add this line?Code: [Select]#if defined (__AVR_ATtiny85__) || (__AVR_ATtiny84__)or is there some register settings to do?thanks again
TCCR1 = 0;
#if defined (__AVR_ATtiny85__) TCCR1 = 0;#else TCCR1A = TCCR1B = 0;#endif
I don't think millis() will do anything useful. I turned off the hardware timer in setup() (if it's ticking then there's a bug!)Time spent in between calls to update() is time the LEDs aren't lit up. I think you'd have to do a lot before you notice them get visibly dimmer, but bear it in mind.
#define TIME 100..._time=millis();while(millis()- _time < TIME) tlc5940.update();
I just tried it and there's a line in setup() that doesn't compile. The line is:Code: [Select] TCCR1 = 0;It should work if you replace that line with:Code: [Select]#if defined (__AVR_ATtiny85__) TCCR1 = 0;#else TCCR1A = TCCR1B = 0;#endifok thank you, after i'll try that if i've time
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16