Hello.
I'm working on a little MCU controlled LED flashlight.
I have a great problem with it: LED ghosting.
It is starting to appear when the switching frequency goes above only a 100hz
I have search Google in this topic, and I have found information that it is maybe because of the stray capacitance of the common anode line, and resistors from the collector of the transistor to ground can help with this.
I tried it, even very low value resistors didn't make any difference and I don't have and oscilloscope to check out what is going on exactly.
I even tried to insert a blank frame between each multiplexing but it didn't reduce ghosting, just the overall brightness (as expected).
Maybe the problem is with the code, but i can't find out what it is...
I'm using a TI MSP430g2252 20pin dip.
Here is the code:
pic1=0x55;
pic2=0xaa;
if (mpx==10){ //check flag for interrupt (2khz)
mpx=0; //clear flag
if (mpxs==1){ //multiplex segment
P2OUT=BIT0+BIT1;//turn off both segments (pnp bc327)
P1OUT=pic1; //Push character to segment (npn bc337)
P2OUT = BIT1; //Turn on Active segment
mpxs=0;} //Next time start with
else if(!mpxs){ //the other segment
P2OUT=BIT0+BIT1;
P1OUT=pic2;
P2OUT = BIT0;
mpxs=1;}
On this picture the multiplexing is running at 1Khz(visible ghosting)
on this picture it is multiplexing at a 100Hz ( no visible ghosting , but flickering to human eye)
Thanks for the help in advance!