Displays

de:volt models two classic hobbyist displays: the MAX7219 8x8 LED matrix and the HD44780 16x2 character LCD. Both decode GPIO transitions and render the resulting pixels or characters. Their protocol state is modelled in more detail than their optics or supply current, so a correct picture does not prove that real display timing, brightness, or power is correct.

MAX7219 8x8 LED Matrix

The MAX7219 is an SPI-controlled driver for a 64-LED (8x8) matrix. It accepts 16-bit serial frames (an 8-bit register address followed by an 8-bit data byte) over a 3-wire SPI-compatible interface: DIN, CLK, and CS.

Pinout

PinLabelDescription
dinDINSerial data in (from MCU data-out)
clkCLKSerial clock (from MCU clock-out)
csCSChip-select / load; idles HIGH, pull LOW to start a frame
vccVCC4.0–5.5 V supply
gndGNDGround

Registers

The simulator decodes the standard MAX7219 register map:

RegisterFunction
0x01–0x08Digit/row data: the 8 row bytes
0x0AIntensity (0–15)
0x0BScan limit (0–7 rows active)
0x0CShutdown (1 = normal, 0 = shutdown)
0x0FDisplay test (all LEDs on)

Within each row byte, bit 7 is the leftmost column and bit 0 is the rightmost column. The simulator drives the matrix in raw mode, so write 0x00 to the decode-mode register (0x09); a non-zero BCD decode setting is stored but not rendered.

How the frame works

CS idles HIGH. To send a frame, pull CS LOW, clock 16 bits in MSB-first on the rising edge of CLK, then pull CS HIGH to latch the address/data pair into the chosen register. A typical startup sequence is: 0x0C = 0x01 to exit shutdown, 0x0B = 0x07 to enable all 8 rows, 0x0A = 0x08 for mid-intensity, then write rows 0x010x08 with your pixel patterns.

Single device only

The model represents a single MAX7219. There is no DOUT pin, so daisy-chaining multiple drivers is not supported.

Electrical model

Logic inputs use the declared CMOS thresholds (V_IL max 0.8 V, V_IH min 3.5 V) and are physically high impedance. There is no invented 1 MΩ pull-down. An undriven input follows the simulator’s disclosed floating-input decision model, so wire DIN, CLK, and CS explicitly.

The supply is a fixed 150 Ω behavioural load, about 33 mA at 5 V, standing in for one representative operating point. Pixel count and intensity do not change that electrical load. Per-LED current, multiplex waveforms, BCD rendering, analogue brightness, DOUT chaining, timing margins, and package heating are not modelled.

Example circuit

Arduino D11 ─── DIN
Arduino D13 ─── CLK   ──  [MAX7219 8x8]
Arduino D10 ─── CS
            5V ─── VCC
           GND ─── GND

HD44780 16x2 Character LCD

The HD44780 is the ubiquitous 16-character by 2-line text display. It uses a parallel interface: the control lines RS, RW, and E plus an 8-bit data bus D0–D7. It runs in either 8-bit mode (all eight data lines) or 4-bit mode (D4–D7 only, two nibbles per byte). Both modes are supported via the function-set DL bit.

Pinout

PinLabelDescription
vssVSSGround
vddVDD4.5–5.5 V supply
v0V0Contrast: pot wiper, or tie to GND for max contrast
rsRSRegister select (0 = command, 1 = data)
rwRWRead/write: tie to GND (write-only)
eEEnable strobe; data latches on the falling edge
d0–d7D0–D7Parallel data bus (use D4–D7 in 4-bit mode)
aABacklight anode
kKBacklight cathode

Command subset

The simulator decodes the common HD44780 command set:

CommandFunction
0x01Clear display
0x02 / 0x03Return home
0x04–0x07Entry mode set
0x08–0x0FDisplay / cursor on/off
0x20–0x3FFunction set (4/8-bit, 1/2-line)
0x80–0xFFSet DDRAM address

DDRAM addresses 0x00–0x0F map to line 1 and 0x40–0x4F to line 2 (only the first 16 positions of each 40-byte bank are visible). ASCII codes 0x20–0x7E render; anything outside that range shows as a space. Cursor/display-shift (0x10–0x1F) is accepted but not rendered. CGRAM writes are accepted as controller state, but custom glyph pixels are not rendered. Katakana/ROM variants are also omitted.

No read-back

The RW pin is sampled but read-back is not implemented. Tie RW to GND so the display is always in write mode. The busy-flag read used on real hardware is not available here, and the model does not enforce real command execution delays.

Electrical model

Logic inputs (RS/RW/E/D0–D7) are physically high impedance with no invented pull-down. Undriven inputs follow the disclosed floating-input decision model, so tie unused controls to a defined level.

The supply is a fixed 200 Ω behavioural load, about 25 mA at 5 V, representing one combined logic/backlight operating point. V0, A, and K remain useful wiring guides, but contrast and backlight physics do not affect the rendered pixels or current. On hardware, use the module datasheet for the contrast network and any required backlight resistor. Read-back, busy timing, CGRAM glyph rendering, contrast, backlight brightness, pixel response, and package heating are omitted.

Example circuit (4-bit mode)

Arduino D12 ─── RS
            GND ─── RW
Arduino D11 ─── E
Arduino D5  ─── D4
Arduino D4  ─── D5   ──  [HD44780 16x2]
Arduino D3  ─── D6
Arduino D2  ─── D7
            5V ─── VDD
           GND ─── VSS
   10k pot wiper ─── V0

In 4-bit mode leave D0–D3 unconnected. A typical init is: function set 0x28 (4-bit, 2-line), 0x0C (display on), 0x01 (clear), 0x06 (entry mode), then write character bytes with RS = 1.

Both decode bit-banged output

de:volt watches the GPIO pins your sketch toggles, reconstructs MAX7219 serial frames or HD44780 parallel writes, and updates the rendered display. Standard bit-banged Arduino code, including common LedControl or LiquidCrystal-style sequences, can drive them. The decoder recognises logical edges; it does not qualify datasheet setup/hold time, clock rate, analogue edge shape, or metastability.

Select a display to see its Included / Not included disclosure. Treat the rendered content as evidence that the supported protocol subset was decoded, not as a full electrical or optical sign-off.