Files
R8Forge/hardware/panel.md
T
dsh 7144e8fefe
ci / linux-arm64 (push) Successful in 5m0s
hardware: the pointer becomes a crosshair cursor, because one lamp cannot be special
The question was what kind of lamp can turn from yellow to red, and the honest
answer is none, and it would not help anyway: in a lamp matrix a single cell cannot
be driven on its own.  The matrix lights cells by row and column, so changing either
line lights eight cells, and giving every cell its own override would mean 64 extra
gates or 64 separate lines.

So the cursor is a separate indicator.  Eight red neons down the left of the matrix
and eight across the top form a crosshair, and the lit pair crosses at the data
pointer.  dp is six bits, which splits exactly into dp[5:3] for the row and dp[2:0]
for the column: sixteen lamps, zero decode logic.

The alternative is a red neon ring in every cell, driven as a second 8 by 8 matrix
that shares the sixteen drive lines and is selected in time, so the red dot lands on
the cell itself.  That is 64 more neons and twice the panel density; the crosshair is
recommended for now.  panel.md records both, with the reasoning.
2026-11-24 19:08:15 +08:00

3.9 KiB
Raw Blame History

面板规格(定稿)

panel-mockup-vintage.png 是可执行的草图(panel_mockup_vintage.py 画的),这里是照着它 下单/开孔要用的规格。

1. 机械

项 值
面板 200 × 100 mm,2 mm 铝或 3 mm 亚克力,米白锤纹漆(RAL 7035 相近)+ 橙线 #B54E2A 丝印
外壳 约 220 × 130 × 70 mm,金属或木质,黑色侧板,四只脚垫
四角 4 × M3 螺钉(面板内侧固定)
卡带槽 2 × 22 卡边连接器(2.54 mm 间距),槽口 58 × 10 mm,两侧 M3
串口 DE-9 母座(6850 + MAX232 侧出)

2. 分区(栅格:三列 56 mm,列间 4 mm;两行,行间 6 mm)

区 位置 内容
CELL 列一 / 上行 8 颗灯泡成一圈:bit 0 在 9 点带楔形、刻 0,其余顺时针标 1..7
INSTRUCTION 列二 / 上行 8 颗灯 + 符号 > < + - [ ] . ,,当前那条亮
INPUT BYTE 列二 / 上行偏下 8 个拨动开关,下面刻 7 6 5 4 3 2 1 0;右边红色 SEND 按钮
DATA 64 列三 / 上行 8 × 8 灯泡矩阵,一格一颗;指针那颗用红圈闪(光标)
PROGRAM CARTRIDGE 列一 / 下行 卡边槽,插 27C512 卡带
SERIAL / 6850 列三 / 下行 DE-9
按钮排 列二 / 下行 STEP · START · HALT · RESET(见 §5 的待定项)
铭牌 列二 / 下行 1 MHz · 8 bit · 64 格;27C512 + 6116 + 74LS;"NO NUMBERS ON THE PANEL: RESULTS VIA SERIAL"

3. 显示规则

面板不显示任何数字。 每个信息只有一个表示:

信息 表示
指针位置 矩阵里闪的红圈(光标)
64 格的 LSB 矩阵灯的亮/灭(biz/rnz 唯一看的那一位)
当前格整字节 CELL 灯环
当前指令 INSTRUCTION 灯
结果 / 步数 / 调试 串口

3.1 指针怎么标(重要)

灯泡不能变色,而且在灯泡矩阵里单独点亮某一格是做不到的:矩阵按行/列驱动,动一条线会亮一整排(8 格)。所以"指针那格变红"需要 64 路独立驱动(每格一个门),不划算。

用的是十字光标:

  • 矩阵左侧 8 颗红色氖泡 = 行,上方 8 颗红色氖泡 = 列;
  • dp 是 6 位,正好拆成 dp[5:3](行)和 dp[2:0](列),直接驱动,不用任何译码器;
  • 亮着的一行 + 一列在矩阵上交叉,交点就是 dataptr 的位置。

也可以做成"每格一颗红氖环"(第二套 8×8 矩阵,和第一套共用 16 路驱动线、用一根 select 分时), 那样红点直接落在格子上,代价是 64 颗氖泡 + 面板密度翻倍。推荐十字光标:16 颗灯、零译码、看得很清。

4. 电气

项 值
灯环 8 × 6 V 灯丝灯泡,ULN2803 驱动(8 路),一个 74LS273 锁存当前格
指令灯 8 × 6 V,另一片 ULN2803 + 74LS138 译码
矩阵 8 行 + 8 列扫描,16 路驱动(灯泡矩阵无需每格独立驱动)
指针光标 见 §3.1:矩阵左侧 8 颗 + 上方 8 颗红色氖泡做十字线,dp[5:3] 直接驱动行、dp[2:0] 直接驱动列 —— 零译码
拨码 8 位 → 74LS244 → 输入字节总线;SEND = 一个按钮 → , 的握手
按钮 STEP/START/HALT/RESET 各一个,74LS14 去抖
电源 5 V(TTL)· 6 V(灯)· 12 V(可选),外置 5 V 2 A 适配器

5. 待定 / 注意

  • STEP 要不要留:START / HALT / RESET 是 GPT 那版的三键;单步对"训练机"很重要, 我建议保留成四键(STEP · START · HALT · RESET),或者把 START 做成"按住 = 连续、 点按 = 单步"。定下来再开孔。
  • 卡带上的 27C512 用 UV 版还是 EEPROM 版:UV 有仪式感(擦 20 分钟),EEPROM 调试快。
  • 灯色:琥珀最复古;矩阵里"亮"的灯和"灭"的灯对比要够,否则 8×8 看不清。