Search code examples
carduinomicrocontrollerspiatmega

Conflict between LED driver and analog to digital conversion on Arduino


On the Arduino Nano V3, I am trying to get an LED driver (TLC5960) and two analog to digital (ADC) converters (MCP3208) to work together. The LED driver is on the same pins as this guide. The ADCs are assigned to different pins than the LED driver. I found that the LED driver conflicts with the SPI communication interface according to the comment:

Tlc.init();  //interferes with other SPI

but I'm not sure what to do about it since if this is not called, the LED driver does not work. It seems to be true, however, since if I comment out all of the LED driver related lines in my code, the ADCs work.

Also, I am using bit banging to communicate to the MCP3208.


Solution

  • If you look at the code, you'll see that tlc_config.h contains options relating to the communication and connection with the TLC'. Simply edit the options within that file to suit your needs.