Go Down

Topic: Attiny85 and TLC5940's (Read 1 time) previous topic - next topic

funkyguy4000

Feb 27, 2012, 07:13 am Last Edit: Mar 04, 2012, 03:33 am by funkyguy4000 Reason: 1
Seeing as how the atmega328 is a atmel and the Attiny is from atmel as well i figured here would be the best place to ask.
The library for the TLC5940, would that work as is with the Attiny85?  I need to run 2 TLC5940s and i'm looking for the smallest option.

-thankS!
Accelerate to 88 miles per hour.

johnwasser

They act as shift registers and can be cascaded (see Figure 12 of the datasheet) so you can connect more then one to a single SPI port or use shiftOut() to implement Software SPI on any three data pins.

It's not clear what you mean by "the library for the TLC5940".  The chip is easy enough to use that you shouldn't need a library.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

funkyguy4000

There is an arduino library for the TLC5940's and i wanted to know if that would port over from the avr atmega to the avr attiny.
What acts like shift registers? Attiny or TLC
Accelerate to 88 miles per hour.

johnwasser

It's the TLC that acts like a shift register.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

funkyguy4000

So i would need to get used to using the ShiftOut command eh?

How would i make the ShiftOut command work like the TLC5940 Library addFade command and updateFades

the addFade is usually addFade(channel, start value, max value, start millis, end millis);

how would the shift out work like that?
Accelerate to 88 miles per hour.

funkyguy4000

So I'm confused still, I've researched it and all.
I can't figure out how to control the TLC5940 with the ATtiny without a library.

I'm not at the point to where i can look at a datasheet for a microcontroller and then program it to tell it how to control a driver, anybody wanna help out?
Accelerate to 88 miles per hour.

funkyguy4000

Accelerate to 88 miles per hour.

johnwasser

It is possible that the TLC5940 library you want to use will work on the ATtiny85.  I recommend you get your program working on the Arduino UNO first.  Once it is working there you can worry about porting it to the smaller chip (1/4 the program space and 1/4 the RAM space).

Is there some reason why you must port it to the ATtiny85?
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

funkyguy4000

I have little space on the project board and I may need to add some caps for the project to work, those caps have no room on the board with the atmega.
Accelerate to 88 miles per hour.

Go Up