Go Down

Topic: TLC5940 to drive LED and Servos simultaneously (Read 590 times) previous topic - next topic

xovez

Hi!

I'm using my Leonardo to drive 10 daisy chained TLCs. They work succesfully with LEDs.

Now, I need to move 4 servos. Tried Servo class, but the TLC library modifies the Leonardo timers and PWM pins doesn't work  =(
Viewing what TLC library includes a "tlc_servo.h" header, I tried to use it: several channels to LED and 4 of them for servos. The result is what stopped work both: LED and Servos.

My question: Is there a timer configuration, for TLC_PWM_PERIOD and TLC_GSCLK_PERIOD, valid to use LED on some channels and Servos in others channels together?

fungus

The TLC5490 library hijacks two of the timers, one pair of PWM pins should still work.

OTOH you could connect the servos to a TLC5490.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

xovez

None of the PWM channels works on Leonard after load TLC library  :~

I tried to use some of the TLC channels to drive servos, but the timers was configured to LEDs needed frequency, and servos does not work.

After two days, I finally choose the SoftwareServo librar succesfully, which uses common delays to drive servos.

But if someone has a timer config to make them works together, i will be very happy  ;)


P.D.: un saludo andaluz a Valencia!

Go Up