Design Log DEC 042 encoder port pin 8 carries hid local enc active n - thepinkmile/Enigma-NG GitHub Wiki
DEC-042 - Encoder Port Pin 8 Carries HID-Local ENC_ACTIVE_N
- Status: Decided
- Date: 2026-04-26
- Category: Electrical / Interface architecture
- Area: Stator ↔ Encoder connector contract, HID source selection, lightboard blanking
- Author: Izzyonstage & GitHub Copilot
Summary
Revise the 20-pin Stator ↔ Encoder connector so pin 8 carries a generic active-low
ENC_ACTIVE_N sideband. The signal is used only on the HID bank:
J4/KBD_ENCdrives keyboard activity into the Stator- the Stator source-select path chooses between physical
ENC_ACTIVE_KBD_NandCM5_KEY_ACTIVE_N J5/LBD_DECreceives the selectedENC_ACTIVE_LBD_Nso the lightboard can blank when idle
The signal is not propagated through the plugboard, rotor, reflector, or extension interfaces.
Problem
The 6-bit ENC_DATA[5:0] path uses the entire 64-code space, so there is no spare "idle" code that
cleanly distinguishes "no key is currently active" from "a valid key code is present." Without a
separate activity indication:
LBD_DECcannot reliably blank the lightboard when the keyboard is idle- CM5 GUI / telemetry cannot observe the selected keyboard-source activity state cleanly
- physical-keyboard and CM5-virtual key injection risk diverging in behaviour if only the data bus is muxed
Decision
-
Pin 8 on the generic 20-pin Encoder connector is reassigned to
ENC_ACTIVE_N.- Pins 2-7 remain
ENC_DATA[5:0]. - Pins 8-18 shift by one position relative to the previous shield/JTAG allocation so
SYS_RESET_Nmoves to pin 18.
- Pins 2-7 remain
-
ENC_ACTIVE_Nis active-low and defaults HIGH / inactive.- HIGH = idle / no active HID event
- LOW = active HID event present
- Unused roles shall leave the signal HIGH via the MAX II weak pull-up behaviour or an equivalent schematic bias method.
-
The signal is HID-local, not cipher-path-global.
KBD_ENCdrivesENC_ACTIVE_Nto indicate a debounced keypress is active.LBD_DECconsumesENC_ACTIVE_Nand must blank all outputs when the signal is HIGH.- Plugboard encoder / decoder roles do not use the signal in the active design and should hold or treat it as inactive.
-
Physical and CM5 virtual keyboard sources must stay aligned.
- The Stator keyboard-source mux path must switch both the 6-bit source bus and the active-low activity sideband together.
- The selected activity state must be monitored on the Stator for GUI / telemetry use.
Rationale
- Preserves the full 64-code space without sacrificing any character value to represent idle.
- Gives the lightboard an explicit blanking control tied to real key activity.
- Keeps the extra signal local to the HID bank instead of widening the larger rotor / reflector / plugboard interface contract.
- Reuses spare mux and GPIO capacity already present on the Stator rather than introducing new active parts.
Impact
- Update
design/Electronics/Stator/Board_Layout.mdanddesign/Electronics/Stator/Design_Spec.mdto revise the 20-pin port pin table and document the HID-local source-select / monitoring flow. - Update
design/Electronics/Encoder/Design_Spec.mdanddesign/Electronics/Encoder/Board_Layout.mdto addENC_ACTIVE_Nto the generic module interface. - Update
design/Software/CPLD_Logic/Encoder_Logic.mdsoKBD_ENCandLBD_DECdefine the requiredENC_ACTIVE_Nbehaviour.
Cross-ref
DEC-041, design/Electronics/Stator/Design_Spec.md,
design/Electronics/Stator/Board_Layout.md,
design/Electronics/Encoder/Design_Spec.md,
design/Electronics/Encoder/Board_Layout.md,
design/Software/CPLD_Logic/Encoder_Logic.md.