Go Down

Topic: "Phantom Lights" in LED Matrix (Read 593 times) previous topic - next topic

Wawa

Never build a LED matrix, but couldn't you use SPI.transfer to speed things up?
Leo..


PaulRB

#16
Sep 14, 2017, 07:44 am Last Edit: Sep 14, 2017, 07:45 am by PaulRB
Noting the new code, does the latch pin need to be low when we're writing to the shift registers? Absolutely not. Just toggle the latch pin low and high after you shift out the data, and you can omit clearing the scanning register, which opens up more processing time.
If I remember correctly, it does not matter whether the code sets the latch pin low before or after writing to the shift register. The data is output on the rising edge of the latch signal. The falling edge is ignored.

As for omitting clearing the register, that was added by the OP to correct the ghosting which was the reason for starting this thread.

PaulRB

#17
Sep 14, 2017, 07:49 am Last Edit: Sep 14, 2017, 08:20 am by PaulRB
Never build a LED matrix, but couldn't you use SPI.transfer to speed things up?
The circuit is driven by an ATtiny85, so I don't know if the SPI library would work. The tiny does have a USI (universal serial interface) which should be able to simulate SPI. But if that can be used, how would speeding the sketch up help? The OP had not reported that speed is a problem.

Wawa

The circuit is driven by an ATtiny85...
Ahh, missed that.
Leo..

daba

You can also get "ghosting" in multiplexed LEDs if one of them passes current when it is reverse-biased.

I have seen this often in RGB common-anode LEDs.

It is worthwhile taking the time to test every single LED, before assembly, after lead-forming, and after soldering, as these can make an LED go "bad". Discard any that show any reverse-biased current.

Sometimes an LED can just go "bad" on it's own, then it has to be replaced. This isn't so bad on a 2D matrix, but I had one go on my 8 x 8 x 8 RGB LED Cube. Thankfully is was an "edge" one, so replacement wasn't too tricky, but if it had been in the middle on the cube, it would have been time to go out and buy some extra-extra long pliers or tweezers. The cube designer says it's possible to replace LEDs in the middle of the cube, but it's a real PITA !

Go Up