Repository navigation
Software CPLD Logic Rotor Logic
Status: Draft Project: Enigma-NG Author: Izzyonstage & GitHub Copilot Version: v.0.1.0 Associated Hardware Revision: Rev A Last Updated: 2026-04-26
This document defines the CPLD logic requirements and FDC2114 register configuration for the
Rotor Board capacitive position sensing subsystem. The Intel MAX II EPM570T100I5N CPLD acts as
the I²C master on the J9 bus and is responsible for configuring all FDC2114 devices at
power-up and reading their conversion results to produce the Gray-coded position output.
Board-level connector ownership, physical placement, and BOM authority remain in:
design/Electronics/Rotor/Design_Spec.mddesign/Electronics/Rotor/Board_Layout.md
The FDC2114 is a hardware converter and has no user-programmable firmware. All register configuration is performed at runtime by the CPLD I²C master via VHDL bitstream. No UART programming header is present on the Rotor board. The JTAG daisy-chain programs the CPLD only.
The CPLD initialises each FDC2114 on the J9 bus immediately after power-up via I²C. All multi-channel devices (U2, and where populated U3/U4) receive the same baseline register map.
| Register | Address | Value (hex) | Field / Setting | Notes |
|---|---|---|---|---|
DRIVE_CURRENT_CH0 |
0x1E | 0x7C00 |
IDRIVE = 0b01111, INIT_DRIVE = 0b0
|
Baseline drive current - lab validate (LT-001) |
DRIVE_CURRENT_CH1 |
0x1F | 0x7C00 | As above | All channels same baseline |
DRIVE_CURRENT_CH2 |
0x20 | 0x7C00 | As above | All channels same baseline |
DRIVE_CURRENT_CH3 |
0x21 | 0x7C00 | As above | All channels same baseline |
MUX_CONFIG |
0x1B | 0x020D |
DEGLITCH = 0b101 (10 MHz), AUTOSCAN_EN = 1, RR_SEQUENCE = 0b01 (CH0-CH1) |
Adjust RR_SEQUENCE per active channel count; deglitch lab validate (LT-002) |
CONFIG |
0x1A | 0x1601 |
ACTIVE_CHAN = 0b00 (start CH0), SLEEP_MODE_EN = 0, RP_OVERRIDE_EN = 0, SENSOR_ACTIVATE_SEL = 1
|
Continuous conversion, internal oscillator active |
RESET_DEV |
0x1C | 0x8000 | Full device reset | Issue once on power-up before writing other registers |
CHx_FIN_SELnote: The FDC2114CHx_FIN_SELfield in each channel'sSETTLECOUNTregister must be set to0b10(single-ended, internal oscillator as reference clock) for all channels. This routes the internal ~43.35 MHz oscillator as the conversion clock; CLKIN is tied to GND on the PCB.
CLKIN is tied to GND on the Rotor PCB. The FDC2114 detects this condition and activates its internal oscillator (~43.35 MHz). Reasons for this choice:
- Avoids external crystal BOM cost and PCB footprint on a space-constrained circular board.
- Internal oscillator frequency is well above the ~6.5 MHz nominal resonant frequency of the LC tank (18 µH + 33 pF), satisfying the >4x oversampling requirement.
- Absolute frequency accuracy of the conversion clock is not critical; relative change detection (presence/absence of aluminium shroud segment) is sufficient for Gray-code position decoding.
- Confirmed viable by TI FDC2114 datasheet §8 (internal oscillator specification).
Design decision recorded in design/Design_Log/DEC-044_fdc2114-internal-oscillator-selected-clkin-gnd.md as DEC-044.
The J9 bus spans Board A and Board B via the 1x5 inner-face header pair (J9 [Board A] male, J9 [Board B] female). Pin 3 = SCL, Pin 4 = SDA (3.3V logic levels, pulled up via R6/R7 on Board A). I²C addresses: U2 = 0x2A, U3 = 0x2B (Board A, N=26 only), U4 = 0x2B (Board B, N=64 only).
U3 and U4 share address 0x2B but reside on electrically separate boards. The CPLD manages Bus direction via the J9 header; U3 and U4 are never simultaneously addressable.
- On power-up, issue
RESET_DEV(0x1C = 0x8000) to all FDC2114 devices. - Write baseline register map (§2.1) to each populated device.
- Enter continuous polling loop: read
DATA_CH0_MSB/DATA_CH0_LSB(addresses 0x00-0x07) for each active channel on each populated device. - Decode raw conversion values to detect sensor threshold crossing (presence of Al shroud slot).
- Assemble Gray-coded bit vector and drive Encoder output lines.
Threshold calibration values are stored in CPLD configuration (loaded via JTAG). Initial
baseline values require lab bench validation - see design/Procedures/Lab_Tests.md.
The CPLD is programmed via the JTAG daisy-chain (J1 → J2 → J3 across a rotor stack, continuing to the Stator). Programming is performed using the Intel Quartus Prime Programmer via the Controller Board JTAG interface before final rotor assembly. Each Rotor board must have its CPLD image flashed as part of the manufacturing procedure before the aluminium shroud is closed.
| ID | Title | File |
|---|---|---|
| LT-001 | FDC2114 IDRIVE Baseline Calibration | design/Procedures/Lab_Tests.md |
| LT-002 | fSENSOR Resonant Frequency Validation | design/Procedures/Lab_Tests.md |
-
Design Log
- DEC-001 3v3-enig-used-throughout-3v3-system-removed-from-btb-interconnect
- DEC-002 poe-option-a2-selected-coilcraft-poe600f-12ld
- DEC-003 poe-output-12v-or-ing-priority-logic-required
- DEC-004 supercap-charge-current-05a-under-poe
- DEC-005 tps25980-efuse-replaces-tps259474l
- DEC-006 stusb4500-negotiates-15v5a-75w
- DEC-007 dual-interleaved-lmq61460-q1-5v-buck-12a
- DEC-008 tps25750-emulates-5v5a-pd-profile-to-cm5
- DEC-009 legacy-controller-probe-access-pin-14-reassigned-to-sw-led-ctrl
- DEC-010 inc-14-deferred-legacy-probe-access-esd-protection-post-prototype
- DEC-011 all-power-rails-on-power-module-3v3-enig-serves-rotor-stack
- DEC-012 u4-tps25750-replaced-with-tps25751drefr-nrnd-resolution
- DEC-013 l3-emi-inductor-changed-to-bourns-srp1265a-100m
- DEC-014 controller-board-uses-erf8-female-on-both-btb-connectors-for-blind-mate-assembly
- DEC-015 link-beta-connector-reduced-from-80-pin-to-40-pin-erf8-020-erm8-020
- DEC-016 jtag-controlled-impedance-and-series-termination
- DEC-017 minimum-4-layer-stackup-for-all-non-controller-boards
- DEC-018 connector-pinout-ownership-model
- DEC-019 poe-transformer-topology-acf-option-a-selected
- DEC-020 gnd-chassis-rib-clearway-enig-bond
- DEC-021 supercapacitor-bank-upgrade-2x2-2s2p-2x3-2s3p
- DEC-022 jdb-ft232h-clock-source-dedicated-12mhz-smd-crystal-selected
- DEC-023 jdb-gnd-chassis-omitted-mounting-holes-tied-to-gnd
- DEC-024 jdb-is-complete-jtag-master-controller-jtag-lines-are-pass-through
- DEC-025 cm5-shutdown-mechanism-hardware-driven-ltc3350-software-support-deferred
- DEC-026 rotor-position-encoder-as5600-replaced-with-single-track-capacitive-encoder
- DEC-027 rotor-position-readback-via-jtag-virtual-jtag-user0-udr
- DEC-028 split-dual-board-rotor-architecture
- DEC-029 supercapacitor-hold-up-specification-25f-abracon-cells-2s4p-20-s-at-15w
- DEC-030 5v-main-backup-switchover-transient-fix-r14-r30-c35
- DEC-031 cm5-virtual-keyboard-key-injection-feature-architecture
- DEC-032 settings-board-panel-mount-configuration-controls-with-cm5-override
- DEC-033 dsi1-display-connector-provision-for-optional-lid-touchscreen
- DEC-034 switch-hardware-refresh-settings-board-toggle-discrete-rgb-led-ruggedized-pm-sw1
- DEC-035 hid-keyboard-and-lightboard-use-a-40-position-qwerty-derived-layout-for-the-64-character-code-space
- DEC-036 link-beta-former-monitor-pins-reallocated-as-grouped-power-rails
- DEC-037 link-beta-pin-map-regrouped-around-dedicated-jtag-and-i2c-guard-bands
- DEC-038 controller-centric-dock-architecture-replaces-legacy-link-alpha-link-beta-backplane
- DEC-039 enclosure-connected-boards-use-gnd-chassis-daughterboards-are-exempt
- DEC-040 diagnostics-banks-removed-from-active-design-specs-pending-coupon-review
- DEC-041 encoder-modules-use-epm570-with-digital-debounce-and-role-by-programming
- DEC-042 encoder-port-pin-8-carries-hid-local-enc-active-n
- DEC-043 shared-actuation-module-replaces-direct-controller-servo-gpio
- DEC-044 fdc2114-internal-oscillator-selected-clkin-gnd
- DEC-045 rotor-samtec-erm8erf8-connectors-require-esd-protection
- DEC-046 bypassdecoupling-capacitor-voltage-rating-50v-retained-on-all-non-pm-boards
- DEC-047 or-ing-mosfet-corrected-to-csd17578q5a
- DEC-048 esd-protection-extended-to-host-side-rotor-facing-btb-connectors
- DEC-049 rotor-internal-headers-renamed-to-j-convention-connector-count-updated-to-8-bom-unified
- DEC-050 encoder-blade-terminal-refdes-corrected-from-bt-to-j-convention
- DEC-051 settings-board-renamed-to-user-settings-module-board-code-sbd-usm
- DEC-052 variant-specific-fdc2114-refdes-use-ab-suffix-convention
- DEC-053 extension-port-connector-upgraded-from-bhr-20-vua-20-pin-to-2bhr-30-vua-30-pin
- DEC-054 signal-net-renamed-pwr-but-pwr-but-n-active-low-suffix-conformance
- DEC-055 f-108-system-wide-reference-designator-and-requirement-id-consecutive-renumbering
- DEC-056 relocate-investigation-documents-to-board-owned-folders
- DEC-057 daughterboard-mounting-hole-specification-and-standoff-bom-ownership
- DEC-058 jdb-connector-upgrade-hat-headers-to-df40c-20-btb
- DEC-059 erm8erf8-stacking-height-confirmed-rotor-stack-assembly-specification-created
- DEC-060 jtag-daughterboard-renamed-to-jtag-module-jdb-prefix-replaced-with-jm
- DEC-061 pass-7-review-corrections-ctlstarotencamgrsstatus-updates
- DEC-062 ctl-poe-t1-selection-tdk-b82806d0060a120-topology-acf-flyback-acf-forward
- DEC-063 ctl-poe-l1-selection-yageo-pa4343333nlt-acf-forward-output-inductor
- DEC-064 ctl-poe-c17-final-part-selection-kemet-c0805c223k2racauto-22nf-200v-x7r-0805
- DEC-065 system-wide-stackup-code-correction-and-jlcpcb-authoritative-impedance-values
- DEC-066 grs-canonical-pcb-stackup-authority-consolidation
- DEC-067 am-sw1sw2-tactile-switch-rating-accepted-for-production
- DEC-068 pm-per-input-bulk-capacitors-and-output-source-quality-bulk-banks
- DEC-069 pm-per-input-polyfuse-protection-and-uvlo-resistor-recalculation
- DEC-070 mcp23017-i²c-silicon-restriction-gpb7gpa7-review-and-cfg-apply-n-reassignment
- DEC-071 usm-spdt-switch-dual-terminated-wiring-and-pull-down-resistor-removal
- DEC-072 review-pass-9-findings-and-resolutions
- DEC-073 ltc3350-rt-resistor-correction-332-kω-133-kω-amends-dec-030
- DEC-074 rename-cpld-reset-signal-sys-reset-n-cpld-reset-n
- DEC-075 tps25751-option-c-external-eeprom-isolated-i2ct-debug-header-on-power-module
- DEC-076 pm-3v3-architecture-redesign-3v3-main3v3-enig-rail-split-j4-dual-purpose-programming-j6-removal-and-q12-parallel-p-fet-selection
- DEC-077 retrospective-rotor-ttd-daisy-chain-no-series-termination-resistors-amends-dec-016
- DEC-078 cpld-reset-n-stator-buffer-bss138-n-channel-mosfet-new-decision-references-dec-077
- DEC-079 c20-voltage-rating-correction-25v-35v-amends-dec-072-bom-item-1
- DEC-080 retrospective-pm-and-stator-dock-connector-redesignation-amends-dec-038
- DEC-081 retrospective-rotor-ttd-no-series-resistor-policy-in-addition-to-dec-016
- DEC-082 10µf-bulk-reservoir-capacitor-upgrade-25v-0805-50v-1206-all-boards
- DEC-083 retire-all-boards-bomjson-consolidate-bom-authority-in-design-spec-files-and-consolidated-bom
- DEC-084 cypher-stack-architecture-migration-and-board-role-consolidation
- DEC-085 stack-output-j4-power-pin-zero-ohm-links-prototype-test
- DEC-086 cypher-input-common-variant-restructure-10-numeric-variant-single-i2c-address
- DEC-087 cypher-input-led-colour-architecture-moved-off-plain-bits-onto-local-rgb-select-circuit
- DEC-088 plugboard-jacks-wired-directly-to-cypher-board-spade-bank-j4j6-reserves-5v-main
- DEC-089 board-role-id-widened-to-4-bit-capability-bitmask-cpld-pin-freeing-and-j5-migration
- DEC-090 cypher-board-j3-stack-input-side-full-50-pin-allocation-and-actuate-request-in-out-n-signal-pair
- DEC-091 j3-esd-protection-extended-to-actuate-request-pins-and-actuation-gating-resolved-to-cypher-cpld
- DEC-092 cypher-board-j4-stack-output-side-full-50-pin-allocation
- DEC-093 actuate-request-end-to-end-signal-path-j4-rename-rotor-interposer-connectors-extended
- DEC-094 connector-ownership-reassignment-for-reused-chain-templates
- DEC-095 actuate-request-esd-protection-completed-stack-output-passive-wiring-defined
- DEC-096 stack-blanking-board-corrected-actuate-request-bridging-added
- DEC-097 cypher-j3-actuate-request-out-n-wired-as-round-trip-verification-input
- DEC-098 controller-cypher-dock-split-power-molex-signal-samtec-amends-dec-038-dec-080
- DEC-099 cm5-i2c-bank-architecture-mipi0-to-mipi1-swap-pwm-gpclk-reservation
- DEC-100 jtag-module-actuation-module-retirement-from-controller-board
- DEC-101 cypher-ina219-i2c-address-aligned-to-pm-default
- DEC-102 cypher-ft232h-3v3-vregin-self-powered-5v-usb-net-retired
- DEC-103 hid-usm-hub-connector-topology-rework
- DEC-104 user-settings-module-role-reworked-as-hid-colour-audio-hub-and-jtag-i2c-spine
- DEC-105 cfg-route-moved-to-full-cm5-software-control-physical-usm-switches-retired
- DEC-106 cypher-plugboard-reduced-to-mechanical-connector-only-board
- DEC-107 usm-hid-connector-four-colour-style-signal-expansion
- index
-
Diagrams
- renders
-
Electronics
- Boards Overview
- Consolidated BOM
- Electrical Design
- Power Budgets
- System Architecture
- Actuation Module
- Controller
- Cypher
- Cypher-Input
- Cypher-Output
- Cypher-Plugboard
- Encoder Module
- Extension
- JTAG Module
- Power Module
- Reflector
- Rotor
- Stack-Blanking
- Stack-Input
- Stack-Interposer
- Stack-Output
- Stator
- User Settings Module
-
Guides
-
Mechanical
- Complete System Assembly
- Extension
- Keyboard Assembly
- Lightboard Assembly
- Main Enclosure
- Plugboard Assembly
- Power Module
- Reflector
- Rotor
- Rotor Actuation Assembly
- Rotor Stack Assembly
-
Procedures
-
Production
-
Software
- Actuation Module
- CPLD Logic
-
GUI App
- Design Spec
-
Wireframes
- README
- renders
- Linux OS
-
Standards