I have the TLC59711 hooked up to a Raspberry Pi and a 12V power source:
GND = shared ground between RPi and 12V source
V+ = 12V source
CI = RPi CLK
DI = RPi MOSI
The Green LED on the TLC59711 board is on and the VCC pin gives 3.3V, as expected.
I've hooked up an LED to each of R0, G0, and B0. If I connect the LED to the adjacent V+ pin (with a current-limiting resistor) instead of the output pin, it lights as expected. [Aside: I shouldn't need a resistor using the output pins, right? The TLC59711 with your 3.3k resistor should limit the current to 15mA. I've tried it both with and without.]
I'm using this Python library to do SPI: https://github.com/lthiery/SPI-Py
I've confirmed that if I connect the RPi's MOSI and MISO pins, I get back whatever I send out, so the data appears to be being sent properly.
Based on the Arduino sample that you supply ( https://github.com/adafruit/Adafruit_TL ... C59711.cpp ), I'm sending:
0x96 0xDF 0xFF 0xFF, followed by 24 bytes of data (16 bits * 12 outputs).
Those first four bytes translate to the same thing the Arduino code sends:
Code: Select all
100101 10110 1111111 1111111 1111111
0x25 0x16 0x7F 0x7F 0x7F
Here's the python I'm using...
Code: Select all
>>> import spi
>>> spi.openSPI()
{'delay': 0, 'speed': 500000, 'bits': 8, 'mode': 0}
>>> data = (0x96, 0xDF, 0xFF, 0xFF) + tuple([0xFF for i in range(24)])
>>> len(data) * 8
224
>>> resp = spi.transfer(data)
>>> print " ".join([hex(x) for x in resp])
0x96 0xdf 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff