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.

TLC5973: SDI pin

Part Number: TLC5973

Hi,

I've questions regarding TLC5973

- Can I use GPIO from microcontroller to drive the SDI pin? If no, please advise the appropriate pin to drive it

- Does this device has EVM?

Thanks

  • Hi Lih,

    Yes, it depends on the data you transmitting. If the data is not too many, you can use GPIO to transmit.

    Regards,

    Shawn.

  • Hi Shawn,

    How to quantify the data is too many? I use this LED driver for dimming, flashing and change color purpose only.
    Please advise if it's feasible?

    Thanks!
  • Hi,

    If you cascade too many devices, the data will too many to transmit.

    Also if you MCU GPIO frequency is too small, it still effect the data transmitting speed.

    Regards,

    Shawn.

  • Hi Shawn,

    Thank you so much for your advise. I only use 1pcs of TLC5973. Cascading is not required.

    Btw, can this device do dimming, flashing and change color? I'm rather new to the 'single-wire' interface. Do you have the sample code on how to control it?

    Thanks
  • below code based on MSP432E401 for your reference, thanks.

    #define WRTCMD 0x3AA
    #define cascade_N 2

    int main(void)
    {
        uint8_t jj;
        uint64_t ii;
        uint64_t GSOUT0[cascade_N]={0x0FA};//GS data//data from IC1 to IC_N
        uint64_t GSOUT1[cascade_N]={0xF0F};
        uint64_t GSOUT2[cascade_N]={0xFFF};

        uint64_t Data;

        uint32_t systemClock;

        /* Configure the system clock for 120 MHz */
        systemClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN |
                                              SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480),
                                              120000000);
        /* Enable the clock to the GPIO Port A and wait for it to be ready */
         MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
         while(!(SysCtlPeripheralReady(SYSCTL_PERIPH_GPIOA)))
         {

         }

        MAP_GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE,GPIO_PIN_2);//set a wire as the output of one-wire,SDI

        //data transfer rate measurement, setup tcycle=48 system time. // rate 500kHz
        MAP_GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_2,4);//write 1
        MAP_GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_2,0);//write 0
        MAP_SysCtlDelay(240);//2us
        MAP_GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_2,4);//write 1
        MAP_GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_2,0);//write 0
        //data write
        while(1)
        {
    //      GPIODirModeSet(,GPIO_PIN_2,GPIO_DIR_MODE_OUT);//set a wire as the output of one-wire,SDI
            for(jj=1;jj<cascade_N;jj++)//N-1 cascaded device data
            {
                Data=(((uint64_t)WRTCMD)<<12)+GSOUT2[jj-1];
                Data=(Data<<12)+GSOUT1[jj-1];
                Data=(Data<<12)+GSOUT0[jj-1];
                for(ii=48;ii>0;ii--)//write Data
                {
                    MAP_GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_2,4);//write 1
                    MAP_GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_2,0);//write 0
                    MAP_SysCtlDelay(60);//<50%
                    MAP_GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_2,Data>>(ii-3));//write data
                    MAP_SysCtlDelay(160);
                    MAP_GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_2,0);//write 0
                }
                MAP_SysCtlDelay(960);//wait for 4.5 tcycle to generate EOS
            }

            Data=(((uint64_t)WRTCMD)<<12)+GSOUT2[cascade_N-1];
            Data=(Data<<12)+GSOUT1[cascade_N-1];
            Data=(Data<<12)+GSOUT0[cascade_N-1];
            for(ii=48;ii>0;ii--)//write Data// last one data
            {
                MAP_GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_2,4);//write 1
                MAP_GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_2,0);//write 0
                MAP_SysCtlDelay(60);//<50%
                MAP_GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_2,Data>>(ii-3));//write data
                MAP_SysCtlDelay(160);
                MAP_GPIOPinWrite(GPIO_PORTA_BASE,GPIO_PIN_2,0);//write 0
            }
            MAP_SysCtlDelay(2400);//LAT generated,>8 tclock

        }
    }