Pages: [1]   Go Down
Author Topic: TLC5940 to drive LED and Servos simultaneously  (Read 505 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-cry
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?
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 143
Posts: 5309
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

None of the PWM channels works on Leonard after load TLC library  smiley-confuse

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  smiley-wink


P.D.: un saludo andaluz a Valencia!
Logged

Pages: [1]   Go Up
Jump to: