mechanics: what the mechanical address register costs, tape by tape
Answering "is it acceptable for shorter tapes": with the mechanical register the cost is one physical step per pointer move, in either direction -- no direction penalty like the drum, but every move pays. Measured move counts at 8 bits (tape_run --profile), and the times for a 3 ms direct drive stepper (200 steps per rev, 3.1 steps per cell) and a 20 ms telephone uniselector: full_add 95 instructions 11 moves 0.03 s / 0.2 s hello 577 139 0.4 s / 2.8 s term 16414 13077 39 s / 4.4 min asm/test.r8asm 43676 71885 3.6 min / 24 min signed_demo 37511 122178 6 min / 41 min calc 51378 130589 6.5 min / 44 min So short tapes are fine, comfortably: hello finishes inside a second even on the slowest mechanism, and the practical line is about 20000 moves, which is roughly 20000 instructions, for "under a minute". term sits right at the edge at 39 s. The three big tapes need the two speed design: mechanical position authoritative in single step and demo mode, a clutch that disengages it in run mode so an electronic counter drives the 6116. Same clutch idea as the step counter.
This commit is contained in:
1 parent
9590cfd35b
commit
7170ad4813
1 file changed
+23
-3
+23
-3
@@ -95,11 +95,31 @@
|
||||
|
||||
| A 用到的件 | 价格 | 说明 |
|
||||
|---|---|---|
|
||||
| **电话步进器(uniselector)** | ¥50~200 二手 | 64 位、棘轮 + 电磁驱动、**自带归位触点**;反向靠第二组电刷或倒转线圈 |
|
||||
| **28BYJ-48 步进电机 + 棘轮/日内瓦机构** | ¥30 + 3D 打印件 | 好驱动(ULN2003),反向容易,位置用光电码盘读回 |
|
||||
| **旋转电磁铁 + 棘爪** | ¥40 | 单步式最像原件,反向要另设计 |
|
||||
| **电话步进器(uniselector)** | ¥50~200 二手 | 64 位、棘轮 + 电磁驱动、**自带归位触点**;反向靠第二组电刷或倒转线圈。步进速度 **40~60 步/秒 = 20 ms/步** |
|
||||
| **直驱 1.8° 步进电机(NEMA-8/11)+ 棘轮** | ¥30~60 + 3D 打印件 | 200 步/转 → 64 格只需 **3.1 步/格**,1000 步/秒下 **3 ms/格** ✓ 反向免费 |
|
||||
| **旋转电磁铁 + 棘爪** | ¥40 | 单步式最像原件,~10 ms/格,反向要另设计 |
|
||||
| 位置读回 | ¥10 | 步进器用 64 位格雷码触点组,或光电码盘 + 74LS244 缓冲 → 6116 的 `A0..A5` |
|
||||
|
||||
**A 的代价:每一步移动都要真的动一下。** 好处是**没有方向惩罚**(不像鼓,`<` 不用等一圈),
|
||||
代价是每次 `>`/`<` 都付一次机械行程。实测每条纸带的移动次数(8 位,`tape_run --profile`):
|
||||
|
||||
| 纸带 | 指令数 | 步数 | `>`+`<` | 3 ms/格 | 20 ms/格 |
|
||||
|---|---|---|---|---|---|
|
||||
| `full_add` | 95 | 18 | 11 | 0.03 s | 0.2 s |
|
||||
| `hello` | 577 | 417 | 139 | 0.4 s | 2.8 s |
|
||||
| `term`(喂 `lhi`) | 16 414 | 17 590 | 13 077 | **39 s** | 4.4 min |
|
||||
| `asm/test.r8asm` | 43 676 | 99 908 | 71 885 | 3.6 min | 24 min |
|
||||
| `examples/signed_demo.r8asm` | 37 511 | 162 522 | 122 178 | 6 min | 41 min |
|
||||
| `examples/calc.r8asm` | 51 378 | 166 348 | 130 589 | 6.5 min | 44 min |
|
||||
|
||||
结论:**短纸带完全能接受** —— `full_add` 一眨眼、`hello` 一秒内(就算用最慢的电话步进器也只
|
||||
2.8 秒)、`term` 用直驱步进 39 秒 ✓。**20 000 次移动**是"一分钟内"的分界线,也就是**两万条
|
||||
指令以内**的纸带都能舒服地跑完。
|
||||
|
||||
大纸带(全家桶、`signed_demo`、计算器)就得上**离合两档**:单步/演示档让机械位置当权威地址,
|
||||
连续档把机械件脱开、由电子计数器驱动 6116(指针停在原地或慢慢追上)。这和 §2.2 电磁计数器
|
||||
的两档是同一个机构思路,也是电表/计算器时代的通行做法。
|
||||
|
||||
|
||||
### 2.2 步数 = 电磁计数器 ★★
|
||||
|
||||
|
||||
Reference in new issue
Block a user