2024-12-20 06:03 AM
I'm trying to control LED's through a (TI) TLC5947 Driver. All the examples I can find are using a library by Adafruit, bitbanging GPIO's to communicate with the chip. I'm just using the two chips on a custom board and would like to use SPI due to its speed (and control).
I can toggle the driver's blank & latch just fine, but I'm having trouble understanding the Serial part of the communication. Right now I'm sending 12 bits (0xFFF) 24 times, then toggling the latch, but this is clearly wrong because some LEDs are on (very dim) and others are off.
If someone could provide me with some quick example code using SPI using the STM32 HAL, or point me towards a guide for sending this non-conventional way of SPI.
2024-12-20 06:10 AM - edited 2024-12-20 06:13 AM
@davidvandijk wrote:I'm having trouble understanding the Serial part of the communication. .
You really need to ask TI about that; it's their product - nothing to do with ST.
Maybe they already have something SPI-based ... ?
https://www.ti.com/product/TLC5947#support-training
@davidvandijk wrote:Right now I'm sending 12 bits (0xFFF) 24 times, then toggling the latch, but this is clearly wrong because some LEDs are on (very dim) and others are off.
Have you used an oscilloscope or logic analyser to capture what's actually happening on the wires, and compared that to what the datasheet specifies?
https://www.ti.com/lit/ds/symlink/tlc5947.pdf#page=8
Maybe present your capture to TI for their opinion...