docs(g6_03/g6_06): Mode 4 gain heritage, analog-input calibration commands 0xA5–0xA7, 0xA_ block allocation rule, capability bit 6 ai_cal - #69
Open
mbreiser wants to merge 1 commit into
Conversation
…ix the −20 example), 12-bit averaged ADC + calibration + deadband; 0xA4 flags byte; new 0xA5/0xA6/0xA7 analog-input calibration commands; 0xA_ block allocation rule; capability bit 6 ai_cal + bit-7 extension proposal; AI front-end rework (LAB-209) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spec sync for the analog-input work in
LED-Display_G6_Firmware_Arena(#46 F1, #47 F2) and Arena Studio v0.74/v0.75 (webDisplayTools #190/#191). Plan and rationale: webDisplayToolsdocs/development/analog-input-plan.md(PR #189). @loeschef — the opcode and capability-bit choices are the parts to review.g6_03-controller.mdfps = V × 100 × gain / 10was already here, but the worked example ("−20 = −2.0 fps/V") contradicted it. Traced to the G3 Xmega controller (XmegaController/main.c:xRate = gain × HzFromAdc / 10,HzFromAdc= 100 per volt,xRateis fps): the gain byte is 10× the gain and unity (10) = 100 fps per volt; the everyday G3 gains 0.2–0.5 (2–5) are 20–50 fps/V; −20 is −200 fps/V. Firmware F1 now implements exactly this (the shipped code had omitted the ×100). Mode 4 text also gains the 12-bit / 16× averaging, the G3-style EWMA, the per-board calibration and the deadband. Same fix in thetrial-paramsgain row.0xA_block allocation rule (new paragraph in "G4 opcode compatibility"):0xA0–0xA3analog out,0xA4–0xA9analog in,0xAA–0xAFdigital I/O; set/get pairs on adjacent even/odd opcodes (A0/A1,A6/A7,AA/AB,AC/AD;A2/A3the set-only pair);0xA8/0xA9reserved for the sampled analog block stream;0xAE/0xAFfree. G4 never used0xA0–0xAF(checked against maDisplayTools'PanelsController.mcommand bytes and the reserved list here).0xA5 get-analog-in-raw,0xA6 set-analog-cal(two-point recipe: BNC open = +10 V reference via the 10k pull-up, BNC ground cap = 0 V; 256 averaged reads per point; validity rule; EEPROM authoritative + write-only SD JSON mirror; deadband; the procedure),0xA7 get-analog-cal(18-byte record).0xA4gains itsflagsbyte (calibrated ch1/ch2, 12-bit) and the calibrated-mV semantics.ai_cal(same gating rule asio_ext). Bit 7 is the last bit of the byte — documented as reserved with a proposed extension rule for review: bit 7 =cap_ext⇒ a second capability byte follows the MAC at payload byte 8 (the same tolerant-extension pattern the MAC uses;versionstays 1). The § 5 summary bullet is updated to match (it still said bits 6–7 reserved and showed the pre-MAC response).g6_06-arena-firmware-interface.mdNot touched: the panel protocol, the pattern format, anything below
0xA0or above0xAFexcept the0xC2capability table.🤖 Generated with Claude Code