Hi,
This post has been updated to share some sample code for getting the TLC99108 LED driver to work with the IMP002.
Sample code:
`// Initialize the I2C bus
i2c <- hardware.i2c89;
i2c.configure(CLOCK_SPEED_100_KHZ);
// Configure Pin A which controls the RESET for the TLC59108 and enable
hardware.pinA.configure(DIGITAL_OUT);
hardware.pinA.write(1);
// Setup auto-increment, turn all LEDs off, and set LED output state to individual PWM control
const TLC_CONFIG = “\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xAA\xAA”;
i2c.write(0x86, TLC_CONFIG);
// Set auto-increment of brightness registers and turn on all LEDs (not full brightness)
i2c.write(0x86, “\xA2\x10\x10\x10\x10\x10\x10\x10\x10”);`
TLC59108 LED driver documentation (http://www.mouser.com/ds/2/405/slds156a-117752.pdf)
NOTES:
-
There appears to be an error in the Register Description documentation (pg16). I had to add a byte between GRPFREQ and LEDOUT0. LEDOUT0 and LEDOUT1 are set to /xAA in my example above.
-
Lastly, don’t forget to pull up the RESET pin if necessary. Mine was tied low and it took me ages to realise. Doh.
Regards, Steve.