I have a green/red bi-colour common cathode LED. Normally I'd take the cathode leg to 0V through a resistor, and wire each of the anodes to its own input. I would then be able to control the colour of the LED by setting either of the anodes to high for the individual colours, or both together to make a third yellow-like colour.
My problem is that I only have one output pin left on my PICAXE to control this. The third mixed colour is not required. Is there a clever way of controlling the LED with just one output pin?
For example; if the pin is high, the red anode leg would need to be pulled to 5V and the green at 0V. If the pin is low, the green leg would need to be pulled to 5V and the red at 0V.
Thanks
My problem is that I only have one output pin left on my PICAXE to control this. The third mixed colour is not required. Is there a clever way of controlling the LED with just one output pin?
For example; if the pin is high, the red anode leg would need to be pulled to 5V and the green at 0V. If the pin is low, the green leg would need to be pulled to 5V and the red at 0V.
Thanks
Last edited: