API

s-light CircuitPython TLC5957 library.

CircuitPython library for TI TLC5957 48-channel 16bit LED-Driver

  • Author(s): Stefan Krüger

Implementation Notes

Hardware:

Software and Dependencies:

class slight_tlc5957.TLC5957(spi, spi_clock, spi_mosi, spi_miso, latch, gsclk, pixel_count=16)

TLC5957 16-bit 48 channel LED PWM driver.

This chip is designed to drive 16 RGB LEDs with 16-bit PWM per Color. The class has an interface compatible with FancyLED. and with this is similar to the NeoPixel and DotStar Interfaces.

Parameters:
  • spi (SPI) – An instance of the SPI bus connected to the chip. The clock and MOSI must be set the MISO (input) is currently unused. Maximal data clock frequence is: - TLC5957: 33MHz
  • latch (DigitalInOut) – The chip LAT (latch) pin object that implements the DigitalInOut API.
  • gsclk (PWMOut) – The chip Grayscale Clock pin object that implements the PWMOut API.
  • pixel_count (bool) – Number of RGB-LEDs (=Pixels) are connected.
class Function_Command

Enum for available function commands.

set_channel(channel_index, value)

Set the value for the provided channel.

Parameters:
  • channel_index (int) – 0..(pixel_count * 3)
  • value (int) – 0..65535
show()

Write out Grayscale Values to chips.