As I have to control servos by TLC5940NT in Arduino Uno.
During testing, the servos are not rotated as per command and sometimes it stopped and not working.
The wiring diagram is attached in file.
Simple program I have used for servos testing, given below,
#include "Tlc5940.h"
#include "tlc_servos.h"
#define SERVO_CHANNEL 0
#define DELAY_TIME 20
void setup()
{
tlc_initServos(); // Note: this will drop the PWM freqency down to 50Hz.
}
void loop()
{
for (int angle = 0; angle < 180; angle++) {
tlc_setServo(SERVO_CHANNEL, angle);
Tlc.update();
delay(DELAY_TIME);
}
for (int angle = 180; angle >= 0; angle--) {
tlc_setServo(SERVO_CHANNEL, angle);
Tlc.update();
delay(DELAY_TIME);
}
}
Thank you,
Regards,
Nirav