Prototype
Visuals Driver
This datasheet is for the driver section of the visuals block. The project is the Fount of Power. Figure 1 below is the whole block diagram for the visuals section. Note that there are visuals for both the Fount and the cup, but everything about these blocks is identical (functions, pin-outs, voltages, LEDs used, ect.). Figure 2 shows a schematic for the driver.
Block Diagram
Figure 1: Level 1 Block Diagram Cup & Fount.
Multisim
Figure 2: Driver Schematic.
Inputs
Figure 3: Plot of SCLK and SIN (SIN on top SCLK below) Sending 0b0000 0111 1011.
Figure 4: Current Sink from Driver.
Signals at test points
LED
Figure 2: LED pinout.
Inputs
This is simply a 3.3V signal.
Outputs
Figure 3: LED current sink plot.
Code Prototype
Flow charts
Figure 2: Main Code Flowchart.
Figure 3: writeLED Function Flowchart.
Software Inputs and Outputs
Example Function Calls:
void main (void)
{
fadeLEDs('r',5); // These fade functions take in the color and step scaler
fadeLEDs('g',5);
fadeLEDs('b',5); // These fade
fadeLEDs('c',5);
fadeLEDs('y',5);
fadeLEDs('m',5);
fadeLEDs('w',5);
flashLEDs('r',255,60000); // Flash red at 255 brightness with a set delay
flashLEDs('r',255,60000);
flashLEDs('r',255,60000);
flashLEDs('r',255,60000);
fillLEDs('r', 25); // LEDs 0-7 fade-in in order and fade-out in order
followLEDs('r', 30, 1); // LEDs 0-7 fade-in and out one by one
followLEDs('w', 30, 4);
for(i = 0; i < 10; i++) // pourLEDs takes in the color and a value based on a defined ratio to set
delay(10000); // the brightness.
pourLEDs('b', 2);
for(i = 0; i < 10; i++)
delay(10000);
pourLEDs('b', 3);
for(i = 0; i < 10; i++)
delay(10000);
pourLEDs('b', 4);
for(i = 0; i < 10; i++)
delay(10000);
pourLEDs('b', 5);
}
Block outputs
Figure 4: Debug of writeLED showing pwmbuffer values.
Signals at test points.