Goodmorning to all, I'm trying to develop an application using TLC5973 LED driver with a small 8 bit microcontroller. I can't find any information about the EasyStep 1-wire comunication interface. I readed the datasheet many times but it didn't help me so much...
My code is this:
#define PULSE() oLED = 1; oLED = 0; void writeZero(){ PULSE(); NOP(); NOP(); NOP(); NOP(); NOP(); NOP(); NOP(); NOP(); } void writeOne(){ PULSE(); NOP(); PULSE(); NOP(); NOP(); NOP(); NOP(); NOP(); } void writeWord(unsigned short word){ unsigned char i; for(i = 0; i < 12; i++){ if(word & 0x0800) writeOne(); else writeZero(); word <<= 1; } } void setLed(unsigned short R, unsigned short G, unsigned short B){ writeWord( 0x03AA); writeWord( R ); writeWord( G ); writeWord( B ); waitGSLAT(); }
With the oscilloscope all timing is right (I get a tcycle of 2us, with the writeOne function the second pulse is under 50% of tcycle) but no result are given on the output led. The LED is ok and I changed 3 different TLC5973 to ensure that also the driver is ok...
Someone has an idea of what is going wrong?
Regards
Alessio