% !TEX root = master.tex
\subsubsection{SPI Controlled RGB LEDs}
RGB LEDs with SPI driven controllers was investigated for possible implementation early into the project. As these sort of devices can be found commonly, at an affordable price, and can come pre-assembled for easier implementation. These can be found regularly in either dedicated individual boards or in a strip form. Additionally as such, SPI capable hardware is commonly found integrated into microcontrollers as a module, giving this possible control solution a strong weighting to be investigated. There were two main driver ICs examined for this style implementation, both commonly come on a strip interface. The WS2801 and LPD8806 we both looked into for further research. The idea of individual modules were quickly passed over due to runaway costs caused by the physical size of the array to be constructed.

The WS2801 and LPD8806 both essentially accomplish the same idea, which is to take in data from a serial line, and then convert that into driving signals for the LEDs while additionally providing current control circuitry. The basic implementation of control for both ICs is to; select the line to push data over, push data, drop line and move onto next line to drive. Therefore as the Smart Table is planned to implement a 16 x 32 array, sixteen lines would be used overall. This gives a total number of selector lines of sixteen, data lines an addition two or three depending on implementation, therefore worst case a total of nineteen lines to drive the total array of LEDs. Therefore on the microcontroller itself, this would require nineteen pins to properly control this number of strips without implementing a hardware multiplexer to reduce lines. As such this solution is viable from the start in terms of control, as the number of pins is reasonable with the available microcontrollers. Another benefit to this implementation is the data throughput, SPI has a higher data transfer rate and given the added bonus of the driving being done by hardware, maximum clock cycles can be dedicated to the generation of the next image frame. Optimizations due to the functionality of the IC is also possible; for example the LPD8806 supports image holding, or basically the fact the developer does not have to immediately send a refresh frame is there isn't a change that was computed. This allows also for far faster code given intelligent software design. Both ICs are good choices for implementation with some available documentation on both also being available. 

SPI driven control was passed on due to a few reasons. The cost of strips, while not incredibly high, is a stumbling point considering the lack of control over the physical design of strips and the output of the LEDs also. Additionally as with strips, the design of the Smart Table must be made with this in mind and thus is a design around the strips instead of the other way around, a severe limitation if an unforeseeable issue crops up during development. Therefore, while a good idea for multiple reasons, ultimately the idea of using SPI controlled LEDs was passed on.