hzeller / rpi-rgb-led-matrix

Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO
GNU General Public License v2.0
3.71k stars 1.17k forks source link

I don't like gpio_slowdown #1627

Open targettadams opened 8 months ago

targettadams commented 8 months ago

This way of introducing a delay between writing to the GPIO bits looks hacky. With some recent panels I had to reduce the slowdown to 6 to get them to work (pi4). Why don't we just use an explicit, tunable time delay using the relevant pulser? Or am I missing something.

ledvinap commented 8 months ago

you can look at https://github.com/hzeller/rpi-rgb-led-matrix/pull/1479,

This part is writing parallel data to GPIO, pulser won't help here (or it will be far too slow). Port access is done through AMBA bus, it does queue write requests and GPIO is processing them in chunks (at over 100MHZ on pI4)

targettadams commented 8 months ago

Interesting. Ghosting is my issue currently. I can only get rid of it by suppressing the refresh rate to an unacceptably low level. I'll look at your branch. I may have some questions if that's ok. So - you were able to get good refresh rates with no ghosting at all? And the brightness was not inhibited at all?

targettadams commented 8 months ago

Unfortunately, it didn't change my ghosting issue, but it is a lot nicer solution to some arbitrary parameter. Good work!

ledvinap commented 8 months ago

did you test gpio_slowdown = -1 ? That should generate high-quality 6Mhz clock. Ghosting at this frequency is almost certainly caused by other problem (probably hardware/wiring)

targettadams commented 8 months ago

Yes, I set gpio_slowdown = -1. It works fine and, in my opinion, is much better than using the usual approach.

Yes, I suspect the ghosting is something else. I use an adafruit bonnet, so I am not using the PWM pulser. I will try the solder hack next, Hard to tell, may just be the panels I'm using. Every panel I've use has its different quirks.

targettadams commented 8 months ago

Tbh the ghosting is not major. But once you notice it, it's difficult not to become perfectionist

ledvinap commented 8 months ago

gpio_slowdown = -1. It works fine and, in my opinion, is much better than using the usual approach.

It's also less that half of refresh rate compared to reliable multiple write approach. And fraction of actual panel speed.