Due to the U.S. Thanksgiving holiday, please expect delayed responses during the week of 11/22.

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.

TLC5925: 3 cascaded TLC input and output problems

Part Number: TLC5925

Hi, I just want to ask the about this 16 channel LED driver, I have just started doing coding and arduino (i am a noob), roughly more than month now, and I needed to drive two rows of seven segments (each row has 13 seven segments)

I was able to produce 0 - F characters (using 8 bits e.g. 00001000, 11111111) by using a 2x8 keypad, but I  needed to place each character in each segment accordingly. 

the problem is, the output is scattered, , the cause maybe because of the 2 TLCs that functions as the scanner for each row.

I'll show you the circuit below.,.. PLEASE DO NOT MIND THE Data, clock, latch, pins on TLC 3. They are already corrected on the actual circuit.

I need some help from someone out there...

thanks a lot!

  • Hi Billy,

        Actually, I don't understand what your problem is? Can you clarify it more clearly?

       Besides, the schematic is not clear enough.

  • Hi!, I am very sorry for the confusing statements.

    Ok, i'll try my best to sort my explanation and problem.

    The above picture is a 26 seven segment board, that is controlled by three TLC5925

    The Data, clock, and latch pins of the board are connected from an arduino board. the connection goes as. Arduino -> TLC 3 ->TLC 2 ->TLC 1

    the clock and latch are all connected across the three TLCs. while the main data pin is connected to the TLC 3, then that TLC  has its data output to TLC 2, then TLC 1.

    TLC 2 has the scan (ground) control over scan segments 1 (from the bottom row of seven segments) up to segment 16 in the top row . 

    my problem arises as I needed to control only certain seven segments at specific points.  nlike in the picture below

    (i hope you get the picture, sorry)

    now all of these things are controlled by another board that contains the keypad, simple tact switch.

    MY PROBLEM IS in my arduino program, I cant seem to control where the seven segments should appear. I was able to control that characters and symbols that appears in every  seven segment, but it appears in random positions. I'll attach my program in the file section. 

    NOW MY MAIN QUESTION IS for TLC5925, given that it is a 16 channel led driver, how many bits per string should i input. I normally put 8, because I tried to put 16 bits but it seems to have no effect. 

    i think its getting random because all three TLCs are giving an output at the same time,  I know - but still i cant get my head around how to do the program

    //
    //2x10 Keypad, 7 Segment Display and 74HC5925 IC Experiment #1
    //
    /*
              7 segment coding MSDFIRST 
              Note: 0=High; 1= low -> because of 3 TLC
      Symbol    a b c d e f g       hex         dec    
        0         10001000           88          136
        1         11101011           Eb          235
        2         01001100           4C          76
        3         01001001           49          73
        4         00101011           2B          43
        5         00011001           19          25
        6         00011000           18          24
        7         11001011           CB          203
        8         00001000           8           8
        9         00001011           B           11
        A         00001010           A           10
        b         00111000           38          56
        C         10011100           9C          156
    
    
    wiring ports
                  26 seven segment board to IXduino
                        Data = 3
                        Clock = 2
                        latch = 1
    
    2 x 10 Keypad
    Rows = set to LOW             columns
    R2 = A2                       C2 = 6
    R4 = 9                        C3 = 5
                                  C4 = 7
                                  C5 = 8
                                  C6 = A1
                                  C7 = A4
                                  C8 = A3
                                  C9 = Ao
    
    
    */
    #include <Keypad.h>
    
    const int latchPin = 1; 
    const int clockPin = 2;
    const int dataPin = 3; 
    
    //display           0,  1,   2,   3,   4,   5,   6,   7,   8,   9,   A,  b,   C,   d,   E,   F
    int keymap[16] = { 
      0B11101011, 
      0B01001100, 
      0B01001001, 
      0B00101011, 
      0B00011001, 
      0B00011000, 
      0B11001011, 
      0B00001000, 
      0B00001011, //9
      0B10001000, //0
      0B00001010, //A
      0B00111000, //b
      0B10011100, //C
      0B01100100, //d
      0B00011100, //E
      0B00011110
      };
    
    
    const byte ROWS = 2;
    const byte COLS = 8;
    char hexaKeys[ROWS][COLS] = {
      {'1', '2', '3', 'A', '4', '5', '6', 'B'},
      {'7', '8', '9', 'C', '*', '0', '#', 'D'}
    
    };
    
    byte rowPins[ROWS] = {A2, 9};
    byte colPins[COLS] = {6, 5, 7, 8, A1, A3, A4, A0};
    
    Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);
    
    void setup ()
    {
      //set pins to output
      pinMode(latchPin, OUTPUT);
      pinMode(clockPin, OUTPUT);
      pinMode(dataPin, OUTPUT);
    
      Serial.begin(9600);
      displayKey('0');
    }
    void loop()
    {
      readKey();
    }
    
    void readKey() {
      char key = customKeypad.getKey();
      if (key != NO_KEY)
      {
        displayKey(key);
      }
    }
    
    void displayKey(char key) {
      Serial.write(key);
      int keycode = 0;
      switch (key) {
        case '0':
          keycode = keymap[0];
          break;
        case '1':
          keycode = keymap[1];
          break;
        case '2':
          keycode = keymap[2];
          break;
        case '3':
          keycode = keymap[3];
          break;
        case '4':
          keycode = keymap[4];
          break;
        case '5':
          keycode = keymap[5];
          break;
        case '6':
          keycode = keymap[6];
          break;
        case '7':
          keycode = keymap[7];
          break;
        case '8':
          keycode = keymap[8];
          break;
        case '9':
          keycode = keymap[9];
          break;
        case 'A':
          keycode = keymap[10];
          break;
        case 'B':
          keycode = keymap[11];
          break;
        case 'C':
          keycode = keymap[12];
          break;
        case 'D':
          keycode = keymap[13];
          break;
        case '*':
          keycode = keymap[14];
          break;
        case '#':
          keycode = keymap[15];
          break;
        default:
          keycode = 0;
          break;
      }
      digitalWrite(latchPin, LOW); 
      shiftOut(dataPin, clockPin, MSBFIRST, keycode);
     
      digitalWrite(latchPin, HIGH); 
    }

  • Hi Billy,

        I have the following advice according to your description.

        1. Try to using only one TLC5925 to drive the seven segments. Ensuring that your timing sequence is the same as the figure 1 shown in the datasheet.

    Since it is 16 channel LED driver, you should at least in put 16 bit data for each channel as shown in figure 1. And using scope to see the timing sequence of your CLK,OE,LE and SDI is right or not.

        2. If the step 1 has been done with no problem, try to use 3 TLC5925 to drive the seven segments. Check the SDO is normal or not. I guess that your problem mainly related to the timing sequence of LE. You may be give the LE in the wrong time.

  • Thank you for responding sir!

    I will do what you suggested

  • Hi Billy,

        Hope to hear good news.