1. Overview
The 16×2 character LCD is the classic HD44780-controller alphanumeric display — two rows of sixteen 5×8-pixel character cells. This is the direct parallel-wired version: the controller's data/control pins connect straight to the microcontroller's GPIO, with no I2C backpack in between. It needs six GPIO pins (in 4-bit mode) instead of the two used by the I2C variant in 10.3, but has no extra chip on the bus and no I2C address to configure.
2. Pinout
Verified against simulator/components/lcd 16x2 (parallel).ts (16-pin header):
| Pin | Name | Function |
|---|---|---|
| 1 | VSS | Ground |
| 2 | VDD | +5V logic supply |
| 3 | V0 | Contrast bias (normally set by a potentiometer on real hardware) |
| 4 | RS | Register Select — LOW selects command register, HIGH selects data register |
| 5 | RW | Read/Write — tied to GND for write-only use (the overwhelming majority of projects) |
| 6 | E | Enable — latches data on a falling edge |
| 7–10 | D0–D3 | Low data nibble — unused in 4-bit mode (see note below) |
| 11–14 | D4–D7 | High data nibble — the 4 bits actually used in 4-bit mode |
| 15 | A | Backlight LED anode (+) |
| 16 | K | Backlight LED cathode (–) |
[!NOTE] OMS's simulated component models all 16 pins for visual accuracy, but every real driver (the Arduino
LiquidCrystallibrary, and the MicroPython bit-bang port below) only ever operates the LCD in 4-bit mode — it wires and drives D4–D7 only. D0–D3 are never read or written by any generated code; leaving them unconnected on the canvas matches how every real 4-bit-mode HD44780 project is wired.
3. Key Specifications
| Spec | Value |
|---|---|
| Controller | HD44780 (or a pin-compatible clone) |
| Character grid | 16 columns × 2 rows, 5×8 pixels per cell |
| Interface | 4-bit or 8-bit parallel (OMS uses 4-bit) |
| Logic voltage | 5V (VDD) |
| Backlight | Separate LED, driven through its own current-limiting resistor (A/K pins) |
| Contrast | Set by DC bias on V0, typically from a 10kΩ trim potentiometer |
4. Libraries Used
- C++ (Arduino):
LiquidCrystal— part of the standard Arduino core, no separate install needed. - MicroPython: a lightweight bit-banged
liquid_crystalmodule (bundled by OMS's code generator) exposing aLiquidCrystalclass with the samebegin()/print()/setCursor()/clear()shape as the C++ library, driving RS/EN/D4–D7 directly viamachine.Pin.
5. Component Properties
From the real props: [...]:
line1(text) — Row 1 content shown on the simulated glass. Default:"OpenMakerStudio".line2(text) — Row 2 content. Default:"16x2 LCD Ready!".theme(select) — Backlight color:Blue Backlight (White text)(default) orGreen-Yellow (Dark text).
Powered state comes from VDD: above 3.0V the backlight and text render; below 4.5V while powered, a LOW VDD fault is raised (real modules expect a clean 5V rail).
6. Simulator Behavior
The on-canvas glass renders line1/line2 as a live 16×2 character grid once powered, with a glowing backlight matching the selected theme. During simulation, an editable text bar appears below the part with two 16-character-limited fields wired directly to line1/line2 — typing there updates the display instantly.
[!IMPORTANT] The displayed text is not driven by your compiled program. OMS's simulator has no HD44780 parallel-bus protocol decoder — it doesn't watch RS/RW/E/D4-D7 for real
setCursor()/print()traffic the way it watches, for example, the OLED's I2C bus (see 10.6). What appears on the simulated glass is always just whatever is currently set in theline1/line2props (via the Property Inspector or the live text bar), regardless of what your actual sketch prints. The Blockly-generated code itself is genuine, correctLiquidCrystal/bit-bang code that works exactly as documented on real hardware — it just has nothing to talk to in the Circuit Canvas today. This is the same category of gap as the Ultrasonic (HC-SR04) and TCS3200 sensors in Chapter 5: a useful interactive representation, not an electrical simulation of real bus traffic.

