Skip to content

Add SM16208 driver and FOUR_SCAN_40_80PX_ZIGZAG8 scan type for 80x40 4-scan panels#948

Open
pkilar wants to merge 1 commit into
mrcodetastic:masterfrom
pkilar:add-sm16208-zigzag8-80x40
Open

Add SM16208 driver and FOUR_SCAN_40_80PX_ZIGZAG8 scan type for 80x40 4-scan panels#948
pkilar wants to merge 1 commit into
mrcodetastic:masterfrom
pkilar:add-sm16208-zigzag8-80x40

Conversation

@pkilar

@pkilar pkilar commented Jul 6, 2026

Copy link
Copy Markdown

What

Adds library support for a custom 80×40, 1/10-scan HUB75 panel whose driver ICs fold two logical rows into one 160-clock shift register per colour lane and reverse the column order inside every 8-pixel segment. Standard scan types do not drive it correctly.

The panel

An 80×40, 1/10-scan module (PCB silkscreen L920F 10S 80x40 1921-V3.0+) driven by SM16208 constant-current shift registers:

SM16208SJ shift-register IC Panel back — 3×6 driver-IC grid
SM16208SJ shift-register IC Back: 3×6 driver grid, 1/10-scan 4-band layout
80x40 10S silkscreen Panel showing text with no ghosting
L920F 10S 80x40 1921-V3.0+ silkscreen Live via FOUR_SCAN_40_80PX_ZIGZAG8 + SM16208 — correct geometry, no ghosting

Changes

  • FOUR_SCAN_40_80PX_ZIGZAG8 (VirtualMatrixPanel_T) — coordinate remap onto the folded 160×20 DMA surface. New else if constexpr branch; the existing FOUR_SCAN_40_80PX_HFARCAN branch is untouched.
  • SM16208 shift driver — this panel's SM16208 constant-current chips latch on the inverted shift clock, so the driver sets clkphase = false, mirroring the existing MBI5124 case.
  • doc/Panel_80x40_4Scan_ZigZag8.md (+ two SVGs) documenting the panel layout and pixel ordering; linked from the README scan-types and chips lists.

Usage

HUB75_I2S_CFG mxconfig(160, 20, 1);          // 160×20, NOT 80×40
mxconfig.driver = HUB75_I2S_CFG::SM16208;    // sets clkphase = false

auto *dma = new MatrixPanel_I2S_DMA(mxconfig);
dma->begin();

VirtualMatrixPanel_T<CHAIN_NONE, ScanTypeMapping<FOUR_SCAN_40_80PX_ZIGZAG8>, 1>
    panel(1, 1, 80, 40);
panel.setDisplay(*dma);
panel.drawPixel(x, y, color);                // logical 80×40 coordinates

The DMA must be configured 160×20, not 80×40 — the mapping targets the folded surface; an 80×40 config drops every mapped x ≥ 80 and never lights rows 20–39.

Testing

Verified on a physical 80×40 panel of this type: correct geometry across all rows and columns, and no ghosting — selecting the SM16208 driver (clkphase = false) fully resolved the ghosting seen with the default clkphase = true.

…4-scan panels

Adds support for a custom 80x40, 1/10-scan HUB75 panel whose driver ICs fold two
logical rows into one 160-clock shift register per colour lane and reverse the
column order inside every 8-pixel segment:

- FOUR_SCAN_40_80PX_ZIGZAG8 (VirtualMatrixPanel_T): coordinate remap onto the
  folded 160x20 DMA surface.
- SM16208 (shift_driver): the panel's SM16208 constant-current chips latch on the
  inverted shift clock, so the driver sets clkphase=false (same pattern as the
  existing MBI5124 case).
- doc/Panel_80x40_4Scan_ZigZag8.md plus two SVGs documenting the panel layout and
  pixel ordering; linked from the README scan-types and chips lists.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant