Drive an HP 1345A vector display in immediate mode from a Heltec WiFi Kit 32 V3 (ESP32‑S3). This project bit‑bangs the 15‑bit data bus and handshake lines, renders a set of vector test patterns, and shows status on the onboard OLED.
- Bring up the HP1345A immediate‑mode interface (D0–D14 + DAV/RFD).
- Exercise the vector display with multiple geometric test patterns.
- Provide a small OLED status panel (connected/disconnected).
- HP 1345A vector display (immediate mode).
- Heltec WiFi Kit 32 V3 (ESP32‑S3).
- Resistor divider for RFD (5V -> 3.3V).
- Common ground between HP and ESP32.
- Optional: scope or DMM for wiring verification.
The HP1345A immediate‑mode bus uses D0–D14 (15 bits). D15 and the Option‑704 lines (DS/RD/XACK/SYNC) are not used.
| HP Signal | ESP32 GPIO |
|---|---|
| D0 | GPIO1 |
| D1 | GPIO2 |
| D2 | GPIO3 |
| D3 | GPIO4 |
| D4 | GPIO5 |
| D5 | GPIO6 |
| D6 | GPIO7 |
| D7 | GPIO39 |
| D8 | GPIO40 |
| D9 | GPIO41 |
| D10 | GPIO42 |
| D11 | GPIO37 |
| D12 | GPIO33 |
| D13 | GPIO47 |
| D14 | GPIO48 |
| HP Signal | ESP32 GPIO | Direction |
|---|---|---|
| DAV (active‑low) | GPIO20 | OUT |
| RFD (active‑low) | GPIO19 | IN |
| DISCONNECT SENSE | GND | tie to ground |
| GND | GND | common ground |
HP RFD is 5V TTL. Do not connect directly to ESP32.
Suggested divider:
HP RFD ---- 10k ----+---- ESP32 GPIO19
|
20k
|
GND
The code uses the onboard 0.96" OLED (SSD1306 class) via I2C:
- SDA = GPIO17
- SCL = GPIO18
- RST = GPIO21
- Vext = GPIO36 (active‑low enable)
If your board revision differs, set SCREEN_SDA, SCREEN_SCL, SCREEN_ADDR, SCREEN_RST_PIN, or SCREEN_VEXT_PIN via build flags.
- Install PlatformIO (VSCode or CLI).
- Connect the ESP32 board.
- Build/flash:
pio run -t upload - Monitor serial output:
pio device monitor
Serial runs at 115200.
Type into the serial monitor:
hhelpsstatusdpulse DAV low (wiring check)wtoggle D11 (pen bit) for wiring checkptoggle pen up/down sensettoggle transfers on/offvtoggle verbose loggingbtoggle per‑word handshake tracextoggle RX echo0..9select test patternnnext test pattern
There are multiple test cases (0–9). Examples include:
- Geometric primitives (square, spiral, circle)
- Starburst
- Ripple/sombrero mesh (cached for speed)
- Spirograph
- Checkerboard
- Starfield and Matrix‑style text
The top‑left text overlay shows FPS and V (vectors per frame).
RFD never goes low
- Ensure DAV is high (idle).
- Check DISCONNECT SENSE is tied to HP ground.
- Confirm your RFD divider wiring and common ground.
No display / blank
- Verify correct data bus wiring.
- Use the
dcommand to pulse DAV and check at HP pin 10 with a scope. - Try toggling the pen bit with
wand probe D11.
OLED blank
- Confirm Vext (GPIO36) is driven LOW.
- Check SDA/SCL pins and address (0x3C/0x3D).
src/
main.cpp // Test patterns, loop, serial UI
hp_vector_device.* // HP1345A immediate‑mode bus + handshake
screen.* // OLED wrapper (Adafruit GFX / SSD1306)
platformio.ini
The HP1345A contains high voltages. Do not open or service it while powered. Always power down before rewiring.