I'm using a TLC5940 chip to control LEDs.
I also use the Wire.H library to get information from another arduino ( they're connected with I²C protocol ).
When i use the TLC5940.h without the Wire.h, it works perfectly.
But when i use them both and add Tlc.init() in the setup() function, i receive the information from the other arduino but the TLC5940 chip doesn't work.
Can we use the Wire.h library with the TLC5940.h ????
Is there any solution ??
From the TLC5940 datasheet:
"The TLC5940 has a flexible serial interface, which can be connected to microcontrollers or digital signal
processors in various ways. Only 3 pins are needed to input data into the device. The rising edge of SCLK signal
shifts the data from the SIN pin to the internal register. After all data is clocked in, a high-level pulse of XLAT
signal latches the serial data to the internal registers. The internal registers are level-triggered latches of XLAT
signal. All data are clocked in with the MSB first. The length of serial data is 96 bit or 192 bit, depending on the
programming mode."
This reads more like an SPI interface. I2C depends on the part recognizing its address and responding.
XLAT here is acting more like a slave select line.
CrossRoads:
This reads more like an SPI interface. I2C depends on the part recognizing its address and responding.
XLAT here is acting more like a slave select line.
I think he's saying he's got two Arduino's connected via I2C and he's trying to use the TLC5940 on one of them.
While I was trying to sort out problem I was having with the TLC5940 I noticed a number of posts where people were having problems using Wiring and the TLC5940 (there are actually several issues listed on the TLC5940's library google page).
There was a suggestion to switch the TLC5940 to "bit-bang" mode instead of hardware SPI so perhaps that's worth a try?