Ok, thanks for the tips.
So, the good news is that I have it working somewhat. It looks mostly ok but there are issues.
First on wiring, I only used 2 level shifters, and shifted all 16 pins (the 2 that were ground I just put on ground on the level shifters input).
The most visible thing is that on layer demo, in
SMARTMATRIX_HUB75_32ROW_MOD16SCAN layer4 and layer5 don’t display at all. It’s not a problem with colors, if I change their colors it doesn’t matter.
SMARTMATRIX_HUB75_64ROW_MOD32SCAN strangely shows all 5 layers. but layer 4 and 5 are scrolling in the wrong direction (horizontal).
Now, I don’t actually need more than one layer so it doesn’t matter, but still weird. The regular demo has ghosting on fonts that scroll but it’s not visible on my phone video. It thankfully does not flash like it does here:
Edit: I just tried 64x64 panel on ESP32 and that demo looked pretty close to normal (I don’t know it by heart, so maybe I missed a detail or two). Strangely the refresh rate demo at the end shows only 16fps, however the background task takes care of a faster refresh, so I don’t see flickering. Aaah, I see a comment in the code that changing refresh rate is broken, so I’ll ignore that number. I don’t need to change it anyway as long as I can’t see flickering.
Is there a good way to validate what works and what’s off by a bit?
I’ll try and add some capacitors on the level shifters to see if it helps.
I used this:
const uint8_t kMatrixHeight = 64; // known working: 16, 32, 48, 64
const uint8_t kRefreshDepth = 36; // known working: 24, 36, 48
const uint8_t kDmaBufferRows = 4; // known working: 2-4, use 2 to save memory, more to keep from dropping frames and automatically lowering refresh rate
//const uint8_t kPanelType = SMARTMATRIX_HUB75_32ROW_MOD16SCAN;
const uint8_t kPanelType = SMARTMATRIX_HUB75_64ROW_MOD32SCAN;
In #if (GPIOPINOUT == ESP32_FORUM_PINOUT) I added this wiring comment which you’re welcome to copy/integrate if you’d like:
ESP32 pin / comment
1 R1 2 Red Data (columns 1-16)
2 G1 15 Green Data (columns 1-16)
3 B1 4 Blue Data (columns 1-16)
4 GND GND Ground
5 R2 16/RX2 Red Data (columns 17-32)
6 G2 27 Green Data (columns 17-32)
7 B2 17/TX2 Blue Data (columns 17-32)
8 E 12 Demux Input E for 64x64 panels
9 A 5 Demux Input A0
10 B 18 Demux Input A1
11 C 19 Demux Input A2
12 D 21 Demux Input E1, E3 (32x32 panels only)
13 CLK 22 LED Drivers' Clock
14 STB 26 LED Drivers' Latch
15 OE 25 LED Drivers' Output Enable
16 GND GND Ground