RGB LED Matrix

The RGB LED Matrix is a rectangular array of pixels, each holding a 24-bit color (8 bits red + 8 bits green + 8 bits blue, following the sRGB channel model). It is a stateful display sink: it drives no outputs, but it remembers every pixel's color until you overwrite it. Three independent write methods let you address the matrix at different granularities, and they are applied low-to-high in each pass so a later method overwrites an earlier one on the same cell. Colors are masked to 24 bits before storage.

Basic

Method 3: light a single addressed pixel

The simplest write drives three inputs: COLOR (a 24-bit color), ROW and COL (the pixel address). The matrix stores COLOR at pixel (ROW, COL) and lights it; an out-of-range address is ignored. Because the pixel keeps its color afterward, you can move the address and paint another pixel, building an image one dot at a time. This method takes priority over the other two on the addressed cell.

Method 3: light a single addressed pixel
Intermediate

Method 2: fill row x column intersections

When COLOR is present but ROW or COL is left unwired, the matrix fills every intersection of an enabled row and an enabled column. Each row has a 1-bit rowEnable input and each column a 1-bit colEnable input; a pixel is painted only where both are 1. This lets you paint whole blocks, rows or columns of the same color in a single evaluation instead of addressing pixels one by one.

Method 2: fill row x column intersections
Advanced

Method 1: per-column paint and 24-bit color

Each column has its own 24-bit colColor input. For every column that carries a non-null color, the matrix writes that color into every enabled row of that column, so different columns can show different colors at once. Because a 24-bit word splits into 8 bits of red, 8 of green and 8 of blue, any of 16,777,216 colors is available per pixel. All three methods share the same persistent pixel memory: unwritten pixels keep their previous color, and the matrix bumps an internal version counter whenever any pixel changes, so the display only redraws when something actually moved.

Method 1: per-column paint and 24-bit color

Citations

  • International Electrotechnical Commission (1999). IEC 61966-2-1:1999 Multimedia systems and equipment - Colour measurement and management - Part 2-1: Colour management - Default RGB colour space - sRGB. Reference 1
  • Mano, M. M., & Ciletti, M. D. (2018). Digital design: With an introduction to the Verilog HDL, VHDL, and SystemVerilog (6th ed.). Pearson. Reference 2