I am having problem getting this red and green led to switch on in its yellow color state. Red + green = yellow!! But it simply refused to do so. It's more like an annoyance than a real big deal problem to me, but It's also pretty interest if I can still able to fix it using software, which I am not sure if I could.
Here is the LED: (red 2v, green 3v)
Here is how it looks like. The green colored leds should be turning yellow, and when I stare close enough, I can actually see the red led being turned on, but not bright enough. Normally, one would assume that the red led will be brighter than the green led because red is lower voltage, but strangely, it's the opposite.
Here is the circuit!! It's huge, please open it in a new tab and zoom in to see the detail. Basically the left part of the led is the red led.
Here is the code that I use to run the leds. It's nothing fancy, just a simple old multiplexing.
if(counter==0){
PORTC &=~(1<<0);
PORTD= ~(led[counter]);
PORTB=1<<0;
}
if(counter>0 && counter<8){
PORTB =0;
PORTD= ~(led[counter]);
PORTB=1<<counter;
}
if(counter==8){
PORTB =0;
PORTD= ~(led[counter]);
PORTC |=1<<0;
}
counter++;
if(counter>8) {
counter=0;
for( byte i=0; i<9; i++){
led[i]=0;
}
So, to make it clear, Q1, why no yellow? Q2, is it fixable using software? Q3, if so how? Q4, in case it's not fixable by software, what do I need to fix it in hardware. adding 12 resistors to red leds?
Update: Here I try to toggle the first dual led on and off, the last photo showing them switching on/off very fast, and clearly, it's not yellow.