video-rgb-input

Capture row headers from a parallel RGB555 LCD bus, such as the Sharp LQ035Q7DH06. Connect the five bits of each color in order from least to most significant, and connect DCK to the pixel clock. DCK must remain high during vertical blanking.

For example, for a 160-column, 144-row LCD with a 960 µs vertical blanking interval:

glasgow run video-rgb-input -V 3.3 \
    --r A0:4 --g A5:7,B0:1 --b B2:6 --dck B7 \
    --columns 160 --rows 144 --vblank 960e-6

Set the port voltage to match the LCD bus. The --vblank value is in seconds.

This applet is a preview; it prints ten frame/row headers and exits. It does not save or display images. The capture skips the first pixel of each frame and resets its row and column counters after DCK has remained high for 90% of the specified blanking interval. Frame numbers wrap modulo 32. Row counts from 1 through 256 are supported.

CLI reference

glasgow run video-rgb-input

Streams screen contents from a color parallel RGB555 LCD, such as Sharp LQ035Q7DH06.

This preview reports ten frame/row headers; it does not save or display captured images. The vertical blanking interval is specified in seconds.

usage: glasgow run video-rgb-input [-h] [-V SPEC] --r PINS --g PINS --b PINS
                                   --dck PIN --rows ROWS --columns COLUMNS
                                   --vblank VBLANK
-h, --help

show this help message and exit

-V <spec>, --voltage <spec>

configure I/O port voltage to SPEC (e.g.: ‘3.3’, ‘A=5.0,B=3.3’, ‘A=SA’)

--r <pins>

bind the applet I/O lines ‘r’ to PINS (required)

--g <pins>

bind the applet I/O lines ‘g’ to PINS (required)

--b <pins>

bind the applet I/O lines ‘b’ to PINS (required)

--dck <pin>

bind the applet I/O line ‘dck’ to PIN (required)

--rows <rows>

LCD row count

--columns <columns>

LCD column count

--vblank <vblank>

vertical blanking interval, in seconds

API reference

class glasgow.applet.video.rgb_input.VideoRGBInputRow(frame: int, row: int, overflow: bool)

Row header from the capture stream.

frame is a wrapping 5-bit counter, row is an 8-bit row number, and overflow reports lost data in the previous frame. Pixel data is not included.

class glasgow.applet.video.rgb_input.VideoRGBInputInterface(logger: Logger, assembly: AbstractAssembly, *, r: tuple[GlasgowPin, ...], g: tuple[GlasgowPin, ...], b: tuple[GlasgowPin, ...], dck: GlasgowPin, rows: int, columns: int, vblank: float)

Capture row headers from a parallel RGB555 LCD bus.

vblank is the vertical blanking interval in seconds. The bus must hold DCK high during vertical blanking. Each color pin group is ordered from least to most significant bit.

async read_row() → VideoRGBInputRow

Wait for the next row header, discarding intervening pixel bytes.

This preview interface reports headers only; it does not reconstruct images.