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.

TLC59711: chaining 20 boards is causing slow update. Ideas?

Part Number: TLC59711

I have 20 boards chained together and can't seem to get a faster refresh rates than 0.04 seconds. This is just using a simply python script:

import argparse
import board
import busio
import time
import modules.ada_tlc59711 as tlc59711

num_boards = 20
if args.num_boards is not None:
num_boards = int(args.num_boards)

num_pixels = num_boards * 4

spi = busio.SPI(board.SCK, MOSI=board.MOSI)
leds = tlc59711.TLC59711(spi, pixel_count=num_pixels)

avg = 0
delta_count = 0
delta = 0

print("{} - Program Started One LED ON ".format(round(time.time())))
while True:
delta = time.time()
leds.show()
delta_count = delta_count + 1
delta = time.time() - delta
avg = avg + delta
if delta_count >= 100:
print(avg / delta_count)
avg = 0
delta_count = 0
Is this a limitation of the chip after chaining so many? Thanks.
  • Hi Mark,

    Thanks for reaching out, please give me some times to figure it out. I will get back to you ASAP.

    BR, Jared

  • Hi Mark,

    Could you please tell what is the CLK frequency?

    BR, Jared

  • It's running on a Raspberry Pi4 with a clock speed of 250MHz

  • Hi Mark,

    Could you please tell me which format the data you send to device to update the brightness, 16bit for each channel? Anything else?

    BR, Jared

  • I'm using this library:

    https://github.com/adafruit/Adafruit_CircuitPython_TLC59711/blob/main/adafruit_tlc59711.py

    It has this in the comments at the head:

    # How to send:
    # the first data we send are received by the last device in chain.
    # Device Nth (244Bit = 28Byte)
    # Write Command (6Bit)
    # WRCMD (fixed: 25h)
    # Function Control Data (5 x 1Bit = 5Bit)
    # OUTTMG 1bit
    # GS clock edge select
    # 1=rising edge, 0= falling edge
    # EXTGCK 1bit
    # GS reference clock select
    # 1=SCKI clock, 0=internal oscillator
    # TMGRST 1bit
    # display timing reset mode
    # 1=OUT forced of on latchpulse, 0=no forced reset
    # DSPRPT 1bit
    # display repeat mode
    # 1=auto repeate
    # 0=Out only turned on after Blank or internal latchpulse
    # BLANK 1bit;
    # 1=blank (outputs off)
    # 0=Out on - controlled by GS-Data
    # ic power on sets this to 1
    # BC-Data (3 x 7Bits = 21Bit)
    # BCB 7bit;
    # BCG 7bit;
    # BCR 7bit;
    # GS-Data (12 x 16Bits = 192Bit)
    # GSB3 16bit;
    # GSG3 16bit;
    # GSR3 16bit;
    # GSB2 16bit;
    # GSG2 16bit;
    # GSR2 16bit;
    # GSB1 16bit;
    # GSG1 16bit;
    # GSR1 16bit;
    # GSB0 16bit;
    # GSG0 16bit;
    # GSR0 16bit;
    # Device Nth-1 (244Bit = 28Byte)
    # Device ..
    # Device 2
    # Device 1
    # short break of 8x period of clock (666ns .. 2.74ms)
    # to generate latchpulse
    # + 1.34uS
    # than next update.
    # """

  • Hi Mark,

    It seems that TLC59711 only can support 50MHz CLK, I am not sure what's the behavior of 250MHz CLK.

    According to your program, there are 244bits for 1 device and total 244*20bits for 20 device. So, I use the max CLK frequency to calculate the refresh rates. It should be 4880*20ns = 97.6us. Therefore, I think the refresh rates can be faster than 0.04s.

    BR, Jared

  • So the issue was that I wasn't setting a baudrate with the busio library when creating the spi object. Sorry for all the trouble, it was a software issue, not a hardware issue at all. Thanks for your prompt responses.