Allows a 4 pin common cathode RGB LED to be controlled via a single Analog in. This is feasible because there are constrained color targets:
0.0 V = Blue
2.5 V = Green
5.0 V = Red
The bottom voltage source is a GPIO pin. An AC voltage source is used to simulate the range of possible voltages achievable with PWM.
NOTE: This circuit was built using the 2N3906 PNP Bipolar Transistors. For some reason, the green LED would not light. (It had an operating voltage of 3.2V. Same for blue while the red LED had a 2V operating voltage.) The simulator indicated approximately this voltage but measured voltages from the physical implementation only showed a peak voltage of around 2.5V. Anyone have any ideas why? (I think I may not have the Transistors configured properly. I tried figuring out more information from the data sheets, but couldn't quite figure out what I needed.)