This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TLC5927 Special Mode

Other Parts Discussed in Thread: TLC5927

Greetings,

I'm building a consumer product with lots of LEDs and using six TLC5927 ICs. These are being driven with Arduino Mega 2560. Am able to drive the TLC5927s OK, except having trouble getting into Special Mode with Arduino code. Looking for sample code.

 

Thanks,

Theron Wierenga

  • Hi Theron,

     

    There is no sample code available for the TLC5927; although, some other users have posted their code on the E2E forum.  Here is an example post:

    http://e2e.ti.com/support/power_management/led_driver/f/192/p/357792/1266568.aspx#1266568

     

    Regards,

    Adam Hoover

    Applications Support Engineer

  • Hi Adam,

    Thanks for the reply. I checked out your link. That code involved error detection and their pseudo code for going into special mode was "Go into special mode". I'm toggling the oe and latch as described in the data sheet with no luck. Do I need to delay a few microseconds between each action?

    Thanks, Theron

  • Adam,

    I'm trying to set the brightness of the LEDs with the config. code, using all 0s so I'll notice the difference. I don't believe I ever enter Special Mode as later code just turns on the LEDs without any code to return to Normal mode. Here's my code (pretty simple) to set Special mode and send 16 bits.

    digitalWrite(51, LOW); // Pin 51 goes to SDI, pin 2, on TLC5927

    digitalWrite(cs1, LOW); // cs1 goes to LE, pin 4, on TLC5927
    digitalWrite(oe1, HIGH); // oe1 goes to OE, pin 21 on TLC5927
    delayMicroseconds(10);
    digitalWrite(clk, HIGH); // Clk 1, clk goes to CLK, pin 3 on TLC5927
    delayMicroseconds(10);
    digitalWrite(clk, LOW);
    digitalWrite(oe1, LOW);
    delayMicroseconds(10);

    digitalWrite(clk, HIGH); // Clk 2
    delayMicroseconds(10);
    digitalWrite(clk, LOW);
    digitalWrite(oe1, HIGH);
    delayMicroseconds(10);

    digitalWrite(clk, HIGH); // Clk 3
    delayMicroseconds(10);
    digitalWrite(clk, LOW);
    digitalWrite(cs1, HIGH);
    delayMicroseconds(10);

    digitalWrite(clk, HIGH); // Clk 4
    delayMicroseconds(10);
    digitalWrite(clk, LOW);
    digitalWrite(cs1, LOW);
    delayMicroseconds(10);

    digitalWrite(clk, HIGH); // Clk 5
    delayMicroseconds(10);
    digitalWrite(clk, LOW);
    delayMicroseconds(10);

    for (int i = 0; i < 14; i++)
    {
    digitalWrite(clk, HIGH); // Sending all 0s, to make display very light
    delayMicroseconds(10);
    digitalWrite(clk, LOW);
    delayMicroseconds(10);
    }

    digitalWrite(cs1, HIGH);
    delayMicroseconds(10);
    digitalWrite(clk, HIGH); // Clk 15
    delayMicroseconds(10);
    digitalWrite(clk, LOW);
    digitalWrite(cs1, LOW); // Latch in Config. code
    delayMicroseconds(10);

    Thanks, Theron