docs: keyboard/mouse protocol spec — LK401 (LK201 protocol) + VSXXX-AA mouse, sources, MAME lk201 device

Distils public docs into reference/keyboard-mouse/PROTOCOL.md for the level-1
Keyboard (27) / Mouse (26) device tests:
- keyboard: 4800 8N1 RS-423, self-test via FD -> 01 00 00 00 (errors 3D/3E)
- mouse: 4800 8O1 RS-232, self-test via 'T' -> 4-byte report (errors 3D/3E, >=0x20 fatal)
- separate ports: DUART2 A=keyboard, B=mouse (NOT daisy-chained)
MAME already has an LK201 device (src/mame/dec/lk201.cpp/.h) but no DEC mouse.
This commit is contained in:
SDD committed 2026-10-16 11:38:52 +03:00
1 parent 23e508f075
commit 3fd1e13b2e
129 files changed
+401708

No files matched your search

+269
View File
@@ -0,0 +1,269 @@
# VT1200 keyboard & mouse serial protocol — distilled specification
Everything here is attributed to a source in `SOURCES.md`, and each fact is tagged
**[confirmed]**, **[probable]** or **[unknown]**.
## 0. Bottom line
There is **no VT1200-specific protocol document**. What exists is documentation for the
**LK201 keyboard** (and its successor the **LK401**) and for the **VSXXX-AA/-GA mouse /
VSXXX-AB tablet**. The evidence that these *are* the VT1200's parts — and therefore that
their protocols apply — is strong and is laid out in §1. The two facts the level-1
Keyboard/Mouse tests need (the self-test command and its reply) **are** covered by public
sources: it is `FD` → `01 00 00 00` for the keyboard and `T` → a 4-byte report for the mouse.
See §3.5 and §4.4.
Status of the question in the brief: **closest-part-only**. The VT1200's own manuals never
describe the wire protocol.
---
## 1. Which parts the VT1200 uses — the evidence
| Fact | Value | Confidence | Source |
|---|---|---|---|
| Keyboard family | **LK400 series**; `LK401-XX` standard, `LK402-XX` word-processing | **[confirmed]** | `EK-V1000-SV-002_service-guide.txt` §1.1.3 |
| Keyboard, ROM side | Terminal firmware source file is named **`LK401.C`**; ROM strings *"The keyboard ROM reported a fault at power-up"*, *"A key was held down during power-up"* | **[confirmed]** | `../rom-strings.txt` (offsets 0x0E4AB9, 0x0E4B2A, 0x0E4B58) |
| Keyboard, model designation | `LK401 Keyboard` appears as a heading in the VT1200 user guide | **[confirmed]** | `../../docs/EK-V1200-UG-001_installing-VT1200.txt` (TOC §"The Keyboard") |
| LK401 electrical/firmware relation to LK201 | "not intended to be a direct replacement for the LK201, but is **electrically and firmware functionally compatible**" | **[confirmed]** | `vt100net-lk401.txt` line 239 |
| LK401 host protocol = LK201 protocol | LK401 spec says the terminal→keyboard protocol "can be found in the LK400 Keyboard Firmware Requirements"; `lkkbd.c` and `elkay` implement one driver for both, and `lkkbd.c` enables extra LK401 keys with one added command | **[probable]** | `vt100net-lk401.txt` line 678; `linux-lkkbd.c` lines 39–46; `elkay/docs/protocol.md` |
| Mouse / tablet | 3-button pointing device; service guide calls the device test "mouse **or tablet**"; a `VSXXX-AB` tablet is the optional alternative | **[confirmed]** device type / **[probable]** exact model `VSXXX-AA` | `EK-V1000-SV-002_service-guide.txt`; `vcb02-az-glgab-mn-feb86-text.txt` App. C/D |
So: **keyboard = LK401, which speaks the LK201 serial protocol; mouse = VSXXX-AA
(hockey-puck), with the VSXXX-AB tablet as the alternate the firmware also supports.**
---
## 2. Topology — separate ports, NOT daisy-chained
This is the one place the VT1200 differs from the common LK201/VSXXX picture (where the
mouse hangs off the keyboard).
* The terminal ROM's own test list names **two separate DUART2 channels**:
`H - DUART2, CHANNEL A (KEYBOARD)` and `I - DUART2, CHANNEL B (MOUSE)`. **[confirmed]**
(`../rom-strings.txt`, offsets 0x179795 / nearby; `../level1-test-sequence.md`).
* The service guide tells the technician to "Disconnect the keyboard, mouse, or printer
**from the rear of the system box**"; the VT1200 user guide says "The keyboard cable
connects to the system box" and "The mouse connects to the system box". **[confirmed]**
* The service guide provides a **separate mouse-port loopback connector** (12-25628-01) and a
distinct *Mouse Port Test* (19) vs *Keyboard Port Test* (18). **[confirmed]**
* The VCB02 (the architectural ancestor, same Q-bus/DUART design) likewise keeps the keyboard
on DUART **channel A** and the pointing device on **channel B**, with "the other port …
for any other serial device, probably a mouse or a tablet". **[confirmed]**
(`vcb02-az-glgab-mn-feb86-text.txt` lines ~9635, and the DUART reset-default table.)
**Conclusion [confirmed]: on the VT1200 the keyboard is on DUART2-A and the mouse is on
DUART2-B, as two independent serial links. The mouse is NOT daisy-chained through the
keyboard.** This matches the already-wired MAME SCN2681 at both DUART windows.
---
## 3. Keyboard (LK401, LK201 protocol)
### 3.1 Wire parameters
| Parameter | Value | Confidence | Source |
|---|---|---|---|
| Baud | **4800** | **[confirmed]** | `netbsd-lk201-interface.html`; `vt100net-lk401.txt` §3.5.4 "4800 baud only"; MAME `lk201.cpp` `set_rate(4800)` |
| Data bits | **8** | **[confirmed]** | LK401 §3.5.5 "start bit, 8 data bits, stop bit"; `vt100net-lk401.txt` |
| Parity | **none** | **[confirmed]** | LK401 §3.5.5 has no parity element (8N1); `netbsd-lk201-interface.html` ("8N1"); MAME `set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1)` |
| Stop bits | **1** | **[confirmed]** | as above |
| Levels | **EIA RS-423**, ±5 V, powered from +12 V | **[confirmed]** | `netbsd-lk201-interface.html`; `elkay/docs/protocol.md` |
| Connector | 4P4C modular: 1=host TX→kbd, 2=GND, 3=+12 V, 4=kbd→host RX | **[probable]** (pin order differs between write-ups; verify at the cable) | `linux-lkkbd.c` header; `elkay/docs/protocol.md` |
### 3.2 Framing / command encoding
Host→keyboard: a command is one or more bytes. **Bit 7 of the last byte of every command is
set** (the "PARAMS" flag); bit 7 of a non-final byte is clear, and byte bit 0 is the
"TYPE" flag (0 = transmission command, 1 = peripheral command). **[confirmed]**
(`vcb02-az-glgab-mn-feb86-text.txt` §B.5.5.1–B.5.5.2.) Keyboard→host: single bytes.
### 3.3 Host → keyboard command set (VCB02 Table B-7, cross-checked against drivers)
| Bytes | Meaning | Conf. | Source |
|---|---|---|---|
| `FD` | **Jump to Power-Up / Reinitiate Keyboard** — keyboard runs its self-test and sends the 4-byte power-up sequence (§3.5) | **[confirmed]** | VCB02 B.5.5.3 "The jump to power-up command is FD (hexadecimal)"; `linux-lkkbd.c` `LK_CMD_POWERCYCLE_RESET 0xfd`; `vt100net-lk201-keyboard.html` trace |
| `AB` | Request keyboard ID — returns the 2-byte ID, does not jump to power-up | **[confirmed]** | VCB02 Table B-7; `linux-lkkbd.c`; `netbsd-lk201-interface.html` |
| `D3` | Reinstate defaults | **[confirmed]** | VCB02 Table B-7; `linux-lkkbd.c` |
| `CB` | Jump to test mode (factory) → replies `B8` | **[confirmed]** | VCB02 Table B-7; `netbsd-lk201-interface.html` |
| `13 p` / `11 p` | LEDs on / off; `p` bitmask: `01` Wait, `02` Compose, `04` Lock, `08` Hold Screen (parameter high bit set, e.g. `8F` = all) | **[confirmed]** | VCB02 Table B-7 + Fig. B-11; `netbsd-lk201-interface.html` |
| `99` | Disable keyclick | **[confirmed]** | VCB02 Table B-7 |
| `1B v` | Enable keyclick, volume `v` (`0x80`\|0–7, 0 = loudest) | **[confirmed]** | VCB02 Table B-7 + Fig. B-13 |
| `B9` | Disable Ctrl-key click | **[confirmed]** | VCB02 Table B-7 |
| `BB v` | Enable Ctrl-key click | **[confirmed]** | VCB02 Table B-7 |
| `9F` | Sound a keyclick | **[confirmed]** | VCB02 Table B-7 |
| `A1` | Disable bell | **[confirmed]** | VCB02 Table B-7 |
| `23 v` | Enable bell, volume | **[confirmed]** | VCB02 Table B-7 |
| `A7` | Sound bell | **[confirmed]** | VCB02 Table B-7 |
| `D1` | Temporary auto-repeat inhibit | **[confirmed]** | VCB02 Table B-7 |
| `E3` / `E1` | Enable / disable auto-repeat across keyboard | **[confirmed]** | VCB02 Table B-7 |
| `D9` | Change all auto-repeat to down-only | **[confirmed]** | VCB02 Table B-7 |
| `8B` | Resume keyboard transmission | **[confirmed]** | VCB02 Table B-7 |
| `89` (VCB02 OCR) / `B9` (NetBSD) | Inhibit keyboard transmission | **[unknown]** — the two sources disagree (`89` vs `B9`); treat as unresolved | VCB02 Table B-7; `netbsd-lk201-interface.html` |
| `0x86 \| d<<3` | Set division *d* (1–14) to a mode: low bits `00` down, `10` auto-down, `11` down/up | **[confirmed]** | VCB02 B.5.5.4; `netbsd-lk201-interface.html`; `elkay/docs/protocol.md` |
| `E9` | **LK401 mode**: enables the extra keys (LAlt, RAlt, RCompose, RShift). LK401-only. | **[confirmed]** | `linux-lkkbd.c` `LK_CMD_ENABLE_LK401`; `elkay/docs/protocol.md` |
> ⚠ The level-0 I/O data-path anomaly recorded in `../level1-test-sequence.md` says the
> firmware writes `0xE1` to DUART2-A and expects a **10-byte** reply. `0xE1` is documented as
> "disable auto-repeat across keyboard", which has **no reply** in any source here. So either
> that level-0 write is not what it looks like, or `0xE1` is a transcription error. **[unknown]**
> — flag it for the ROM/Ghidra side; it is not the keyboard *self-test*.
### 3.4 Keyboard → host special codes (single bytes)
`B3` All-Up (last down/up key released) · `B4` Metronome/auto-repeat tick · `B5` Output Error
(buffer overflow) · `B6` Input Error (bad command) · `B7` KBD-locked ACK · `B8` Test-mode ACK ·
`B9` Prefix-to-keys-down · `BA` Mode-change ACK · `7F` reserved. **[confirmed]**
(VCB02 Table B-4; `netbsd-lk201-interface.html`; `linux-lkkbd.c`.) Ordinary keycodes are
single bytes `> 0x40`; every key has one unique code, no shift/ctrl variants. **[confirmed]**
Full keycode table: `netbsd-lk201-keycodes.html` (14 divisions).
### 3.5 Power-up / self-test — **what the level-1 Keyboard Test (error 27) exercises**
On power-up, **or on receiving `FD`**, the keyboard runs a self-test in ≤70 ms and sends a
**4-byte** result. **[confirmed]** (VCB02 §B.5.4.3; NetBSD; LK401 §3.3.4.6; and the captured
VT320 trace in `vt100net-lk201-keyboard.html`.)
| Byte | Meaning | Value |
|---|---|---|
| 1 | Keyboard ID — firmware | `01` (`lkkbd.c` also accepts `02` = LK401 from the `AB` reply) |
| 2 | Keyboard ID — hardware | `00` |
| 3 | **Error code** | `00` = OK · `3D` = key held down at power-up · `3E` = ROM/RAM self-test failure |
| 4 | Keycode of the key held down, else `00` | e.g. `AE` in the stuck-shift trace |
* Healthy reply: **`01 00 00 00`**. Captured live on a VT320/LK201 in
`vt100net-lk201-keyboard.html`; emulated identically by `lk201emu` (`resetkb()` sends
`1,0,0,0`) and expected by `linux-lkkbd.c`. **[confirmed]**
* On a stuck key the reply becomes `01 00 3D <keycode>` and the terminal re-issues `FD`.
**[confirmed]** (`vt100net-lk201-keyboard.html`.)
* "If the self-test fails and the error is fatal, the keyboard is unable to transmit."
**[confirmed]** (VCB02 §B.5.4.3.)
**⇒ Implement the device-test model to: on receiving `FD`, reply `01 00 00 00`.** The
terminal's own display of the error code (message *"Keyboard Error - 27"*) comes from its
interpretation of byte 3; "any error code" from the device is what the service guide means by
"display any error code".
### 3.6 Wire parameters under test — does the terminal's test override them?
No source shows the Keyboard/Mouse tests changing baud/parity. The self-test is a normal
command on the already-configured port. **[probable]** — the VCB02 DUART reset-default table
sets channel A to "8 data, parity Off, 4800" and channel B to "8 data, parity **Odd**, 4800"
(`vcb02-az-glgab-mn-feb86-text.txt` §5.5.2.5, Table 5-9). Treat 4800/8N1 (kbd) and 4800/8O1
(mouse) as the port defaults; the VT1200's SCN2681 should be programmed the same way. **[probable]**
---
## 4. Mouse / tablet (VSXXX-AA / VSXXX-AB)
### 4.1 Wire parameters
| Parameter | Value | Confidence | Source |
|---|---|---|---|
| Baud | **4800** | **[confirmed]** | VCB02 §C.4; `linux-vsxxxaa.c` |
| Data bits | **8** | **[confirmed]** | VCB02 §C.6.1 |
| Parity | **ODD** | **[confirmed]** | VCB02 §C.6.1; `allpinouts-dec-7pin.html`; `linux-vsxxxaa.c` ("4800, 8o1") |
| Stop bits | **1** | **[confirmed]** | VCB02 §C.6.1 |
| Levels | RS-232-compatible (mark < −6 V, space > +4.6 V) | **[confirmed]** | VCB02 §C.5 |
| Connector | 7-pin micro-DIN: 1 GND, 2 TxD(mouse out), 3 RxD(into mouse), 4 −12 V, 5 +5 V, 6 n/c, 7 device-present→pin1 | **[confirmed]** | VCB02 Table C-1; `vaxarchive-vsxxx.html` |
| Duplex | half-duplex; a host byte during a mouse transmission aborts it | **[confirmed]** | VCB02 §C.6.1 |
### 4.2 Host → mouse commands (printable ASCII)
`R` (0x52) incremental stream mode · `D` (0x44) prompt mode (power-up default) · `P` (0x50)
request position (also enters prompt mode) · **`T` (0x54) self-test & identify** ·
`S` (0x53) select report format · `Z` (0x5A) reserved. Invalid commands are ignored.
**[confirmed]** (VCB02 Table C-2; `linux-vsxxxaa.c`; `vaxarchive-vsxxx.html`.)
### 4.3 Mouse → host position report (3 bytes, incremental mode)
```
bit 7 6 5 4 3 2 1 0
1 0 0 SX SY L M R byte 1 (header 100)
0 X6 X5 X4 X3 X2 X1 X0 byte 2
0 Y6 Y5 Y4 Y3 Y2 Y1 Y0 byte 3
```
`SX/SY` sign (1 = positive), `L/M/R` buttons (1 = depressed), X/Y in resolution units since
last report. **[confirmed]** (VCB02 Fig. C-4; `linux-vsxxxaa.c`; `vaxarchive-vsxxx.html`.)
### 4.4 Power-up / self-test — **what the level-1 Mouse Test (error 26) exercises**
On power-up, **or on receiving `T`**, the device sends a **4-byte self-test report**, starting
bits `101` (0xA0). **[confirmed]** (VCB02 §C.6.5 and Fig. C-5; `linux-vsxxxaa.c`; captured in
`vaxarchive-vsxxx.html`.)
```
byte 1: 1 0 1 0 R3 R2 R1 R0 revision
byte 2: 0 M2 M1 M0 D3 D2 D1 D0 M = manufacturer loc.; device code D: 0010 = mouse, 0100 = tablet
byte 3: 0 E6 E5 E4 E3 E2 E1 E0 error code
byte 4: 0 0 0 0 0 L M R button state, or the failed button if byte 3 = 3D
```
* Byte-3 error codes: `00` = OK; **`3E` = ROM/RAM checksum error**; **`3D` = button error**;
**codes ≥ 0x20 are fatal, < 0x20 non-fatal**. **[confirmed]** (VCB02 §C.6.5; `vsxxxaa.c`
treats ≤0x1f as "no serious error".)
* Self-test leaves the device in the reset/power-up state; data sent during self-test is
ignored. Self-test completes within 500 ms (power-up within 1 s). **[confirmed]** (VCB02 §C.6.4/§C.6.7.)
* Recommended host init (VCB02 §C.7.1): configure port for `4800 8O1`; read the power-up
self-test report; if none within 1 s, send `T`; then `S`; then `R` (or `D`). **[confirmed]**
**⇒ Implement the device-test model to: on receiving `T`, reply a well-formed self-test
report (e.g. header `0xA0|rev`, device byte `0x02`, error `00`, buttons `00`).** This is
exactly "firmware requests that the mouse do its self-test and display any error code".
### 4.5 Tablet (VSXXX-AB) — for completeness
Same connector, same serial parameters, same command set plus extras; power-up self-test differs
only in device code (`0100`) and a 5-byte absolute-position report (header `110`/0xC0).
**[confirmed]** (VCB02 App. D, §C.7.4; `linux-vsxxxaa.c` ABS branch.) Not needed for the level-1
mouse test unless a tablet is what's attached.
---
## 5. How a device failure is reported back (both devices)
The terminal displays an error code it derived from the device's self-test reply: keyboard
error byte 3 (`3E`/`3D`), mouse error byte 3 (`3E`/`3D`, or ≥0x20 fatal). The service guide's
troubleshooting table then says, for **error 27**, "Replace the keyboard"; for **error 26**,
"run the Mouse Port Test with external loopback … otherwise replace the mouse". **[confirmed]**
(`EK-V1000-SV-002_service-guide.txt` Table 3-1.)
---
## 6. MAME relevance (drop-in candidates)
* **Keyboard: MAME already has a DEC LK201 device.** `DECLARE_DEVICE_TYPE(LK201, lk201_device)`,
device name `"lk201"`, "DEC LK201 Keyboard", in
`src/mame/dec/lk201.h` / `src/mame/dec/lk201.cpp`. It is a
`device_t + device_serial_interface`, i.e. **it expects a DUART-style serial channel** — it
would attach to the same SCN2681 channel A we already wired. It models the 68HC05 keyboard
MCU and **executes the real keyboard firmware ROM** (`23-001s9-00.bin`), so the protocol
behaviour (including the `FD` self-test reply) comes from that ROM, not from C. It wires as
`m_lk201->tx_handler()...`/`m_lk201->rx_w()` (see `src/mame/dec/vt240.cpp`, which places it
behind an i8251). **It does NOT model the mouse.**
* **Mouse: no DEC mouse device exists in MAME** (checked `src/mame/dec/` and the tree; no
`vsxxx*`). We would need a small HLE model, but §4 gives the complete protocol, so this is
low-risk.
* **Caveat / gap:** MAME's `lk201` wants the **6805** LK201 ROM `23-001s9-00.bin`, which is
**not** in the bitsavers zip we have (that is the **8051** `23-004M2`). Running MAME's device
therefore needs that ROM sourced first; otherwise implement a HLE keyboard that answers `FD`
with `01 00 00 00` (and optionally honours `AB`, `13/11`, mode-set `BA` ACKs). For merely
passing level-1 tests 26/27, an HLE keyboard + HLE mouse driven off DUART2-A/B is the
smallest sufficient model and needs no ROMs at all.
---
## 7. Confidence summary
| Item | Status |
|---|---|
| VT1200 uses LK401 keyboard / VSXXX-AA mouse | **confirmed** (service guide + ROM) |
| Keyboard LK401 speaks LK201 protocol | **probable** (LK401 spec: "firmware functionally compatible"; shared drivers) |
| Keyboard wire: 4800 8N1, RS-423 | **confirmed** |
| Keyboard self-test command `FD` → `01 00 00 00` (+ `3D`/`3E` errors) | **confirmed** |
| Mouse wire: 4800 8O1, RS-232, 7-pin DIN | **confirmed** |
| Mouse self-test command `T` → 4-byte report (`3D`/`3E`, ≥0x20 fatal) | **confirmed** |
| Separate ports (DUART2-A kbd, DUART2-B mouse); no daisy chain | **confirmed** |
| Exact LK401 firmware protocol (LK400 Firmware Requirements) | **unknown** — document not public |
| `0xE1`+10-byte level-0 anomaly | **unknown** — not explained by any source here |
| Inhibit-transmission opcode (`89` vs `B9`) | **unknown** — sources disagree |
| 4P4C keyboard pin order | **probable** — verify at cable |
+56
View File
@@ -0,0 +1,56 @@
# Keyboard / mouse protocol — sources
Retrieval date for everything below: **2026-10-16** (all fetched by this session).
Originals are preserved in this directory; text/OCR extractions are kept alongside
where they were produced. Nothing here is VT1200-specific — see the note at the end.
## Primary DEC documents
| Source | Local file | What it covers |
|---|---|---|
| VCB02 Video Subsystem Technical Manual, **EK-104AA-TM-001**, DEC Educational Services, Feb 1987 (per `vt100.net`). Appendix B = LK201 Keyboard Spec, Appendix C = Mouse Spec, Appendix D = Digitizing Tablet. | `vcb02-technical-manual-ek-104aa-tm-001.pdf` (scanned, 26 MB, **no text layer**) + `vcb02-ek-104aa-tm-001-archive-djvu.txt` (archive.org OCR of the same item, useful but noisy) | The authoritative DEC spec for the LK201 keyboard protocol, the VSXXX-AA/-GA mouse, and the VSXXX-AB tablet. URL: <https://vt100.net/dec/ek-104aa-tm-001.pdf> (mirror of archive.org item `104aatm1`). |
| VCB02 Video Subsystem Technical Manual, **AZ-GLGAB-MN**, DEC Educational Services, Feb 1986 (the edition Dan McMahill credits with "cleaning out the remaining mysteries"). | `vcb02-az-glgab-mn-feb86-text.pdf` + `vcb02-az-glgab-mn-feb86-text.txt` (pdftotext -layout) | Same appendices, cleaner OCR. Appendix B (LK201) and Appendix C (Mouse) tables are readable here — this is the copy the facts in `PROTOCOL.md` are quoted from. URL: <https://archive.org/download/bitsavers_decqbusvcbhnicalManualFeb86_19080378/AZ-GLGAB-MN_VCB02_Technical_Manual_Feb86_text.pdf> |
| **LK401 Keyboard Product Specification**, DEC PS 3032041-0-0, 17 Jan 1990 (rev CX01). | `vt100net-lk401.pdf` + `vt100net-lk401.txt` | The keyboard the VT1200 actually ships. States LK401 is "electrically and firmware functionally compatible" with the LK201, frame format (start + 8 data + stop), 4800 baud, self-test 4-byte result, key matrix/divisions. URL: <https://vt100.net/mirror/antonio/lk401.pdf> |
| LK201 schematic, **MP01395**, Oct 1983. | `bitsavers-MP01395_LK201_Schematic_Oct83.pdf` (scanned, no text layer) | Hardware reference for the keyboard matrix / serial driver. URL: <http://bitsavers.trailing-edge.com/pdf/dec/terminal/lk201/MP01395_LK201_Schematic_Oct83.pdf> |
| LK201-AA 8051 firmware, part **23-004M2-00**. | `bitsavers-23-004M2-00_LK201AA_Firmware.zip` (`23-004M2-00.BIN`, `.hex`) | Firmware image for the **older 8051** LK201. Note: MAME's `lk201` device emulates the **6805** LK201 and wants `23-001s9-00.bin`, which is **not** in this zip. URL: <http://bitsavers.trailing-edge.com/pdf/dec/terminal/lk201/23-004M2-00_LK201AA_Firmware.zip> |
| VT330/VT340 Programmer Reference Manual, Chapter 15 "Using a Mouse or Tablet". | `vt100net-vt3xx-gp-chapter15.html` | Corroborates the VSXXX-AA mouse and VSXXX-AB tablet as DEC terminal locator devices on a dedicated "locator port" with the micro-DIN connector. URL: <https://vt100.net/docs/vt3xx-gp/chapter15.html> |
## Reverse-engineered / driver sources (usable as documentation)
| Source | Local file | What it covers |
|---|---|---|
| Dan McMahill, "LK201 Keyboard Interface" (NetBSD docs). | `netbsd-lk201-interface.html` | The single best public write-up of the LK201 protocol: 4800 8N1, connector pinout, all host→keyboard commands, the 4-byte power-up self-test result and error codes, key modes/divisions, autorepeat. URL: <https://www.netbsd.org/docs/Hardware/Machines/DEC/lk201.html> |
| NetBSD, LK201 keycode/division table. | `netbsd-lk201-keycodes.html` | Complete keycode→key map, grouped by the 14 divisions. URL: <https://www.netbsd.org/docs/Hardware/Machines/DEC/lk201_keycodes.html> |
| Paul Flo Williams, vt100.net "LK201 Keyboard". | `vt100net-lk201-keyboard.html` | A **real captured VT320↔LK201 POST exchange** (hex), including the `FD` self-test request and the `01 00 00 00` reply, and the stuck-key variant `01 00 3D AE`. URL: <https://vt100.net/keyboard.html> |
| Linux `drivers/input/keyboard/lkkbd.c`. | `linux-lkkbd.c` | Working LK201/LK401 driver. Command bytes (`FD AB D3 E9`, modes, LEDs, bell/keyclick), error codes `3D`/`3E`, and the `AB` ID reply distinguishing LK201 (byte=1) from LK401 (byte=2). URL: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/drivers/input/keyboard/lkkbd.c> |
| Linux `drivers/input/mouse/vsxxxaa.c`. | `linux-vsxxxaa.c` | Working VSXXX-AA/-GA/AB driver: `4800 8o1`, `'T'` self-test trigger, POR/REL/ABS packet layouts, error-code semantics. URL: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/drivers/input/mouse/vsxxxaa.c> |
| `elkay` (issinoho), a modern LK401→USB adapter. | `elkay/` (git clone, shallow) | `docs/protocol.md` and `firmware/include/lk.h` — a clean, implementation-grade restatement of the LK201/LK401 protocol including the `E9` LK401-mode command. URL: <https://github.com/issinoho/elkay> |
| `lk201emu` (pkoning2), LK201 emulator firmware. | `lk201emu/` (git clone, shallow) | Arduino firmware that *impersonates* an LK201: shows exactly what to reply to `FD` (`01 00 00 00`) and `AB`. URL: <https://github.com/pkoning2/lk201emu> |
| `vtbt` (tsowell), Bluetooth→LK201 bridge. | `vtbt/` (git clone, shallow) | Another independent LK201 host implementation (ESP32), useful for cross-checking timing/sequence. URL: <https://github.com/tsowell/vtbt> |
| `libgii` man page "LK201/LK401 keyboard input". | `libgii-input-lk201.7.html` | States LK201 and LK401 share the connector and serial format. URL: <https://www.ibiblio.org/ggicore/documentation/libgii/1.0.x/input-lk201.7.html> |
| comp.sys.dec post "The DEC round mouse VSXXX-AA" (Fred Kleinsorge, 1998). | `vaxarchive-vsxxx.html` | Mouse pinout, `4800 8o1`, command set, REL and self-test byte layouts. URL: <https://vaxarchive.org/hardware/vsxxx.html> |
| AllPinouts, "Mouse / Digitizer DEC 7-pin". | `allpinouts-dec-7pin.html` | Connector pinout and the "4800, 8 data bits, odd parity, 1 stop bit" figure for VSXXX-AA/-GA/AB. URL: <https://allpinouts.org/pinouts/connectors/input_device/mouse-digitizer-dec-7-pin/> |
## Our own repository (cross-checks)
* `../EK-V1000-SV-002_service-guide.txt` — VT1000/VT1200 service guide. Says the terminal uses the
**LK400 series** keyboard (LK401 standard, LK402 word-processing); lists the *Keyboard Test* (27)
and *Mouse Test* (26) as "firmware requests that the keyboard/mouse do its self-test and display
any error code"; shows a **separate mouse port** with its own loopback connector (12-25628-01).
* `../../docs/EK-V1200-UG-001_installing-VT1200.txt` — "The keyboard cable connects to the system
box" and "The mouse connects to the system box"; lists a dedicated *Pointing Device Connector*
(Table C-2).
* `../rom-strings.txt` — terminal ROM names **`LK401.C`**, and carries the messages
*"The keyboard ROM reported a fault at power-up"* and *"A key was held down during power-up"*,
matching the LK201/LK401 error codes `3E`/`3D`.
## Found but NOT retrieved (visible gaps)
| Source | Why | Note |
|---|---|---|
| **LK400 Keyboard Firmware Requirements** | Not located publicly. | The LK401 spec (line 678) points at this document as *the* definition of the terminal→keyboard command protocol. This is the one document that would make LK401 coverage first-class rather than "inherited from LK201". |
| **VT1200-specific keyboard/mouse protocol** | Does not appear to exist. | No VT1000/VT1200/VXT2000 manual documents the wire protocol; the manuals only say "uses the LK400 series keyboard / a 3-button mouse". |
| MAME keyboard ROM `23-001s9-00.bin` (6805 LK201) | Not in the bitsavers zip we have (that zip is the 8051 `23-004M2`). | Needed if we want to run MAME's `lk201` device rather than a HLE model. |
| `bitsavers.org/pdf/dec/terminal/lk201/` directory listing | 403 to our fetcher; used the `trailing-edge` HTTP mirror instead. | Functional equivalent retrieved. |
| `vaxarchive.org/hardware/vsxxx.html` over plain HTTP | 406 (ModSecurity). | Retrieved over HTTPS with a browser UA. |
| `github.com/.../raw/...` for the two Linux drivers | GitHub raw returned a 429 rate-limit stub. | Re-fetched from `git.kernel.org` instead (identical drivers). |
@@ -0,0 +1,7 @@
<!doctype html><html lang="en-gb"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="dns-prefetch" href="https://pagead2.googlesyndication.com"><meta name="description" content="7-pin mini-DIN connector used by DEC VSXXX-AA/GA serial mice and VSXXX-AB digitizer tablet on VAXstation and DECstation workstations."><meta name="author" content="Nicola Asuni"><title>Mouse / Digitizer DEC 7 pin · AllPinouts</title><link rel="stylesheet" href="https://allpinouts.org/css/combined.min.e58cb605e8dd84c2ad06c17524aa6c8fdfee198ae53ebf2939f4ce98a7b2b4fa.css" integrity="sha256-5Yy2BejdhMKtBsF1JKpsj9/uGYrlPr8pOfTOmKeytPo="><noscript><style>#menu{visibility:visible}</style></noscript><link rel="canonical" href="https://allpinouts.org/pinouts/connectors/input_device/mouse-digitizer-dec-7-pin/"><meta property="og:title" content="Mouse / Digitizer DEC 7 pin · AllPinouts"><meta property="og:description" content="7-pin mini-DIN connector used by DEC VSXXX-AA/GA serial mice and VSXXX-AB digitizer tablet on VAXstation and DECstation workstations."><meta property="og:type" content="article"><meta property="og:url" content="https://allpinouts.org/pinouts/connectors/input_device/mouse-digitizer-dec-7-pin/"><meta property="og:site_name" content="AllPinouts"><meta name="twitter:card" content="summary"><script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","author":{"@type":"Person","name":"Nicola Asuni"},"dateModified":"2026-06-29","datePublished":"1998-03-01","description":"7-pin mini-DIN connector used by DEC VSXXX-AA/GA serial mice and VSXXX-AB digitizer tablet on VAXstation and DECstation workstations.","headline":"Mouse / Digitizer DEC 7 pin","inLanguage":"en","mainEntityOfPage":"https://allpinouts.org/pinouts/connectors/input_device/mouse-digitizer-dec-7-pin/","publisher":{"@type":"Organization","name":"AllPinouts","url":"https://allpinouts.org/"},"url":"https://allpinouts.org/pinouts/connectors/input_device/mouse-digitizer-dec-7-pin/"}</script><link rel="icon" href="https://allpinouts.org/img/favicon.ico" sizes="any"><link rel="icon" type="image/png" sizes="32x32" href="https://allpinouts.org/img/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="https://allpinouts.org/img/favicon-16x16.png"><link rel="apple-touch-icon" sizes="180x180" href="https://allpinouts.org/img/apple-icon-180x180.png"><link rel="manifest" href="https://allpinouts.org/img/manifest.json"><meta name="theme-color" content="#1a1a1a" media="(prefers-color-scheme: dark)"><meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)"></head><body><a class="skip-link" href="#main">Skip to content</a><div id="layout"><button type="button" id="menuLink" class="menu-link" aria-label="Toggle menu" aria-expanded="false" aria-controls="menu">
<span></span></button><div id="menu"><a class="brand" href="https://allpinouts.org/"><img src="https://allpinouts.org/img/allpinouts_org_header_logo.svg" alt="AllPinouts" width="150" height="30" style="position:absolute;left:0;top:0"></a><nav aria-label="Main menu"><ul><li><a href="https://allpinouts.org/"><svg class="icon icon-house" viewBox="0 0 576 512" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1v16.2c0 22.1-17.9 40-40 40h-16c-1.1.0-2.2.0-3.3-.1-1.4.1-2.8.1-4.2.1L416 512h-24c-22.1.0-40-17.9-40-40v-24-64c0-17.7-14.3-32-32-32h-64c-17.7.0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40h-24-31.9c-1.5.0-3-.1-4.5-.2-1.2.1-2.4.2-3.6.2h-16c-22.1.0-40-17.9-40-40V360c0-.9.0-1.9.1-2.8v-69.7h-32c-18 0-32-14-32-32.1.0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"/></svg> Home</a></li><li><a href="https://allpinouts.org/pinouts/"><svg class="icon icon-plug" viewBox="0 0 384 512" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M96 0C78.3.0 64 14.3 64 32v96h64V32c0-17.7-14.3-32-32-32zM288 0c-17.7.0-32 14.3-32 32v96h64V32c0-17.7-14.3-32-32-32zM32 160c-17.7.0-32 14.3-32 32s14.3 32 32 32v32c0 77.4 55 142 128 156.8V480c0 17.7 14.3 32 32 32s32-14.3 32-32v-67.2C297 398 352 333.4 352 256v-32c17.7.0 32-14.3 32-32s-14.3-32-32-32H32z"/></svg> Pinouts</a></li><li><a href="https://allpinouts.org/pinouts/all/"><svg class="icon icon-book" viewBox="0 0 448 512" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M96 0C43 0 0 43 0 96V416c0 53 43 96 96 96h288 32c17.7.0 32-14.3 32-32s-14.3-32-32-32v-64c17.7.0 32-14.3 32-32V32c0-17.7-14.3-32-32-32H384 96zm0 384h256v64H96c-17.7.0-32-14.3-32-32s14.3-32 32-32zm32-240c0-8.8 7.2-16 16-16h192c8.8.0 16 7.2 16 16s-7.2 16-16 16H144c-8.8.0-16-7.2-16-16zm16 48h192c8.8.0 16 7.2 16 16s-7.2 16-16 16H144c-8.8.0-16-7.2-16-16s7.2-16 16-16z"/></svg> All Pinouts</a></li><li><a href="https://allpinouts.org/search/"><svg class="icon icon-magnifying-glass" viewBox="0 0 512 512" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8.0 45.3s-32.8 12.5-45.3.0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9.0 208S93.1.0 208 0 416 93.1 416 208zM208 352a144 144 0 100-288 144 144 0 100 288z"/></svg> Search</a></li><li><a href="https://allpinouts.org/legal/"><svg class="icon icon-gavel" viewBox="0 0 512 512" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M318.6 9.4c-12.5-12.5-32.8-12.5-45.3.0l-120 120c-12.5 12.5-12.5 32.8.0 45.3l16 16c12.5 12.5 32.8 12.5 45.3.0l4-4L325.4 293.4l-4 4c-12.5 12.5-12.5 32.8.0 45.3l16 16c12.5 12.5 32.8 12.5 45.3.0l120-120c12.5-12.5 12.5-32.8.0-45.3l-16-16c-12.5-12.5-32.8-12.5-45.3.0l-4 4L330.6 74.6l4-4c12.5-12.5 12.5-32.8.0-45.3l-16-16zm-152 288c-12.5-12.5-32.8-12.5-45.3.0l-112 112c-12.5 12.5-12.5 32.8.0 45.3l48 48c12.5 12.5 32.8 12.5 45.3.0l112-112c12.5-12.5 12.5-32.8.0-45.3l-1.4-1.4L272 285.3 226.7 240 168 298.7l-1.4-1.4z"/></svg> Legal</a></li></ul></nav><nav class="menutree" aria-label="Connectors"><ul><li><a href="https://allpinouts.org/pinouts/connectors/" class="ancestor">Connectors</a><ul><li><a href="https://allpinouts.org/pinouts/connectors/audio_video/">Audio and Video</a></li><li><a href="https://allpinouts.org/pinouts/connectors/buses/">Buses</a></li><li><a href="https://allpinouts.org/pinouts/connectors/car/">Car</a></li><li><a href="https://allpinouts.org/pinouts/connectors/cartridges_expansions/">Cartridges Expansions</a></li><li><a href="https://allpinouts.org/pinouts/connectors/cellular_phones/">Cellular Phones</a></li><li><a href="https://allpinouts.org/pinouts/connectors/computer_multimedia/">Computer Multimedia</a></li><li><a href="https://allpinouts.org/pinouts/connectors/computer_peripheral/">Computer Peripheral</a></li><li><a href="https://allpinouts.org/pinouts/connectors/computer_video/">Computer Video</a></li><li><a href="https://allpinouts.org/pinouts/connectors/data_storage/">Data Storage</a></li><li><a href="https://allpinouts.org/pinouts/connectors/digital_camera/">Digital Camera</a></li><li><a href="https://allpinouts.org/pinouts/connectors/gps/">GPS</a></li><li><a href="https://allpinouts.org/pinouts/connectors/input_device/" class="ancestor">Input Device</a></li><li><a href="https://allpinouts.org/pinouts/connectors/memory/">Memory</a></li><li><a href="https://allpinouts.org/pinouts/connectors/miscellaneous/">Miscellaneous</a></li><li><a href="https://allpinouts.org/pinouts/connectors/motherboards/">Motherboards</a></li><li><a href="https://allpinouts.org/pinouts/connectors/networking/">Networking</a></li><li><a href="https://allpinouts.org/pinouts/connectors/parallel/">Parallel</a></li><li><a href="https://allpinouts.org/pinouts/connectors/pda/">PDA</a></li><li><a href="https://allpinouts.oLine truncated
<input type="search" id="sitesearch" name="search" placeholder="Search" autocomplete="off">
<button type="submit">Search</button></form></div><div class="donate">Your support helps keep this website running. Please consider supporting this project. <a class="button" href="https://github.com/sponsors/tecnickcom" title="Sponsor via GitHub Sponsors">SPONSOR</a> <a class="button" href="https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ" title="Donate via PayPal">DONATE</a></div><div class="content"><div class="post-meta"><div><svg class="icon icon-calendar" viewBox="0 0 448 512" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M96 32v32H48C21.5 64 0 85.5.0 112v48h448v-48c0-26.5-21.5-48-48-48h-48V32c0-17.7-14.3-32-32-32s-32 14.3-32 32v32H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48h352c26.5.0 48-21.5 48-48V192z"/></svg>
<time datetime="1998-03-01 00:00">01 Mar 1998</time> - <em>Nicola Asuni</em></div><div class="post-meta-updated"><svg class="icon icon-wrench" viewBox="0 0 512 512" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M352 320c88.4.0 160-71.6 160-160 0-15.3-2.2-30.1-6.2-44.2-3.1-10.8-16.4-13.2-24.3-5.3l-76.8 76.8c-3 3-7.1 4.7-11.3 4.7H336c-8.8.0-16-7.2-16-16v-57.4c0-4.2 1.7-8.3 4.7-11.3l76.8-76.8c7.9-7.9 5.4-21.2-5.3-24.3C382.1 2.2 367.3.0 352 0 263.6.0 192 71.6 192 160c0 19.1 3.4 37.5 9.5 54.5L19.9 396.1C7.2 408.8.0 426.1.0 444.1.0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L297.5 310.5c17 6.2 35.4 9.5 54.5 9.5zM80 408a24 24 0 110 48 24 24 0 110-48z"/></svg>
Updated: <time datetime="2026-06-29 00:00">29 Jun 2026</time></div></div><p><img src="https://allpinouts.org/img/conn_minidin7f.svg" alt="Mouse / Digitizer DEC 7 pin – mini-DIN-7, female" width="159" height="159" loading="eager" fetchpriority="high">
7 pin mini-DIN female (key in the center) connector at the DEC VAXstations, DECstations and DEC&rsquo;s input adapter cables.</p><p>The 7-pin micro-DIN connector was introduced by Digital Equipment Corporation in the mid-1980s for the VSXXX family of input devices used with VAXstation and DECstation workstations. All three variants — the VSXXX-AA round 3-button ball mouse, the VSXXX-GA rectangular 3-button ball mouse, and the VSXXX-AB digitizer tablet — share the same connector and <abbr title="Recommended Standard 232">RS-232</abbr> serial protocol at 4800 bps (8 data bits, odd parity, 1 stop bit). The host system exposes a 15-pin D-sub port that splits via adapter cable (part 17-02640-01) to an <abbr title="Registered Jack 11">RJ-11</abbr> keyboard socket and this 7-pin mini-DIN mouse/tablet socket.</p><table><thead><tr><th>Pin</th><th>Name</th><th>Direction</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td><abbr title="Ground">GND</abbr></td><td>-</td><td>Common Ground</td></tr><tr><td>2</td><td><abbr title="Receive Data">RxD</abbr></td><td>IN</td><td>Receive Data</td></tr><tr><td>3</td><td><abbr title="Transmit Data">TxD</abbr></td><td>OUT</td><td>Transmit Data</td></tr><tr><td>4</td><td>-12V</td><td>-</td><td>-12V power supply</td></tr><tr><td>5</td><td>+5B</td><td>-</td><td>+5V power supply</td></tr><tr><td>6</td><td>+12V</td><td>-</td><td>+12V power supply</td></tr><tr><td>7</td><td>device available</td><td></td><td>The device shorts this pin to GND to let the host computer notice a plugged-in device</td></tr></tbody></table><h3 id="notes">Notes</h3><p>Pin directions are named from the host perspective (looking at the female socket on the cable). Pin 4 (−12V) is used only by the VSXXX-AA and VSXXX-GA mice; pin 6 (+12V) is used exclusively by the VSXXX-AB digitizer tablet. The connector has a keying post in the centre that prevents mis-insertion.</p><h3 id="signals">Signals</h3><ul><li><strong>GND</strong> — signal and power return; pin 7 is also shorted to this pin inside the device to signal device presence to the host</li><li><strong>RxD</strong> — serial data received by the device from the host (host-to-device); 4800 bps, RS-232 levels</li><li><strong>TxD</strong> — serial data transmitted from the device to the host; mouse sends 3-byte incremental position packets (sync + buttons + sign bits, 7-bit delta-X, 7-bit delta-Y) at up to 55 reports/s; tablet sends 5-byte absolute position packets covering a 0–1023 count range</li><li><strong>−12V</strong> — negative supply for RS-232 signal levels; used by mice (VSXXX-AA and VSXXX-GA); typically −8 V to −13 V at under 20 mA</li><li><strong>+5V</strong> — positive logic supply for mice; +5 V ±5% at up to 150 mA</li><li><strong>+12V</strong> — positive supply used exclusively by the VSXXX-AB digitizer tablet; +12 V <abbr title="Direct Current">DC</abbr> ±10% at 0.3 A; not present or required for mouse variants</li><li><strong>device available</strong> — pulled to GND (pin 1) inside the connected device; the host reads this as a logic signal confirming that a device is plugged in</li></ul><h2 id="references">References</h2><ul><li><a href="https://web-docs.gsi.de/~kraemer/COLLECTION/DEC/DECstation_5000_Kybd-Mouse_Info.txt">DECstation 5000 Keyboard/Mouse Info — cable part 17-02640-01 (GSI Darmstadt)</a></li><li><a href="https://www.manualslib.com/manual/1063011/Dec-Decstation-5000-Model-100-Series.html?page=257">DECstation 5000 Model 100 Hardware Operator&rsquo;s Guide EK-PM32C-OG-003, Table C-2 (ManualsLib)</a></li><li><a href="https://www.manualslib.com/manual/934291/Digital-Equipment-Decstation-5000-Model-200.html?page=214">DECstation 5000 Model 200 Hardware Operator&rsquo;s Guide EK-366AA-OG-002, Table C-2 (ManualsLib)</a></li><li><a href="https://raw.githubusercontent.com/torvalds/linux/master/drivers/input/mouse/vsxxxaa.c">Linux kernel driver vsxxxaa.c — DEC VSXXX-AA/GA mouse and VSXXX-AB tablet (torvalds/linux)</a></li><li><a href="https://archive.org/details/bitsavers_decqbusvcbhnicalManualFeb86_19080378">VCB02 Technical Manual AZ-GLGAB-MN, February 1986 — DEC Q-Bus Video Subsystem (Internet Archive / Bitsavers)</a></li></ul><p><a href="https://allpinouts.org/pinouts/connectors/input_device">Category:Input Device Connectors</a></p><nav class="siblings" aria-label="More in Input Device"><details open><summary>37 pinouts in Input Device</summary><ul><li><a href="https://allpinouts.org/pinouts/connectors/input_device/control-port-commodore-vic20-c64-9-pin/">Control Port Commodore VIC20 / C64 9 pin</a></li><li><a href="https://allpinouts.org/pinouts/connectors/input_device/joystick-apple-iic-9-pin/">Joystick Apple IIc 9 pin</a></li><li><a href="https://allpinouts.org/pinouts/connectors/input_device/joystick-apple-iic-plus-9-pin/">Joystick Apple IIc Plus 9 pin</a></li><li><a href="https://allpinouts.org/pinouts/connectors/input_device/joystick-atari-2600/">Joystick Atari 2600</a></li><li><a href="https://Line truncated
@@ -0,0 +1,3 @@
.pio/
.vscode/
*.pyc
+12
View File
@@ -0,0 +1,12 @@
# elkay
DEC LK401 keyboard → USB HID converter, in an inline box. The primary host application is
veetee (github.com/issinoho/veetee, same author), whose positional PC→LK401 keymap the converter
targets; see `docs/keymap.md`.
- Firmware: PlatformIO in `firmware/`, envs `micro` (default, Arduino Micro) and `teensy2`.
Build with `pio run` (and `-e teensy2`) from `firmware/`.
- Protocol facts live in `docs/protocol.md`; mark anything not yet confirmed on the real
keyboard as **verify**, and remove the mark once it has been confirmed.
- The keyboard talks on `Serial1` at 4800 8N1 through external inverters; `Serial` (USB CDC) is
the debug console.
+58
View File
@@ -0,0 +1,58 @@
# elkay
A USB HID converter for the DEC LK401 keyboard, built so that every key and LED works with
[veetee](https://github.com/issinoho/veetee), the DEC VT emulator, and with any other USB host.
The LK401 speaks DEC's LK201-family serial protocol (4800 baud, RS-423 levels, +12 V supply)
through a 4P4C modular cable. elkay is a small inline box: the keyboard's own cable plugs into
it, and a USB cable comes out. The keyboard itself is not modified.
```
LK401 ──4P4C──▶ ┌──────────────── elkay box ────────────────┐ ──USB──▶ host (veetee)
│ 12 V boost ◀── USB 5 V │
│ level shift/invert ◀─▶ ATmega32U4 UART │
│ ATmega32U4 USB ──▶ HID keyboard + LEDs │
└────────────────────────────────────────────┘
```
## Status
| Phase | What | State |
|-------|------|-------|
| 1 | Characterise the keyboard: pinout, current draw, signal levels ([procedure](docs/phase1-bench.md)) | next |
| 2 | Power and level-shifting circuit on a breadboard ([hardware](hardware/README.md)) | provisional design |
| 3 | Firmware: serial sniffer and command console, record every keycode | written, untested |
| 4 | Firmware: initialisation (LK401 mode, up/down modes, LEDs, click, bell) | console commands in place |
| 5 | Firmware: USB HID keyboard with LED feedback | — |
| 6 | Keymap for veetee ([keymap](docs/keymap.md)); veetee and Linux host side done | proposed |
| 7 | Enclosure, testing, write-up | — |
## Layout
| Path | Contents |
|------|----------|
| `firmware/` | PlatformIO project; Arduino Micro is the main target, Teensy 2.0 the alternative |
| `hardware/` | Interface circuit, bill of materials, wiring notes |
| `docs/protocol.md` | The LK201/LK401 protocol as the firmware uses it |
| `docs/keymap.md` | LK401 keycode → USB HID usage → veetee binding |
| `docs/phase1-bench.md` | Bench procedure for identifying the connector and signals |
| `host/linux/` | xkb option so Linux desktops see F13–F20 ([why](host/linux/README.md)) |
## Building
```sh
cd firmware
pio run # Arduino Micro
pio run -e teensy2 # Teensy 2.0
pio run -t upload # flash the Micro
pio device monitor # console at 115200 baud
```
## References
- *VCB02 Video Subsystem Technical Manual*, EK-104AA-TM-001 (the LK201 protocol, on bitsavers/manx)
- Linux `drivers/input/keyboard/lkkbd.c`, a working LK201/LK401 driver
## Licence
MIT.
@@ -0,0 +1,115 @@
# Keymap: LK401 → USB HID → veetee
elkay sends the PC key **in the same position** as each LK401 key, so veetee's stock positional
keymap (`crates/vt-keyboard/src/default.toml`) turns it back into the right DEC key. Other
software sees an ordinary PC keyboard.
LK401 keycodes come from `lkkbd.c`, with the LK401 labels added. Every row is **provisional**
until Phase 3 checks it on the real keyboard.
## Top row
| LK | LK401 key | HID usage | veetee |
|----|-----------|-----------|--------|
| `56` | F1 Hold Screen | F1 `3A` | hold-screen |
| `57` | F2 Print Screen | F2 `3B` | print-screen |
| `58` | F3 Set-Up | F3 `3C` | set-up |
| `59` | F4 Data/Talk | F4 `3D` | session |
| `5A` | F5 Break | F5 `3E` | break |
| `64`–`68` | F6–F10 | F6–F10 `3F`–`43` | f6–f10 |
| `71` | F11 (Esc) | F11 `44` | f11 |
| `72` | F12 (BS) | F12 `45` | f12 |
| `73` | F13 (LF) | F13 `68` | f13 ⚠ |
| `74` | F14 | F14 `69` | f14 ⚠ |
| `7C` | Help | F15 `6A` | help ⚠ |
| `7D` | Do | F16 `6B` | do ⚠ |
| `80`–`83` | F17–F20 | F17–F20 `6C`–`6F` | f17–f20 ⚠ |
⚠ On Linux these need the xkb option `elkay:fkeys`; see
[host/linux/README.md](../host/linux/README.md). Windows needs nothing.
## Editing and cursor keys
| LK | LK401 key | HID usage | veetee |
|----|-----------|-----------|--------|
| `8A` | Find | Insert `49` | find |
| `8B` | Insert Here | Home `4A` | insert-here |
| `8C` | Remove | Page Up `4B` | remove |
| `8D` | Select | Delete `4C` | select |
| `8E` | Prev Screen | End `4D` | prev-screen |
| `8F` | Next Screen | Page Down `4E` | next-screen |
| `A7` | ← | Left `50` | left |
| `A8` | → | Right `4F` | right |
| `A9` | ↓ | Down `51` | down |
| `AA` | ↑ | Up `52` | up |
## Numeric keypad
| LK | LK401 key | HID usage | veetee |
|----|-----------|-----------|--------|
| `A1` | PF1 | Num Lock `53` | pf1 |
| `A2` | PF2 | KP / `54` | pf2 |
| `A3` | PF3 | KP * `55` | pf3 |
| `A4` | PF4 | KP − `56` | pf4 |
| `A0` | KP − | KP = `67` | kp-minus (veetee after 1.7.0) |
| `9C` | KP , | KP + `57` | kp-comma |
| `95` | Enter | KP Enter `58` | kp-enter |
| `94` | KP . | KP . `63` | kp-period |
| `92` | KP 0 | KP 0 `62` | kp0 |
| `96`–`98` | KP 1–3 | KP 1–3 `59`–`5B` | kp1–kp3 |
| `99`–`9B` | KP 4–6 | KP 4–6 `5C`–`5E` | kp4–kp6 |
| `9D`–`9F` | KP 7–9 | KP 7–9 `5F`–`61` | kp7–kp9 |
The HID Keypad Comma usage (`85`) would be the obvious choice for KP `,`, but xkb gives it
`KP_Decimal`, which collides with KP `.`. KP + reaches veetee's existing kp-comma binding.
## Modifiers and special keys
| LK | LK401 key | HID usage | Notes |
|----|-----------|-----------|-------|
| `AE` | Shift (left) | Left Shift `E1` | |
| `AB` | Shift (right) | Right Shift `E5` | LK401 mode only |
| `AF` | Ctrl | Left Ctrl `E0` | |
| `B0` | Lock | Caps Lock `39` | Lock LED follows the host's Caps Lock |
| `AC` | Alt Function (left) | Left Alt `E2` | LK401 mode only |
| `B2` | Alt Function (right) | Right Alt `E6` | LK401 mode only |
| `B1` | Compose Character (left) | Menu `65` | proposed; GNOME Compose Key = Menu |
| `AD` | Compose Character (right) | Menu `65` | LK401 mode only |
| `BC` | `<X]` | Backspace `2A` | veetee: delete |
| `BD` | Return | Enter `28` | |
| `BE` | Tab | Tab `2B` | |
| `D4` | Space | Space `2C` | |
## Main typing keys (US layout)
| LK | Key | HID | LK | Key | HID | LK | Key | HID |
|----|-----|-----|----|-----|-----|----|-----|-----|
| `BF` | `` ` ~ `` ? | `35` | `C0` | 1 | `1E` | `C5` | 2 | `1F` |
| `CB` | 3 | `20` | `D0` | 4 | `21` | `D6` | 5 | `22` |
| `DB` | 6 | `23` | `E0` | 7 | `24` | `E5` | 8 | `25` |
| `EA` | 9 | `26` | `EF` | 0 | `27` | `F9` | - _ | `2D` |
| `F5` | = + | `2E` | `C1` | Q | `14` | `C6` | W | `1A` |
| `CC` | E | `08` | `D1` | R | `15` | `D7` | T | `17` |
| `DC` | Y | `1C` | `E1` | U | `18` | `E6` | I | `0C` |
| `EB` | O | `12` | `F0` | P | `13` | `FA` | [ { | `2F` |
| `F6` | ] } | `30` | `F7` | \ \| | `31` | `C2` | A | `04` |
| `C7` | S | `16` | `CD` | D | `07` | `D2` | F | `09` |
| `D8` | G | `0A` | `DD` | H | `0B` | `E2` | J | `0D` |
| `E7` | K | `0E` | `EC` | L | `0F` | `F2` | ; : | `33` |
| `FB` | ' " | `34` | `C9` | < > | `64` | `C3` | Z | `1D` |
| `C8` | X | `1B` | `CE` | C | `06` | `D3` | V | `19` |
| `D9` | B | `05` | `DE` | N | `11` | `E3` | M | `10` |
| `E8` | , < | `36` | `ED` | . > | `37` | `F3` | / ? | `38` |
`lkkbd.c` calls `BF` KEY_ESC, but the LK401 has no Esc key; it is probably the `` ` ~ `` key.
**Verify**.
## Open questions
1. **Compose Character.** Proposed: Menu (`65`). veetee's default Compose setting is Local
Compose, which on a Linux desktop means the input method's compose. GNOME can use Menu as
its Compose key (Settings → Keyboard → Compose Key), so no veetee change is needed.
2. **No Esc key.** DEC-faithful behaviour is F11. Optionally, a converter layer could make
F11 send Esc for desktop use.
3. **PF1 is Num Lock.** Pressing it toggles the host's Num Lock state. veetee binds both keypad
states, so it is harmless there, but other applications will see the keypad change.
@@ -0,0 +1,149 @@
# Phase 1: characterising the keyboard
Goal: before building anything, find which connector pin is which, how much current the
keyboard draws, and what voltages its data line uses. Only a multimeter and a 12 V supply are
needed; no microcontroller yet.
Record every result in the table at the end and commit it.
## What you need
- LK401. Its cable is hardwired at the keyboard and ends in a 4P4C (RJ10) plug, about 7.7 mm
wide. Don't cut it.
- Multimeter
- USB adjustable power module with a display (3 W, short-circuit protected) as the bench
supply. The MT3608 is kept for the final box.
- An RJ10 (4P4C) female-to-female coupler, 1:1 wiring
- An RJ10 plug-to-plug flat cable with one end cut off and the four wires stripped
- A breadboard or terminal block for the flat cable's wires; jumper wires
- A 4P4C jack breakout board with screw terminals. They are often sold as "RJ9"; RJ9, RJ10 and
RJ22 all mean the same 7.7 mm, 4-contact handset jack. Not RJ11 or 6P6C, which is wider.
The first setup is: LK401 plug → coupler → flat cable → four bare wires. The flat cable's wires
are fine and break easily, so once the breakout board has been mapped (section 2) the LK401
plugs straight into it instead, and everything connects to its screw terminals.
## 1. Set the supply
1. Plug the power module into USB, ideally on an extension cable, with **nothing** connected
to its screw terminal output except the multimeter.
2. Find the + terminal: a positive reading means the red probe is on +.
3. Turn the trimmer (clockwise raises it) until the **multimeter** reads **12.0 V**. The
module's own display can be a few tenths out. Too much voltage can damage the keyboard.
4. Unplug it again.
5. **Before the first power-up, do the load test.** Put a 1 kΩ resistor across the output for
5 minutes. If it holds steady, re-set it to 12.0 V with the resistor in place. If it keeps
climbing, don't use it on the keyboard until that is understood.
A multimeter with a weak battery can read high and drift. An apparent upward creep of about
0.8 V turned out to be exactly that. If readings wander, change the meter battery first.
## 2. Map the flat cable (no keyboard needed)
This finds which bare wire goes to which pin, so the colours found in section 3 can be checked
against the pin order in `lkkbd.c`. The keyboard is not involved.
Pins are numbered as in [protocol.md](protocol.md): hold the plug with the cable downwards, the
latch away from you and the contacts facing you. Pins 1–4 then run from left to right.
1. Meter on **continuity** (beeper), or the lowest Ω range.
2. For each plug contact 1–4 in turn, hold a probe tip on the contact's gold edge and touch the
other probe to each bare wire until it beeps. Record the colour. Each contact should connect
to exactly one wire, reading under about 1 Ω.
3. Check for shorts: probe each of the six pairs of bare wires. All should read OL.
Once the coupler has arrived, map through it too, before the keyboard is plugged in:
4. Plug the flat cable into one side of the coupler. Look into the empty side with the latch
slot at the top. The contacts are along the bottom, and pin 1 is on the **right**, because a
socket is the mirror image of a plug. The keyboard's pin 1 will land on that contact.
5. Meter probes are too thick for the socket, so hold a jumper wire's male pin against one
probe and use it as a fine tip. Touch each socket contact and find its bare wire, as in
step 2. Record the colours. This maps each keyboard pin to a colour, and shows whether the
coupler is straight or crossed.
Once the breakout board has arrived, map it before the keyboard goes near it. Boards label
their terminals differently, and some number from the other end, so don't trust the labels:
6. Plug the flat cable's plug into the board's jack.
7. On continuity, find which screw terminal beeps with each colour. Using the keyboard pins from
step 5, label each terminal with its pin number and signal.
8. Plug the LK401 into the board and repeat the pin 1 check from section 3, step 4, on the
20 MΩ range. If pin 1 still reads open, the coupler's contact is ruled out as the cause.
## 3. Find ground and +12 V (keyboard unpowered)
The keyboard is not opened and its cable is not touched: its plug sits in the coupler exactly
as it would in a terminal. Everything is measured on the cut end of our own flat cable.
1. Plug the LK401's plug into the coupler and the flat cable into its other side. Push the four
bare wires into a breadboard or terminal block so none can touch. Label each wire with its
colour and the keyboard pin section 2 mapped it to.
2. Per `lkkbd.c` the order is `1 RX-in, 2 GND, 3 +12 V, 4 TX-out`. A reversed cable only flips
it end to end, so the **two middle wires are the supply** and the two outer wires are data.
Check this in the next steps rather than trusting it.
3. Meter in **diode-test** mode. It drives about 1 mA at 2–3 V, harmless to the keyboard.
Measure between the two middle wires, then swap the probes:
- **red on +12 V, black on GND:** the reading climbs and ends at OL, as the meter charges
the keyboard's supply capacitor;
- **red on GND, black on +12 V:** a steady 0.4–0.7 V through the protection diodes of the
keyboard's chips.
4. Red probe on GND, black probe on each outer wire in turn. The keyboard's output (pin 4)
should show a diode drop. Its input (pin 1) may read OL: on our keyboard it read OL to every
other pin in both directions, in diode test and on the 20 MΩ range. Whether that is a
high-impedance input or an open wire is settled when the keyboard is first sent a command
(**verify**). A reading of 0 on any data wire is a short: stop.
5. If the middle wires don't behave as in step 3, stop and record every pair's readings in both
directions before powering anything.
## 4. Power up and measure current
1. Put the multimeter in **DC current (mA)** mode, in series between the supply's +12 V
output and the +12 V pin. Connect the supply's ground to the GND pin.
2. Power up. The keyboard should beep or click and flash its four LEDs, which is its self-test.
3. Record the current at idle, the **peak** as the LEDs flash, and the current with keys held.
4. If the supply's display blanks or the keyboard keeps restarting, the supply is hitting its
3 W limit (about 250 mA at 12 V). Note it; the final MT3608 has more headroom.
## 5. Identify the data pins and their levels
Keyboard powered, multimeter in DC volts, black probe on GND:
1. Measure each of the two data pins at idle. The keyboard's **output** (TX) is driven, so it
will show a steady voltage. Its **input** (RX) will read near 0 V or float.
2. On the TX pin, hold a key with auto-repeat, such as a letter, and watch the reading. A
multimeter can't show the serial data, but the average voltage will shift while bytes are
being sent.
3. Record the idle voltage of TX. It tells us:
- idle near **0 V**, active high: RS-232 polarity, and the receive path needs an inverter
(the expected case);
- idle near **+12 V** or +5 V: TTL polarity, and a resistor divider is enough.
## Results
| Measurement | Value |
|-------------|-------|
| Supply display offset | display 12.4 V = meter 12.0 V (1 kΩ load) |
| Supply drift, 1 kΩ load | holds 12.0 V (step 5 passed) |
| Flat cable plug, pins 1–4 (colours) | 1 yellow, 2 green, 3 red, 4 black; no shorts between wires |
| Through coupler, keyboard pins 1–4 (colours) | 1 yellow, 2 green, 3 red, 4 black |
| Coupler wiring (straight / crossed) | straight |
| Pin 1 (yellow) resistance | OL to every other pin, both directions, on 20 MΩ |
| Breakout board, terminal for pins 1–4 | |
| Pin 1 resistance via breakout board | |
| GND wire (colour) | green (keyboard pin 2) |
| +12 V wire | red (keyboard pin 3) |
| Keyboard TX wire | |
| Keyboard RX wire | |
| Current, idle | |
| Current, LED flash peak | |
| Current, keys held | |
| TX idle voltage | |
| TX voltage with a key held | |
| Diode test, +12 V → GND (red → black) | OL |
| Diode test, GND → +12 V | 771 mV |
| Diode test, GND → each data wire | yellow (pin 1) OL; black (pin 4) 1027 mV |
With these, the interface circuit in [hardware/README.md](../hardware/README.md) can be
confirmed and the power budget checked: USB 2.0 gives 500 mA at 5 V, and the boost module turns
roughly 1 mA at 12 V into 3 mA at 5 V.
@@ -0,0 +1,119 @@
# LK201 / LK401 protocol
What the firmware relies on. Sources: the VCB02 technical manual (EK-104AA-TM-001, LK201
chapter) and Linux `drivers/input/keyboard/lkkbd.c`. Anything marked **verify** comes from
secondary sources or memory and must be confirmed on this keyboard in Phase 3.
## Physical layer
- Asynchronous serial, **4800 baud, 8 data bits, no parity, 1 stop bit**, full duplex.
- RS-423-style single-ended levels. The keyboard has only a +12 V supply, so its output cannot
swing negative; the real levels are measured in [Phase 1](phase1-bench.md).
- Polarity is RS-232 style: idle (mark) is the *low* voltage, which is the opposite of a
microcontroller UART, so both directions go through an inverter.
- Connector: 4P4C modular. Per `lkkbd.c`, looking at the plug with the cable downwards and the
latch away from you, pins 1–4 left to right:
| Pin | Signal |
|-----|--------|
| 1 | Data **to** keyboard (host TX) |
| 2 | Ground |
| 3 | +12 V |
| 4 | Data **from** keyboard (host RX) |
Modular cables can be straight or reversed, so **verify** at the end of the cable we use.
## Power-up
On power-up, or after the host sends `FD` (power-up reset), the keyboard runs its self-test,
flashes the LEDs, and sends four bytes:
| Byte | Meaning |
|------|---------|
| 1 | Keyboard ID, firmware (`01`) |
| 2 | Keyboard ID, hardware (**verify**: `00`) |
| 3 | Error: `00` none, `3D` key down at power-up, `3E` self-test failed |
| 4 | Keycode of the key held down, or `00` |
The host then asks for the ID (`AB`), which returns two bytes. `lkkbd.c` tells an LK201 (`01`)
from an LK401 (`02`) by the second of them (**verify**).
Because the converter and the keyboard power up together, the power-up bytes are usually sent
before anyone is listening. The console's `reset` command sends `FD` to repeat them.
## Keycodes and special responses
Every key sends a single byte from `56` to `FB`. The bytes `B3`–`BB` are responses, not keys:
| Byte | Name | Meaning |
|------|------|---------|
| `B3` | ALL UPS | The last down/up key was released: every key is now up |
| `B4` | METRONOME | Auto-repeat tick (not used: elkay turns auto-repeat off) |
| `B5` | OUTPUT ERROR | Keyboard's transmit buffer overflowed |
| `B6` | INPUT ERROR | Keyboard received a bad command |
| `B7` | KBD LOCKED | Acknowledges "inhibit transmission" |
| `B8` | TEST MODE ACK | Acknowledges test mode |
| `B9` | PREFIX KEYS DOWN | Precedes a list of held keys after a mode change |
| `BA` | MODE CHANGE ACK | Acknowledges a mode-set command |
The full keycode table is in [keymap.md](keymap.md).
## Divisions and modes
Keys are grouped into 14 **divisions**, and each division is in one of three modes:
| Mode | Bits | Behaviour |
|------|------|-----------|
| Down only | `00` | Keycode on press, nothing on release |
| Auto-repeat down | `01` | Keycode on press, then `B4` repeats while held |
| Down/up | `11` | Keycode on press, and again on release |
USB HID needs releases, so elkay sets **every division to down/up** and lets the host do the
auto-repeat.
A mode-set command is one byte: `1 DDDD MM 0` (division in bits 6–3, mode in bits 2–1), so
down/up for division *d* is `0x86 | d << 3`.
### Releases in down/up mode
A release is reported by sending the same keycode again, **except** when the released key was
the only down/up key still held: then the keyboard sends `B3` (ALL UPS) instead. So the firmware
keeps a set of held keys, toggles a key's state each time its code arrives, and clears the whole
set on `B3`. This is also what `lkkbd.c` does.
## Commands (host → keyboard)
Parameter bytes have bit 7 set; the last byte of every command has bit 7 set, which is how the
keyboard knows the command is complete.
| Bytes | Command |
|-------|---------|
| `FD` | Power-up reset (self-test, then the four power-up bytes) |
| `AB` | Request keyboard ID (two bytes back) |
| `D3` | Reinstate defaults |
| `E9` | Enable LK401 mode: separate codes for the Alt Function keys, right Compose and right Shift |
| `0x86 \| d<<3` | Division *d* to down/up mode (d = 1–14) |
| `13 p` | LEDs on, `p` = `0x80` \| mask |
| `11 p` | LEDs off, `p` = `0x80` \| mask |
| `99` | Disable keyclick |
| `1B v` | Enable keyclick, volume `v` = `0x80` \| 0–7 (0 loudest) |
| `B9` / `BB v` | Disable / enable Ctrl-key click |
| `A1` / `23 v` | Disable / enable bell, with volume |
| `A7` | Sound the bell |
LED mask bits: `01` Wait, `02` Compose, `04` Lock, `08` Hold Screen.
## Initialisation sequence used by elkay
Taken from `lkkbd_reinit()`, with keyclick off:
```
AB request ID
D3 defaults
E9 LK401 mode
8E 96 9E … F6 divisions 1–14 to down/up
99 B9 keyclick and Ctrl click off
11 8F all LEDs off
```
The console's `init` command sends exactly this.
@@ -0,0 +1,76 @@
// LK201 / LK401 protocol constants. See docs/protocol.md.
#pragma once
#include <stdint.h>
namespace lk {
const uint32_t kBaud = 4800;
// Responses from the keyboard (0xB3-0xBB are never keycodes).
const uint8_t kAllUps = 0xB3;
const uint8_t kMetronome = 0xB4;
const uint8_t kOutputError = 0xB5;
const uint8_t kInputError = 0xB6;
const uint8_t kKbdLocked = 0xB7;
const uint8_t kTestModeAck = 0xB8;
const uint8_t kPrefixKeysDown = 0xB9;
const uint8_t kModeChangeAck = 0xBA;
const uint8_t kReserved = 0xBB;
// Power-up report.
const uint8_t kPowerUpId = 0x01;
const uint8_t kStuckKey = 0x3D;
const uint8_t kSelfTestFailed = 0x3E;
// Commands to the keyboard.
const uint8_t kLedOff = 0x11;
const uint8_t kLedOn = 0x13;
const uint8_t kEnableKeyclick = 0x1B;
const uint8_t kEnableBell = 0x23;
const uint8_t kSoundBell = 0xA7;
const uint8_t kDisableKeyclick = 0x99;
const uint8_t kDisableBell = 0xA1;
const uint8_t kRequestId = 0xAB;
const uint8_t kDisableCtrlClick = 0xB9;
const uint8_t kEnableCtrlClick = 0xBB;
const uint8_t kSetDefaults = 0xD3;
const uint8_t kEnableLk401 = 0xE9;
const uint8_t kPowerUpReset = 0xFD;
// LED parameter bits, sent as 0x80 | mask after kLedOn / kLedOff.
const uint8_t kLedWait = 0x01;
const uint8_t kLedCompose = 0x02;
const uint8_t kLedLock = 0x04;
const uint8_t kLedHold = 0x08;
const uint8_t kLedAll = 0x0F;
// Division modes, and the mode-set command byte: 1 DDDD MM 0.
const uint8_t kModeDown = 0x00;
const uint8_t kModeAutoRepeat = 0x02;
const uint8_t kModeUpDown = 0x06;
const uint8_t kDivisions = 14;
inline uint8_t setMode(uint8_t division, uint8_t mode) {
return 0x80 | (division << 3) | mode;
}
inline uint8_t param(uint8_t value) { return 0x80 | value; }
// The name of a response byte, or nullptr for a keycode.
inline const char *responseName(uint8_t b) {
switch (b) {
case kAllUps: return "ALL UPS";
case kMetronome: return "METRONOME";
case kOutputError: return "OUTPUT ERROR";
case kInputError: return "INPUT ERROR";
case kKbdLocked: return "KBD LOCKED";
case kTestModeAck: return "TEST MODE ACK";
case kPrefixKeysDown: return "PREFIX KEYS DOWN";
case kModeChangeAck: return "MODE CHANGE ACK";
case kReserved: return "RESERVED";
default: return nullptr;
}
}
} // namespace lk
@@ -0,0 +1,17 @@
; elkay firmware: DEC LK401 to USB HID.
[platformio]
default_envs = micro
[env]
framework = arduino
monitor_speed = 115200
[env:micro]
platform = atmelavr
board = micro
[env:teensy2]
platform = teensy
board = teensy2
build_flags = -D USB_SERIAL
@@ -0,0 +1,152 @@
// elkay stage 1: LK401 serial sniffer and command console.
//
// Every byte from the keyboard is printed to the USB serial console, and
// commands typed on the console are sent to the keyboard. Used to confirm the
// wiring and record the keycode table (docs/keymap.md) before the HID stage.
//
// Console input, one line at a time:
// hex bytes e.g. "13 84" (Lock LED on), sent as typed
// init the initialisation sequence from docs/protocol.md
// reset power-up reset; the keyboard repeats its self-test report
// id request the keyboard ID
// bell sound the bell
// click / noclick
// help
#include <Arduino.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "lk.h"
static const uint32_t kConsoleBaud = 115200;
static const uint8_t kActivityLed = LED_BUILTIN;
static const unsigned long kActivityMs = 30;
static char line[64];
static uint8_t lineLen;
static unsigned long activityUntil;
static void printHex(uint8_t b) {
if (b < 0x10) Serial.print('0');
Serial.print(b, HEX);
}
static void printStamp() {
Serial.print(millis());
Serial.print('\t');
}
static void send(uint8_t b) {
Serial1.write(b);
printStamp();
Serial.print(F("-> "));
printHex(b);
Serial.println();
}
static void sendInit() {
send(lk::kRequestId);
send(lk::kSetDefaults);
send(lk::kEnableLk401);
for (uint8_t d = 1; d <= lk::kDivisions; d++) {
send(lk::setMode(d, lk::kModeUpDown));
}
send(lk::kDisableKeyclick);
send(lk::kDisableCtrlClick);
send(lk::kLedOff);
send(lk::param(lk::kLedAll));
}
static void printHelp() {
Serial.println(F("elkay console: hex bytes | init | reset | id | bell | "
"click | noclick | help"));
}
// Sends each hex byte in the line; returns false if any token is not hex.
static bool sendHex(char *s) {
uint8_t bytes[sizeof(line) / 2];
uint8_t n = 0;
for (char *tok = strtok(s, " ,"); tok; tok = strtok(nullptr, " ,")) {
char *end;
unsigned long v = strtoul(tok, &end, 16);
if (*end != '\0' || v > 0xFF || n == sizeof(bytes)) return false;
bytes[n++] = v;
}
for (uint8_t i = 0; i < n; i++) send(bytes[i]);
return true;
}
static void runCommand(char *cmd) {
if (!strcmp(cmd, "")) return;
if (!strcmp(cmd, "help")) {
printHelp();
} else if (!strcmp(cmd, "init")) {
sendInit();
} else if (!strcmp(cmd, "reset")) {
send(lk::kPowerUpReset);
} else if (!strcmp(cmd, "id")) {
send(lk::kRequestId);
} else if (!strcmp(cmd, "bell")) {
send(lk::kSoundBell);
} else if (!strcmp(cmd, "click")) {
send(lk::kEnableKeyclick);
send(lk::param(2));
} else if (!strcmp(cmd, "noclick")) {
send(lk::kDisableKeyclick);
} else if (!sendHex(cmd)) {
Serial.print(F("? "));
Serial.println(cmd);
}
}
static void readConsole() {
while (Serial.available()) {
char c = Serial.read();
if (c == '\r' || c == '\n') {
line[lineLen] = '\0';
lineLen = 0;
runCommand(line);
} else if (lineLen < sizeof(line) - 1) {
line[lineLen++] = tolower(c);
}
}
}
static void readKeyboard() {
while (Serial1.available()) {
uint8_t b = Serial1.read();
digitalWrite(kActivityLed, HIGH);
activityUntil = millis() + kActivityMs;
printStamp();
Serial.print(F("<- "));
printHex(b);
const char *name = lk::responseName(b);
if (name) {
Serial.print(' ');
Serial.print(name);
}
Serial.println();
}
}
void setup() {
pinMode(kActivityLed, OUTPUT);
Serial.begin(kConsoleBaud);
Serial1.begin(lk::kBaud);
// Hold RX at idle when nothing drives it, so an unconnected input does not
// read noise as bytes. The UART still owns the pin; this only sets the pull-up.
pinMode(0, INPUT_PULLUP);
printHelp();
}
void loop() {
readKeyboard();
readConsole();
if (activityUntil && (long)(millis() - activityUntil) >= 0) {
digitalWrite(kActivityLed, LOW);
activityUntil = 0;
}
}
@@ -0,0 +1,94 @@
# Hardware
A separate inline box: a 4P4C socket for the LK401's own cable, and USB out to the host.
> **Provisional.** The interface below assumes the keyboard's output idles near 0 V and swings
> towards +12 V (RS-232 polarity, no negative rail). [Phase 1](../docs/phase1-bench.md)
> measures this; revise the circuit before building if the measurements disagree.
## Block diagram
```
USB 5V ──┬──────────────────────────────── Arduino Micro (5V)
│
polyfuse 500 mA
│
12 V boost ──┬── 470 µF ── GND
│
4P4C pin 3 (+12 V) ◀──────┘
4P4C pin 2 (GND) ◀────────────────────────────── GND
4P4C pin 4 (kbd TX) ──▶ [RX inverter] ──▶ D0 / RX1
4P4C pin 1 (kbd RX) ◀── [TX inverter] ◀── D1 / TX1
```
The pin numbers are `lkkbd.c`'s; replace them with the Phase 1 results.
## Receive path (keyboard → Arduino)
An NPN inverter. It also protects the 5 V input from the keyboard's 12 V swing.
```
kbd TX ──[10k]──┬── B 2N3904
│
[10k] 5V
│ │
GND [4k7]
│
├──▶ D0 (RX1)
C
E ── GND
```
Keyboard idle (≈0 V) → transistor off → D0 pulled high → UART idle. Correct.
## Transmit path (Arduino → keyboard)
Also an NPN inverter, with its collector pulled up to 12 V so the keyboard sees a full-swing
signal.
```
D1 (TX1) ──[10k]── B 2N3904 12V
│
[4k7]
│
├──▶ kbd RX
C
E ── GND
```
UART idle (5 V) → transistor on → keyboard input ≈0 V (mark). Correct.
If an RS-232 transceiver (MAX232/MAX3232) or a 74HC14 turns up in the parts bin, it can replace
both inverters. The transistor version needs nothing unusual.
## Power budget
USB 2.0 supplies 500 mA at 5 V. With a boost module about 80 % efficient, each 1 mA the keyboard
draws at 12 V costs about 3 mA at 5 V, and the Micro needs about 40 mA. The keyboard's current is
measured in Phase 1; if its LED-flash peak goes over about 150 mA, we'll need a bigger bulk
capacitor or a USB 3 / powered port.
## Bill of materials
| Qty | Part | Notes |
|-----|------|-------|
| 1 | Arduino Micro (A000053) | Teensy 2.0 is a drop-in alternative |
| 1 | 5 V → 12 V boost module | on hand; set to 12.0 V before connecting |
| 1 | 4P4C (RJ9/RJ10) PCB socket or breakout | takes the LK401's cable |
| 2 | 2N3904 (or BC547) NPN transistor | |
| 3 | 10 kΩ resistor | |
| 2 | 4.7 kΩ resistor | |
| 1 | 470 µF 25 V electrolytic | 12 V rail bulk capacitor |
| 1 | 100 nF ceramic | 12 V rail, at the socket |
| 1 | 500 mA polyfuse | on USB 5 V into the boost |
| 1 | Enclosure | about 80 × 50 × 25 mm |
| — | 24 MHz 8-channel USB logic analyser | test equipment, optional; use with PulseView |
## Arduino Micro pins
| Pin | Use |
|-----|-----|
| D0 (RX1) | From the keyboard, through the receive inverter |
| D1 (TX1) | To the keyboard, through the transmit inverter |
| D13 (LED) | Blinks on each byte received |
| USB | HID keyboard and debug console |
@@ -0,0 +1,46 @@
# Linux host setup
elkay sends the LK401's F13–F20 as the standard USB keys F13–F20. The kernel reports them as
`KEY_F13`–`KEY_F20`, but xkb's default symbols then turn them into other keys:
| LK401 key | Default keysym | GNOME does |
|-----------|----------------|------------|
| F13 | XF86Tools | opens Settings |
| F14 | XF86Launch5 | |
| Help (F15) | XF86Launch6 | |
| Do (F16) | XF86Launch7 | |
| F17 | XF86Launch8 | |
| F18 | XF86Launch9 | |
| F19 | none | |
| F20 | XF86AudioMicMute | mutes the microphone |
GNOME acts on F13 and F20 before any application sees them, so veetee can't fix this on its
own. The xkb option `elkay:fkeys` gives all eight keys the keysyms F13–F20, and veetee's default
keymap already binds those.
## Install
```sh
host/linux/install-xkb.sh
```
This copies `xkb/` to `~/.config/xkb/`, where libxkbcommon looks for user rules, and adds
`elkay:fkeys` to GNOME's `xkb-options`, keeping any options already set. On other desktops, run
it and then enable the option in the keyboard settings.
The option applies to every keyboard. That's harmless: few PC keyboards have F13–F20, and the
ones that do then send F13–F20 too.
## Remove
```sh
gsettings reset org.gnome.desktop.input-sources xkb-options # or remove just elkay:fkeys
rm ~/.config/xkb/symbols/elkay ~/.config/xkb/rules/evdev
```
## Testing without the keyboard
`xkb/` was checked by compiling `evdev / pc105 / us` keymaps with libxkbcommon, with and
without the option. Keycodes FK13–FK20 resolve to F13–F20 only with it. The rules file includes
the system rules *first*: rules apply in file order, and the option has to come after
`inet(evdev)` to override it.
+32
View File
@@ -0,0 +1,32 @@
#!/bin/sh
# Installs the elkay xkb option for the current user and turns it on in GNOME.
#
# It makes the LK401's F13-F20 produce the keysyms F13-F20. Without it, xkb
# sends XF86Tools for F13 (GNOME opens Settings) and XF86AudioMicMute for F20
# (GNOME mutes the microphone). See README.md.
set -eu
here=$(cd "$(dirname "$0")" && pwd)
xkb="${XDG_CONFIG_HOME:-$HOME/.config}/xkb"
mkdir -p "$xkb/symbols" "$xkb/rules"
cp "$here/xkb/symbols/elkay" "$xkb/symbols/elkay"
if [ -e "$xkb/rules/evdev" ] && ! cmp -s "$here/xkb/rules/evdev" "$xkb/rules/evdev"; then
echo "$xkb/rules/evdev already exists; add these lines to it by hand:" >&2
sed -n '/^! option/,$p' "$here/xkb/rules/evdev" >&2
exit 1
fi
cp "$here/xkb/rules/evdev" "$xkb/rules/evdev"
if command -v gsettings >/dev/null; then
options=$(gsettings get org.gnome.desktop.input-sources xkb-options)
case "$options" in
*elkay:fkeys*) ;;
"@as []") gsettings set org.gnome.desktop.input-sources xkb-options "['elkay:fkeys']" ;;
*) gsettings set org.gnome.desktop.input-sources xkb-options "${options%]}, 'elkay:fkeys']" ;;
esac
echo "elkay:fkeys is on. Log out and back in if F13 still opens Settings."
else
echo "Installed to $xkb. Turn on the xkb option elkay:fkeys in your desktop's keyboard settings."
fi
@@ -0,0 +1,9 @@
// elkay: adds the option elkay:fkeys to the system's evdev rules.
//
// The include comes first: rules apply in file order, and the option has to
// land after the base layout's inet(evdev) symbols to override them.
! include %S/evdev
! option = symbols
elkay:fkeys = +elkay(fkeys)
@@ -0,0 +1,18 @@
// elkay: DEC LK401 keys on a Linux desktop.
//
// xkb's default "inet" symbols turn F13-F18 into XF86Tools and XF86Launch5-9,
// leave F19 without a symbol and turn F20 into XF86AudioMicMute; GNOME then
// opens Settings on F13 and mutes the microphone on F20. The LK401 labels
// these keys F13-F20, so give them those keysyms back.
partial function_keys
xkb_symbols "fkeys" {
key <FK13> { [ F13 ] };
key <FK14> { [ F14 ] };
key <FK15> { [ F15 ] };
key <FK16> { [ F16 ] };
key <FK17> { [ F17 ] };
key <FK18> { [ F18 ] };
key <FK19> { [ F19 ] };
key <FK20> { [ F20 ] };
};
@@ -0,0 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head ><title >LK201/LK401 keyboard input</title><link href="../../../ggi.css" type="text/css" rel="stylesheet" /><meta content="text/html; charset=UTF-8" http-equiv="Content-type" /></head><body ><div id="page"><div id="header"><div class="menu-global"><a href="../../../index.html">Home</a> <a href="../../../documentation/index.html">Documentation</a> <a href="../../../development.html">Development</a> <a href="../../../download.html">Download</a> <a href="../../../links.html">Software</a> <a href="../../../contact.html">Contact</a> </div><div class="menu-local"><a href="index.html">index</a> <a href="../../../documentation/libgii/1.0.x/input-linux-mouse.7.html">prev</a> <a href="../../../documentation/libgii/1.0.x/input-mouse.7.html">next</a> </div></div><div id="content"><h1 id="lk201-lk401-keyboard-input"><a name="lk201-lk401-keyboard-input">LK201/LK401 keyboard input</a></h1><div class="section-1"><h2 id="name"><a name="name">Name</a></h2><div class="section-2"><p ><span class="function">input-lk201</span> : LK201/LK401 keyboard input</p></div><h2 id="id109"><a name="id109">Synopsis</a></h2><div class="section-2"><pre class="literal_block">input-lk201: [&lt;file&gt;]</pre></div><h2 id="id110"><a name="id110">Description</a></h2><div class="section-2"><p >The lk201 and lk401 devices are keyboards made by Digital Equipment
Corporation for some of there older micro computer systems and
terminals.</p><p >They connect via a 4 pin RJ connector, which carries 11.8V (+/- 6%),
GND, and two bidirectional async RS423 (RS232 Compatible) serial
lines, which are Receive and Transmit. The pins are as follows
(looking on to the male (lk201 side) connector):</p><pre class="literal_block"> -------------------
| " " " " |
| L V G D |
| K + N E |
| -&gt; D C |
| D -&gt; |
| E L |
| C K |
-- --
| |
-- --
| |
-------</pre></div><h2 id="id111"><a name="id111">Options</a></h2><div class="section-2"><dl ><dt ><span class="variable">file</span></dt><dd ><p >Specifies the serial port device to use (e.g. <span class="default">/dev/ttyS1</span>). If
this argument is not specified as part of the input's arguments,
then the device named in the environment variable
<span class="default">GII_LK201_OPTIONS</span> is used.</p></dd></dl></div><h2 id="id112"><a name="id112">Environment variables</a></h2><div class="section-2"><dl ><dt ><span class="default">GII_LK201_OPTIONS</span></dt><dd ><p >File name of serial port.</p></dd></dl></div><h2 id="id113"><a name="id113">Features</a></h2><div class="section-2"><ul ><li >Generates evKey* events.</li></ul></div><h2 id="id114"><a name="id114">Known Bugs</a></h2><div class="section-2"><ul ><li >key repeat messages are not sent, which can annoy users who want
to use the cursor keys.</li><li >Handle setting of keyclick and bell, which can also annoy
users.</li></ul></div></div></div><div id="footer"><div class="links"><a href="http://ibiblio.org/"><img src="http://www.ibiblio.org/images/ibiblio_logo.gif" alt="iBiblio" width="88" height="31" /></a><a href="http://sourceforge.net/projects/ggi"><img src="http://sourceforge.net/sflogo.php?group_id=16307" alt="Sourceforge" width="88" height="31" /></a></div></div></div></body></html>
+721
View File
@@ -0,0 +1,721 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2004 by Jan-Benedict Glaw <jbglaw@lug-owl.de>
*/
/*
* LK keyboard driver for Linux, based on sunkbd.c (C) by Vojtech Pavlik
*/
/*
* DEC LK201 and LK401 keyboard driver for Linux (primary for DECstations
* and VAXstations, but can also be used on any standard RS232 with an
* adaptor).
*
* DISCLAIMER: This works for _me_. If you break anything by using the
* information given below, I will _not_ be liable!
*
* RJ10 pinout: To DE9: Or DB25:
* 1 - RxD <----> Pin 3 (TxD) <-> Pin 2 (TxD)
* 2 - GND <----> Pin 5 (GND) <-> Pin 7 (GND)
* 4 - TxD <----> Pin 2 (RxD) <-> Pin 3 (RxD)
* 3 - +12V (from HDD drive connector), DON'T connect to DE9 or DB25!!!
*
* Pin numbers for DE9 and DB25 are noted on the plug (quite small:). For
* RJ10, it's like this:
*
* __=__ Hold the plug in front of you, cable downwards,
* /___/| nose is hidden behind the plug. Now, pin 1 is at
* |1234|| the left side, pin 4 at the right and 2 and 3 are
* |IIII|| in between, of course:)
* | ||
* |____|/
* || So the adaptor consists of three connected cables
* || for data transmission (RxD and TxD) and signal ground.
* Additionally, you have to get +12V from somewhere.
* Most easily, you'll get that from a floppy or HDD power connector.
* It's the yellow cable there (black is ground and red is +5V).
*
* The keyboard and all the commands it understands are documented in
* "VCB02 Video Subsystem - Technical Manual", EK-104AA-TM-001. This
* document is LK201 specific, but LK401 is mostly compatible. It comes
* up in LK201 mode and doesn't report any of the additional keys it
* has. These need to be switched on with the LK_CMD_ENABLE_LK401
* command. You'll find this document (scanned .pdf file) on MANX,
* a search engine specific to DEC documentation. Try
* http://www.vt100.net/manx/details?pn=EK-104AA-TM-001;id=21;cp=1
*/
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/serio.h>
#include <linux/workqueue.h>
#define DRIVER_DESC "LK keyboard driver"
MODULE_AUTHOR("Jan-Benedict Glaw <jbglaw@lug-owl.de>");
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
/*
* Known parameters:
* bell_volume
* keyclick_volume
* ctrlclick_volume
*
* Please notice that there's not yet an API to set these at runtime.
*/
static int bell_volume = 100; /* % */
module_param(bell_volume, int, 0);
MODULE_PARM_DESC(bell_volume, "Bell volume (in %). default is 100%");
static int keyclick_volume = 100; /* % */
module_param(keyclick_volume, int, 0);
MODULE_PARM_DESC(keyclick_volume, "Keyclick volume (in %), default is 100%");
static int ctrlclick_volume = 100; /* % */
module_param(ctrlclick_volume, int, 0);
MODULE_PARM_DESC(ctrlclick_volume, "Ctrlclick volume (in %), default is 100%");
static int lk201_compose_is_alt;
module_param(lk201_compose_is_alt, int, 0);
MODULE_PARM_DESC(lk201_compose_is_alt,
"If set non-zero, LK201' Compose key will act as an Alt key");
#undef LKKBD_DEBUG
#ifdef LKKBD_DEBUG
#define DBG(x...) printk(x)
#else
#define DBG(x...) do {} while (0)
#endif
/* LED control */
#define LK_LED_WAIT 0x81
#define LK_LED_COMPOSE 0x82
#define LK_LED_SHIFTLOCK 0x84
#define LK_LED_SCROLLLOCK 0x88
#define LK_CMD_LED_ON 0x13
#define LK_CMD_LED_OFF 0x11
/* Mode control */
#define LK_MODE_DOWN 0x80
#define LK_MODE_AUTODOWN 0x82
#define LK_MODE_UPDOWN 0x86
#define LK_CMD_SET_MODE(mode, div) ((mode) | ((div) << 3))
/* Misc commands */
#define LK_CMD_ENABLE_KEYCLICK 0x1b
#define LK_CMD_DISABLE_KEYCLICK 0x99
#define LK_CMD_DISABLE_BELL 0xa1
#define LK_CMD_SOUND_BELL 0xa7
#define LK_CMD_ENABLE_BELL 0x23
#define LK_CMD_DISABLE_CTRCLICK 0xb9
#define LK_CMD_ENABLE_CTRCLICK 0xbb
#define LK_CMD_SET_DEFAULTS 0xd3
#define LK_CMD_POWERCYCLE_RESET 0xfd
#define LK_CMD_ENABLE_LK401 0xe9
#define LK_CMD_REQUEST_ID 0xab
/* Misc responses from keyboard */
#define LK_STUCK_KEY 0x3d
#define LK_SELFTEST_FAILED 0x3e
#define LK_ALL_KEYS_UP 0xb3
#define LK_METRONOME 0xb4
#define LK_OUTPUT_ERROR 0xb5
#define LK_INPUT_ERROR 0xb6
#define LK_KBD_LOCKED 0xb7
#define LK_KBD_TEST_MODE_ACK 0xb8
#define LK_PREFIX_KEY_DOWN 0xb9
#define LK_MODE_CHANGE_ACK 0xba
#define LK_RESPONSE_RESERVED 0xbb
#define LK_NUM_KEYCODES 256
#define LK_NUM_IGNORE_BYTES 6
static unsigned short lkkbd_keycode[LK_NUM_KEYCODES] = {
[0x56] = KEY_F1,
[0x57] = KEY_F2,
[0x58] = KEY_F3,
[0x59] = KEY_F4,
[0x5a] = KEY_F5,
[0x64] = KEY_F6,
[0x65] = KEY_F7,
[0x66] = KEY_F8,
[0x67] = KEY_F9,
[0x68] = KEY_F10,
[0x71] = KEY_F11,
[0x72] = KEY_F12,
[0x73] = KEY_F13,
[0x74] = KEY_F14,
[0x7c] = KEY_F15,
[0x7d] = KEY_F16,
[0x80] = KEY_F17,
[0x81] = KEY_F18,
[0x82] = KEY_F19,
[0x83] = KEY_F20,
[0x8a] = KEY_FIND,
[0x8b] = KEY_INSERT,
[0x8c] = KEY_DELETE,
[0x8d] = KEY_SELECT,
[0x8e] = KEY_PAGEUP,
[0x8f] = KEY_PAGEDOWN,
[0x92] = KEY_KP0,
[0x94] = KEY_KPDOT,
[0x95] = KEY_KPENTER,
[0x96] = KEY_KP1,
[0x97] = KEY_KP2,
[0x98] = KEY_KP3,
[0x99] = KEY_KP4,
[0x9a] = KEY_KP5,
[0x9b] = KEY_KP6,
[0x9c] = KEY_KPCOMMA,
[0x9d] = KEY_KP7,
[0x9e] = KEY_KP8,
[0x9f] = KEY_KP9,
[0xa0] = KEY_KPMINUS,
[0xa1] = KEY_PROG1,
[0xa2] = KEY_PROG2,
[0xa3] = KEY_PROG3,
[0xa4] = KEY_PROG4,
[0xa7] = KEY_LEFT,
[0xa8] = KEY_RIGHT,
[0xa9] = KEY_DOWN,
[0xaa] = KEY_UP,
[0xab] = KEY_RIGHTSHIFT,
[0xac] = KEY_LEFTALT,
[0xad] = KEY_COMPOSE, /* Right Compose, that is. */
[0xae] = KEY_LEFTSHIFT, /* Same as KEY_RIGHTSHIFT on LK201 */
[0xaf] = KEY_LEFTCTRL,
[0xb0] = KEY_CAPSLOCK,
[0xb1] = KEY_COMPOSE, /* Left Compose, that is. */
[0xb2] = KEY_RIGHTALT,
[0xbc] = KEY_BACKSPACE,
[0xbd] = KEY_ENTER,
[0xbe] = KEY_TAB,
[0xbf] = KEY_ESC,
[0xc0] = KEY_1,
[0xc1] = KEY_Q,
[0xc2] = KEY_A,
[0xc3] = KEY_Z,
[0xc5] = KEY_2,
[0xc6] = KEY_W,
[0xc7] = KEY_S,
[0xc8] = KEY_X,
[0xc9] = KEY_102ND,
[0xcb] = KEY_3,
[0xcc] = KEY_E,
[0xcd] = KEY_D,
[0xce] = KEY_C,
[0xd0] = KEY_4,
[0xd1] = KEY_R,
[0xd2] = KEY_F,
[0xd3] = KEY_V,
[0xd4] = KEY_SPACE,
[0xd6] = KEY_5,
[0xd7] = KEY_T,
[0xd8] = KEY_G,
[0xd9] = KEY_B,
[0xdb] = KEY_6,
[0xdc] = KEY_Y,
[0xdd] = KEY_H,
[0xde] = KEY_N,
[0xe0] = KEY_7,
[0xe1] = KEY_U,
[0xe2] = KEY_J,
[0xe3] = KEY_M,
[0xe5] = KEY_8,
[0xe6] = KEY_I,
[0xe7] = KEY_K,
[0xe8] = KEY_COMMA,
[0xea] = KEY_9,
[0xeb] = KEY_O,
[0xec] = KEY_L,
[0xed] = KEY_DOT,
[0xef] = KEY_0,
[0xf0] = KEY_P,
[0xf2] = KEY_SEMICOLON,
[0xf3] = KEY_SLASH,
[0xf5] = KEY_EQUAL,
[0xf6] = KEY_RIGHTBRACE,
[0xf7] = KEY_BACKSLASH,
[0xf9] = KEY_MINUS,
[0xfa] = KEY_LEFTBRACE,
[0xfb] = KEY_APOSTROPHE,
};
#define CHECK_LED(LK, VAR_ON, VAR_OFF, LED, BITS) do { \
if (test_bit(LED, (LK)->dev->led)) \
VAR_ON |= BITS; \
else \
VAR_OFF |= BITS; \
} while (0)
/*
* Per-keyboard data
*/
struct lkkbd {
unsigned short keycode[LK_NUM_KEYCODES];
int ignore_bytes;
unsigned char id[LK_NUM_IGNORE_BYTES];
struct input_dev *dev;
struct serio *serio;
struct work_struct tq;
char name[64];
char phys[32];
char type;
int bell_volume;
int keyclick_volume;
int ctrlclick_volume;
};
#ifdef LKKBD_DEBUG
/*
* Responses from the keyboard and mapping back to their names.
*/
static struct {
unsigned char value;
unsigned char *name;
} lk_response[] = {
#define RESPONSE(x) { .value = (x), .name = #x, }
RESPONSE(LK_STUCK_KEY),
RESPONSE(LK_SELFTEST_FAILED),
RESPONSE(LK_ALL_KEYS_UP),
RESPONSE(LK_METRONOME),
RESPONSE(LK_OUTPUT_ERROR),
RESPONSE(LK_INPUT_ERROR),
RESPONSE(LK_KBD_LOCKED),
RESPONSE(LK_KBD_TEST_MODE_ACK),
RESPONSE(LK_PREFIX_KEY_DOWN),
RESPONSE(LK_MODE_CHANGE_ACK),
RESPONSE(LK_RESPONSE_RESERVED),
#undef RESPONSE
};
static unsigned char *response_name(unsigned char value)
{
int i;
for (i = 0; i < ARRAY_SIZE(lk_response); i++)
if (lk_response[i].value == value)
return lk_response[i].name;
return "<unknown>";
}
#endif /* LKKBD_DEBUG */
/*
* Calculate volume parameter byte for a given volume.
*/
static unsigned char volume_to_hw(int volume_percent)
{
unsigned char ret = 0;
if (volume_percent < 0)
volume_percent = 0;
if (volume_percent > 100)
volume_percent = 100;
if (volume_percent >= 0)
ret = 7;
if (volume_percent >= 13) /* 12.5 */
ret = 6;
if (volume_percent >= 25)
ret = 5;
if (volume_percent >= 38) /* 37.5 */
ret = 4;
if (volume_percent >= 50)
ret = 3;
if (volume_percent >= 63) /* 62.5 */
ret = 2; /* This is the default volume */
if (volume_percent >= 75)
ret = 1;
if (volume_percent >= 88) /* 87.5 */
ret = 0;
ret |= 0x80;
return ret;
}
static void lkkbd_detection_done(struct lkkbd *lk)
{
int i;
/*
* Reset setting for Compose key. Let Compose be KEY_COMPOSE.
*/
lk->keycode[0xb1] = KEY_COMPOSE;
/*
* Print keyboard name and modify Compose=Alt on user's request.
*/
switch (lk->id[4]) {
case 1:
strscpy(lk->name, "DEC LK201 keyboard", sizeof(lk->name));
if (lk201_compose_is_alt)
lk->keycode[0xb1] = KEY_LEFTALT;
break;
case 2:
strscpy(lk->name, "DEC LK401 keyboard", sizeof(lk->name));
break;
default:
strscpy(lk->name, "Unknown DEC keyboard", sizeof(lk->name));
printk(KERN_ERR
"lkkbd: keyboard on %s is unknown, please report to "
"Jan-Benedict Glaw <jbglaw@lug-owl.de>\n", lk->phys);
printk(KERN_ERR "lkkbd: keyboard ID'ed as:");
for (i = 0; i < LK_NUM_IGNORE_BYTES; i++)
printk(" 0x%02x", lk->id[i]);
printk("\n");
break;
}
printk(KERN_INFO "lkkbd: keyboard on %s identified as: %s\n",
lk->phys, lk->name);
/*
* Report errors during keyboard boot-up.
*/
switch (lk->id[2]) {
case 0x00:
/* All okay */
break;
case LK_STUCK_KEY:
printk(KERN_ERR "lkkbd: Stuck key on keyboard at %s\n",
lk->phys);
break;
case LK_SELFTEST_FAILED:
printk(KERN_ERR
"lkkbd: Selftest failed on keyboard at %s, "
"keyboard may not work properly\n", lk->phys);
break;
default:
printk(KERN_ERR
"lkkbd: Unknown error %02x on keyboard at %s\n",
lk->id[2], lk->phys);
break;
}
/*
* Try to hint user if there's a stuck key.
*/
if (lk->id[2] == LK_STUCK_KEY && lk->id[3] != 0)
printk(KERN_ERR
"Scancode of stuck key is 0x%02x, keycode is 0x%04x\n",
lk->id[3], lk->keycode[lk->id[3]]);
}
/*
* lkkbd_interrupt() is called by the low level driver when a character
* is received.
*/
static irqreturn_t lkkbd_interrupt(struct serio *serio,
unsigned char data, unsigned int flags)
{
struct lkkbd *lk = serio_get_drvdata(serio);
struct input_dev *input_dev = lk->dev;
unsigned int keycode;
int i;
DBG(KERN_INFO "Got byte 0x%02x\n", data);
if (lk->ignore_bytes > 0) {
DBG(KERN_INFO "Ignoring a byte on %s\n", lk->name);
lk->id[LK_NUM_IGNORE_BYTES - lk->ignore_bytes--] = data;
if (lk->ignore_bytes == 0)
lkkbd_detection_done(lk);
return IRQ_HANDLED;
}
switch (data) {
case LK_ALL_KEYS_UP:
for (i = 0; i < ARRAY_SIZE(lkkbd_keycode); i++)
input_report_key(input_dev, lk->keycode[i], 0);
input_sync(input_dev);
break;
case 0x01:
DBG(KERN_INFO "Got 0x01, scheduling re-initialization\n");
lk->ignore_bytes = LK_NUM_IGNORE_BYTES;
lk->id[LK_NUM_IGNORE_BYTES - lk->ignore_bytes--] = data;
schedule_work(&lk->tq);
break;
case LK_METRONOME:
case LK_OUTPUT_ERROR:
case LK_INPUT_ERROR:
case LK_KBD_LOCKED:
case LK_KBD_TEST_MODE_ACK:
case LK_PREFIX_KEY_DOWN:
case LK_MODE_CHANGE_ACK:
case LK_RESPONSE_RESERVED:
DBG(KERN_INFO "Got %s and don't know how to handle...\n",
response_name(data));
break;
default:
keycode = lk->keycode[data];
if (keycode != KEY_RESERVED) {
input_report_key(input_dev, keycode,
!test_bit(keycode, input_dev->key));
input_sync(input_dev);
} else {
printk(KERN_WARNING
"%s: Unknown key with scancode 0x%02x on %s.\n",
__FILE__, data, lk->name);
}
}
return IRQ_HANDLED;
}
static void lkkbd_toggle_leds(struct lkkbd *lk)
{
struct serio *serio = lk->serio;
unsigned char leds_on = 0;
unsigned char leds_off = 0;
CHECK_LED(lk, leds_on, leds_off, LED_CAPSL, LK_LED_SHIFTLOCK);
CHECK_LED(lk, leds_on, leds_off, LED_COMPOSE, LK_LED_COMPOSE);
CHECK_LED(lk, leds_on, leds_off, LED_SCROLLL, LK_LED_SCROLLLOCK);
CHECK_LED(lk, leds_on, leds_off, LED_SLEEP, LK_LED_WAIT);
if (leds_on != 0) {
serio_write(serio, LK_CMD_LED_ON);
serio_write(serio, leds_on);
}
if (leds_off != 0) {
serio_write(serio, LK_CMD_LED_OFF);
serio_write(serio, leds_off);
}
}
static void lkkbd_toggle_keyclick(struct lkkbd *lk, bool on)
{
struct serio *serio = lk->serio;
if (on) {
DBG("%s: Activating key clicks\n", __func__);
serio_write(serio, LK_CMD_ENABLE_KEYCLICK);
serio_write(serio, volume_to_hw(lk->keyclick_volume));
serio_write(serio, LK_CMD_ENABLE_CTRCLICK);
serio_write(serio, volume_to_hw(lk->ctrlclick_volume));
} else {
DBG("%s: Deactivating key clicks\n", __func__);
serio_write(serio, LK_CMD_DISABLE_KEYCLICK);
serio_write(serio, LK_CMD_DISABLE_CTRCLICK);
}
}
/*
* lkkbd_event() handles events from the input module.
*/
static int lkkbd_event(struct input_dev *dev,
unsigned int type, unsigned int code, int value)
{
struct lkkbd *lk = input_get_drvdata(dev);
switch (type) {
case EV_LED:
lkkbd_toggle_leds(lk);
return 0;
case EV_SND:
switch (code) {
case SND_CLICK:
lkkbd_toggle_keyclick(lk, value);
return 0;
case SND_BELL:
if (value != 0)
serio_write(lk->serio, LK_CMD_SOUND_BELL);
return 0;
}
break;
default:
printk(KERN_ERR "%s(): Got unknown type %d, code %d, value %d\n",
__func__, type, code, value);
}
return -1;
}
/*
* lkkbd_reinit() sets leds and beeps to a state the computer remembers they
* were in.
*/
static void lkkbd_reinit(struct work_struct *work)
{
struct lkkbd *lk = container_of(work, struct lkkbd, tq);
int division;
/* Ask for ID */
serio_write(lk->serio, LK_CMD_REQUEST_ID);
/* Reset parameters */
serio_write(lk->serio, LK_CMD_SET_DEFAULTS);
/* Set LEDs */
lkkbd_toggle_leds(lk);
/*
* Try to activate extended LK401 mode. This command will
* only work with a LK401 keyboard and grants access to
* LAlt, RAlt, RCompose and RShift.
*/
serio_write(lk->serio, LK_CMD_ENABLE_LK401);
/* Set all keys to UPDOWN mode */
for (division = 1; division <= 14; division++)
serio_write(lk->serio,
LK_CMD_SET_MODE(LK_MODE_UPDOWN, division));
/* Enable bell and set volume */
serio_write(lk->serio, LK_CMD_ENABLE_BELL);
serio_write(lk->serio, volume_to_hw(lk->bell_volume));
/* Enable/disable keyclick (and possibly set volume) */
lkkbd_toggle_keyclick(lk, test_bit(SND_CLICK, lk->dev->snd));
/* Sound the bell if needed */
if (test_bit(SND_BELL, lk->dev->snd))
serio_write(lk->serio, LK_CMD_SOUND_BELL);
}
/*
* lkkbd_connect() probes for a LK keyboard and fills the necessary structures.
*/
static int lkkbd_connect(struct serio *serio, struct serio_driver *drv)
{
struct lkkbd *lk;
struct input_dev *input_dev;
int i;
int err;
lk = kzalloc_obj(*lk);
input_dev = input_allocate_device();
if (!lk || !input_dev) {
err = -ENOMEM;
goto fail1;
}
lk->serio = serio;
lk->dev = input_dev;
INIT_WORK(&lk->tq, lkkbd_reinit);
lk->bell_volume = bell_volume;
lk->keyclick_volume = keyclick_volume;
lk->ctrlclick_volume = ctrlclick_volume;
memcpy(lk->keycode, lkkbd_keycode, sizeof(lk->keycode));
strscpy(lk->name, "DEC LK keyboard", sizeof(lk->name));
snprintf(lk->phys, sizeof(lk->phys), "%s/input0", serio->phys);
input_dev->name = lk->name;
input_dev->phys = lk->phys;
input_dev->id.bustype = BUS_RS232;
input_dev->id.vendor = SERIO_LKKBD;
input_dev->id.product = 0;
input_dev->id.version = 0x0100;
input_dev->dev.parent = &serio->dev;
input_dev->event = lkkbd_event;
input_set_drvdata(input_dev, lk);
__set_bit(EV_KEY, input_dev->evbit);
__set_bit(EV_LED, input_dev->evbit);
__set_bit(EV_SND, input_dev->evbit);
__set_bit(EV_REP, input_dev->evbit);
__set_bit(LED_CAPSL, input_dev->ledbit);
__set_bit(LED_SLEEP, input_dev->ledbit);
__set_bit(LED_COMPOSE, input_dev->ledbit);
__set_bit(LED_SCROLLL, input_dev->ledbit);
__set_bit(SND_BELL, input_dev->sndbit);
__set_bit(SND_CLICK, input_dev->sndbit);
input_dev->keycode = lk->keycode;
input_dev->keycodesize = sizeof(lk->keycode[0]);
input_dev->keycodemax = ARRAY_SIZE(lk->keycode);
for (i = 0; i < LK_NUM_KEYCODES; i++)
__set_bit(lk->keycode[i], input_dev->keybit);
__clear_bit(KEY_RESERVED, input_dev->keybit);
serio_set_drvdata(serio, lk);
err = serio_open(serio, drv);
if (err)
goto fail2;
err = input_register_device(lk->dev);
if (err)
goto fail3;
serio_write(lk->serio, LK_CMD_POWERCYCLE_RESET);
return 0;
fail3: disable_work_sync(&lk->tq);
serio_close(serio);
fail2: serio_set_drvdata(serio, NULL);
fail1: input_free_device(input_dev);
kfree(lk);
return err;
}
/*
* lkkbd_disconnect() unregisters and closes behind us.
*/
static void lkkbd_disconnect(struct serio *serio)
{
struct lkkbd *lk = serio_get_drvdata(serio);
disable_work_sync(&lk->tq);
input_get_device(lk->dev);
input_unregister_device(lk->dev);
serio_close(serio);
serio_set_drvdata(serio, NULL);
input_put_device(lk->dev);
kfree(lk);
}
static const struct serio_device_id lkkbd_serio_ids[] = {
{
.type = SERIO_RS232,
.proto = SERIO_LKKBD,
.id = SERIO_ANY,
.extra = SERIO_ANY,
},
{ 0 }
};
MODULE_DEVICE_TABLE(serio, lkkbd_serio_ids);
static struct serio_driver lkkbd_drv = {
.driver = {
.name = "lkkbd",
},
.description = DRIVER_DESC,
.id_table = lkkbd_serio_ids,
.connect = lkkbd_connect,
.disconnect = lkkbd_disconnect,
.interrupt = lkkbd_interrupt,
};
module_serio_driver(lkkbd_drv);
+535
View File
@@ -0,0 +1,535 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Driver for DEC VSXXX-AA mouse (hockey-puck mouse, ball or two rollers)
* DEC VSXXX-GA mouse (rectangular mouse, with ball)
* DEC VSXXX-AB tablet (digitizer with hair cross or stylus)
*
* Copyright (C) 2003-2004 by Jan-Benedict Glaw <jbglaw@lug-owl.de>
*
* The packet format was initially taken from a patch to GPM which is (C) 2001
* by Karsten Merker <merker@linuxtag.org>
* and Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* Later on, I had access to the device's documentation (referenced below).
*/
/*
* Building an adaptor to DE9 / DB25 RS232
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* DISCLAIMER: Use this description AT YOUR OWN RISK! I'll not pay for
* anything if you break your mouse, your computer or whatever!
*
* In theory, this mouse is a simple RS232 device. In practice, it has got
* a quite uncommon plug and the requirement to additionally get a power
* supply at +5V and -12V.
*
* If you look at the socket/jack (_not_ at the plug), we use this pin
* numbering:
* _______
* / 7 6 5 \
* | 4 --- 3 |
* \ 2 1 /
* -------
*
* DEC socket DE9 DB25 Note
* 1 (GND) 5 7 -
* 2 (RxD) 2 3 -
* 3 (TxD) 3 2 -
* 4 (-12V) - - Somewhere from the PSU. At ATX, it's
* the thin blue wire at pin 12 of the
* ATX power connector. Only required for
* VSXXX-AA/-GA mice.
* 5 (+5V) - - PSU (red wires of ATX power connector
* on pin 4, 6, 19 or 20) or HDD power
* connector (also red wire).
* 6 (+12V) - - HDD power connector, yellow wire. Only
* required for VSXXX-AB digitizer.
* 7 (dev. avail.) - - The mouse shorts this one to pin 1.
* This way, the host computer can detect
* the mouse. To use it with the adaptor,
* simply don't connect this pin.
*
* So to get a working adaptor, you need to connect the mouse with three
* wires to a RS232 port and two or three additional wires for +5V, +12V and
* -12V to the PSU.
*
* Flow specification for the link is 4800, 8o1.
*
* The mice and tablet are described in "VCB02 Video Subsystem - Technical
* Manual", DEC EK-104AA-TM-001. You'll find it at MANX, a search engine
* specific for DEC documentation. Try
* http://www.vt100.net/manx/details?pn=EK-104AA-TM-001;id=21;cp=1
*/
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/serio.h>
#define DRIVER_DESC "Driver for DEC VSXXX-AA and -GA mice and VSXXX-AB tablet"
MODULE_AUTHOR("Jan-Benedict Glaw <jbglaw@lug-owl.de>");
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
#undef VSXXXAA_DEBUG
#ifdef VSXXXAA_DEBUG
#define DBG(x...) printk(x)
#else
#define DBG(x...) do {} while (0)
#endif
#define VSXXXAA_INTRO_MASK 0x80
#define VSXXXAA_INTRO_HEAD 0x80
#define IS_HDR_BYTE(x) \
(((x) & VSXXXAA_INTRO_MASK) == VSXXXAA_INTRO_HEAD)
#define VSXXXAA_PACKET_MASK 0xe0
#define VSXXXAA_PACKET_REL 0x80
#define VSXXXAA_PACKET_ABS 0xc0
#define VSXXXAA_PACKET_POR 0xa0
#define MATCH_PACKET_TYPE(data, type) \
(((data) & VSXXXAA_PACKET_MASK) == (type))
struct vsxxxaa {
struct input_dev *dev;
struct serio *serio;
#define BUFLEN 15 /* At least 5 is needed for a full tablet packet */
unsigned char buf[BUFLEN];
unsigned char count;
unsigned char version;
unsigned char country;
unsigned char type;
char name[64];
char phys[32];
};
static void vsxxxaa_drop_bytes(struct vsxxxaa *mouse, int num)
{
if (num >= mouse->count) {
mouse->count = 0;
} else {
memmove(mouse->buf, mouse->buf + num, BUFLEN - num);
mouse->count -= num;
}
}
static void vsxxxaa_queue_byte(struct vsxxxaa *mouse, unsigned char byte)
{
if (mouse->count == BUFLEN) {
printk(KERN_ERR "%s on %s: Dropping a byte of full buffer.\n",
mouse->name, mouse->phys);
vsxxxaa_drop_bytes(mouse, 1);
}
DBG(KERN_INFO "Queueing byte 0x%02x\n", byte);
mouse->buf[mouse->count++] = byte;
}
static void vsxxxaa_detection_done(struct vsxxxaa *mouse)
{
switch (mouse->type) {
case 0x02:
strscpy(mouse->name, "DEC VSXXX-AA/-GA mouse",
sizeof(mouse->name));
break;
case 0x04:
strscpy(mouse->name, "DEC VSXXX-AB digitizer",
sizeof(mouse->name));
break;
default:
snprintf(mouse->name, sizeof(mouse->name),
"unknown DEC pointer device (type = 0x%02x)",
mouse->type);
break;
}
printk(KERN_INFO
"Found %s version 0x%02x from country 0x%02x on port %s\n",
mouse->name, mouse->version, mouse->country, mouse->phys);
}
/*
* Returns number of bytes to be dropped, 0 if packet is okay.
*/
static int vsxxxaa_check_packet(struct vsxxxaa *mouse, int packet_len)
{
int i;
/* First byte must be a header byte */
if (!IS_HDR_BYTE(mouse->buf[0])) {
DBG("vsck: len=%d, 1st=0x%02x\n", packet_len, mouse->buf[0]);
return 1;
}
/* Check all following bytes */
for (i = 1; i < packet_len; i++) {
if (IS_HDR_BYTE(mouse->buf[i])) {
printk(KERN_ERR
"Need to drop %d bytes of a broken packet.\n",
i - 1);
DBG(KERN_INFO "check: len=%d, b[%d]=0x%02x\n",
packet_len, i, mouse->buf[i]);
return i - 1;
}
}
return 0;
}
static inline int vsxxxaa_smells_like_packet(struct vsxxxaa *mouse,
unsigned char type, size_t len)
{
return mouse->count >= len && MATCH_PACKET_TYPE(mouse->buf[0], type);
}
static void vsxxxaa_handle_REL_packet(struct vsxxxaa *mouse)
{
struct input_dev *dev = mouse->dev;
unsigned char *buf = mouse->buf;
int left, middle, right;
int dx, dy;
/*
* Check for normal stream packets. This is three bytes,
* with the first byte's 3 MSB set to 100.
*
* [0]: 1 0 0 SignX SignY Left Middle Right
* [1]: 0 dx dx dx dx dx dx dx
* [2]: 0 dy dy dy dy dy dy dy
*/
/*
* Low 7 bit of byte 1 are abs(dx), bit 7 is
* 0, bit 4 of byte 0 is direction.
*/
dx = buf[1] & 0x7f;
dx *= ((buf[0] >> 4) & 0x01) ? 1 : -1;
/*
* Low 7 bit of byte 2 are abs(dy), bit 7 is
* 0, bit 3 of byte 0 is direction.
*/
dy = buf[2] & 0x7f;
dy *= ((buf[0] >> 3) & 0x01) ? -1 : 1;
/*
* Get button state. It's the low three bits
* (for three buttons) of byte 0.
*/
left = buf[0] & 0x04;
middle = buf[0] & 0x02;
right = buf[0] & 0x01;
vsxxxaa_drop_bytes(mouse, 3);
DBG(KERN_INFO "%s on %s: dx=%d, dy=%d, buttons=%s%s%s\n",
mouse->name, mouse->phys, dx, dy,
left ? "L" : "l", middle ? "M" : "m", right ? "R" : "r");
/*
* Report what we've found so far...
*/
input_report_key(dev, BTN_LEFT, left);
input_report_key(dev, BTN_MIDDLE, middle);
input_report_key(dev, BTN_RIGHT, right);
input_report_key(dev, BTN_TOUCH, 0);
input_report_rel(dev, REL_X, dx);
input_report_rel(dev, REL_Y, dy);
input_sync(dev);
}
static void vsxxxaa_handle_ABS_packet(struct vsxxxaa *mouse)
{
struct input_dev *dev = mouse->dev;
unsigned char *buf = mouse->buf;
int left, middle, right, touch;
int x, y;
/*
* Tablet position / button packet
*
* [0]: 1 1 0 B4 B3 B2 B1 Pr
* [1]: 0 0 X5 X4 X3 X2 X1 X0
* [2]: 0 0 X11 X10 X9 X8 X7 X6
* [3]: 0 0 Y5 Y4 Y3 Y2 Y1 Y0
* [4]: 0 0 Y11 Y10 Y9 Y8 Y7 Y6
*/
/*
* Get X/Y position. Y axis needs to be inverted since VSXXX-AB
* counts down->top while monitor counts top->bottom.
*/
x = ((buf[2] & 0x3f) << 6) | (buf[1] & 0x3f);
y = ((buf[4] & 0x3f) << 6) | (buf[3] & 0x3f);
y = 1023 - y;
/*
* Get button state. It's bits <4..1> of byte 0.
*/
left = buf[0] & 0x02;
middle = buf[0] & 0x04;
right = buf[0] & 0x08;
touch = buf[0] & 0x10;
vsxxxaa_drop_bytes(mouse, 5);
DBG(KERN_INFO "%s on %s: x=%d, y=%d, buttons=%s%s%s%s\n",
mouse->name, mouse->phys, x, y,
left ? "L" : "l", middle ? "M" : "m",
right ? "R" : "r", touch ? "T" : "t");
/*
* Report what we've found so far...
*/
input_report_key(dev, BTN_LEFT, left);
input_report_key(dev, BTN_MIDDLE, middle);
input_report_key(dev, BTN_RIGHT, right);
input_report_key(dev, BTN_TOUCH, touch);
input_report_abs(dev, ABS_X, x);
input_report_abs(dev, ABS_Y, y);
input_sync(dev);
}
static void vsxxxaa_handle_POR_packet(struct vsxxxaa *mouse)
{
struct input_dev *dev = mouse->dev;
unsigned char *buf = mouse->buf;
int left, middle, right;
unsigned char error;
/*
* Check for Power-On-Reset packets. These are sent out
* after plugging the mouse in, or when explicitly
* requested by sending 'T'.
*
* [0]: 1 0 1 0 R3 R2 R1 R0
* [1]: 0 M2 M1 M0 D3 D2 D1 D0
* [2]: 0 E6 E5 E4 E3 E2 E1 E0
* [3]: 0 0 0 0 0 Left Middle Right
*
* M: manufacturer location code
* R: revision code
* E: Error code. If it's in the range of 0x00..0x1f, only some
* minor problem occurred. Errors >= 0x20 are considered bad
* and the device may not work properly...
* D: <0010> == mouse, <0100> == tablet
*/
mouse->version = buf[0] & 0x0f;
mouse->country = (buf[1] >> 4) & 0x07;
mouse->type = buf[1] & 0x0f;
error = buf[2] & 0x7f;
/*
* Get button state. It's the low three bits
* (for three buttons) of byte 0. Maybe even the bit <3>
* has some meaning if a tablet is attached.
*/
left = buf[0] & 0x04;
middle = buf[0] & 0x02;
right = buf[0] & 0x01;
vsxxxaa_drop_bytes(mouse, 4);
vsxxxaa_detection_done(mouse);
if (error <= 0x1f) {
/* No (serious) error. Report buttons */
input_report_key(dev, BTN_LEFT, left);
input_report_key(dev, BTN_MIDDLE, middle);
input_report_key(dev, BTN_RIGHT, right);
input_report_key(dev, BTN_TOUCH, 0);
input_sync(dev);
if (error != 0)
printk(KERN_INFO "Your %s on %s reports error=0x%02x\n",
mouse->name, mouse->phys, error);
}
/*
* If the mouse was hot-plugged, we need to force differential mode
* now... However, give it a second to recover from it's reset.
*/
printk(KERN_NOTICE
"%s on %s: Forcing standard packet format, "
"incremental streaming mode and 72 samples/sec\n",
mouse->name, mouse->phys);
serio_write(mouse->serio, 'S'); /* Standard format */
mdelay(50);
serio_write(mouse->serio, 'R'); /* Incremental */
mdelay(50);
serio_write(mouse->serio, 'L'); /* 72 samples/sec */
}
static void vsxxxaa_parse_buffer(struct vsxxxaa *mouse)
{
unsigned char *buf = mouse->buf;
int stray_bytes;
/*
* Parse buffer to death...
*/
do {
/*
* Out of sync? Throw away what we don't understand. Each
* packet starts with a byte whose bit 7 is set. Unhandled
* packets (ie. which we don't know about or simply b0rk3d
* data...) will get shifted out of the buffer after some
* activity on the mouse.
*/
while (mouse->count > 0 && !IS_HDR_BYTE(buf[0])) {
printk(KERN_ERR "%s on %s: Dropping a byte to regain "
"sync with mouse data stream...\n",
mouse->name, mouse->phys);
vsxxxaa_drop_bytes(mouse, 1);
}
/*
* Check for packets we know about.
*/
if (vsxxxaa_smells_like_packet(mouse, VSXXXAA_PACKET_REL, 3)) {
/* Check for broken packet */
stray_bytes = vsxxxaa_check_packet(mouse, 3);
if (!stray_bytes)
vsxxxaa_handle_REL_packet(mouse);
} else if (vsxxxaa_smells_like_packet(mouse,
VSXXXAA_PACKET_ABS, 5)) {
/* Check for broken packet */
stray_bytes = vsxxxaa_check_packet(mouse, 5);
if (!stray_bytes)
vsxxxaa_handle_ABS_packet(mouse);
} else if (vsxxxaa_smells_like_packet(mouse,
VSXXXAA_PACKET_POR, 4)) {
/* Check for broken packet */
stray_bytes = vsxxxaa_check_packet(mouse, 4);
if (!stray_bytes)
vsxxxaa_handle_POR_packet(mouse);
} else {
break; /* No REL, ABS or POR packet found */
}
if (stray_bytes > 0) {
printk(KERN_ERR "Dropping %d bytes now...\n",
stray_bytes);
vsxxxaa_drop_bytes(mouse, stray_bytes);
}
} while (1);
}
static irqreturn_t vsxxxaa_interrupt(struct serio *serio,
unsigned char data, unsigned int flags)
{
struct vsxxxaa *mouse = serio_get_drvdata(serio);
vsxxxaa_queue_byte(mouse, data);
vsxxxaa_parse_buffer(mouse);
return IRQ_HANDLED;
}
static void vsxxxaa_disconnect(struct serio *serio)
{
struct vsxxxaa *mouse = serio_get_drvdata(serio);
serio_close(serio);
serio_set_drvdata(serio, NULL);
input_unregister_device(mouse->dev);
kfree(mouse);
}
static int vsxxxaa_connect(struct serio *serio, struct serio_driver *drv)
{
struct vsxxxaa *mouse;
struct input_dev *input_dev;
int err = -ENOMEM;
mouse = kzalloc_obj(*mouse);
input_dev = input_allocate_device();
if (!mouse || !input_dev)
goto fail1;
mouse->dev = input_dev;
mouse->serio = serio;
strlcat(mouse->name, "DEC VSXXX-AA/-GA mouse or VSXXX-AB digitizer",
sizeof(mouse->name));
snprintf(mouse->phys, sizeof(mouse->phys), "%s/input0", serio->phys);
input_dev->name = mouse->name;
input_dev->phys = mouse->phys;
input_dev->id.bustype = BUS_RS232;
input_dev->dev.parent = &serio->dev;
__set_bit(EV_KEY, input_dev->evbit); /* We have buttons */
__set_bit(EV_REL, input_dev->evbit);
__set_bit(EV_ABS, input_dev->evbit);
__set_bit(BTN_LEFT, input_dev->keybit); /* We have 3 buttons */
__set_bit(BTN_MIDDLE, input_dev->keybit);
__set_bit(BTN_RIGHT, input_dev->keybit);
__set_bit(BTN_TOUCH, input_dev->keybit); /* ...and Tablet */
__set_bit(REL_X, input_dev->relbit);
__set_bit(REL_Y, input_dev->relbit);
input_set_abs_params(input_dev, ABS_X, 0, 1023, 0, 0);
input_set_abs_params(input_dev, ABS_Y, 0, 1023, 0, 0);
serio_set_drvdata(serio, mouse);
err = serio_open(serio, drv);
if (err)
goto fail2;
/*
* Request selftest. Standard packet format and differential
* mode will be requested after the device ID'ed successfully.
*/
serio_write(serio, 'T'); /* Test */
err = input_register_device(input_dev);
if (err)
goto fail3;
return 0;
fail3: serio_close(serio);
fail2: serio_set_drvdata(serio, NULL);
fail1: input_free_device(input_dev);
kfree(mouse);
return err;
}
static struct serio_device_id vsxxaa_serio_ids[] = {
{
.type = SERIO_RS232,
.proto = SERIO_VSXXXAA,
.id = SERIO_ANY,
.extra = SERIO_ANY,
},
{ 0 }
};
MODULE_DEVICE_TABLE(serio, vsxxaa_serio_ids);
static struct serio_driver vsxxxaa_drv = {
.driver = {
.name = "vsxxxaa",
},
.description = DRIVER_DESC,
.id_table = vsxxaa_serio_ids,
.connect = vsxxxaa_connect,
.interrupt = vsxxxaa_interrupt,
.disconnect = vsxxxaa_disconnect,
};
module_serio_driver(vsxxxaa_drv);
@@ -0,0 +1,4 @@
*-bak
*.csv
*.bck
fp-info-cache
+25
View File
@@ -0,0 +1,25 @@
BSD 2-Clause License
Copyright (c) 2020, Paul Koning
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,12 @@
# Digital Equipment LK201 keyboard emulator
This project allows a standard USB PC keyboard to be used as replacement for a DEC LK201 keyboard. It consists of a small circuit built around an Adafruit Trinket M0 Arduino processor, and software for that to implement a USB host driver for the USB keyboard and the LK201 communication protocol.
Subdirectory `lk201` is the Arduino software. You can build it using the standard Arduino SDK, or use the prebuilt binary.
Subdirectory `kicad` is the circuit board design. You can view it using the open source KiCAD package.
Subdirectory `doc` contains several documentation files in MD format. File `emulator.md` describes the features of the emulator; `kicad` describes the board design and assembly information, and `software` describes the software and the load procedure. There are also two JPG files that show the circuit board.
File `LICENSE` is the open source license under which this emulator is released.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

@@ -0,0 +1,65 @@
# Digital Equipment LK201 keyboard emulators
The emulator allows a standard PC-style keyboard to be used as a replacement for a DEC LK201 keyboard. This is useful if you don't have an LK201 keyboard, or if all the ones you have stopped working, as happened to me.
There are now two emulators: one for USB keyboards, and a different one for PS-2 (round connector) keyboards. The circuit for the two is rather different, but the software functionality is the same for both.
The USB emulator circuit has two connectors: a modular jack which accepts the LK201 keyboard cable, and a USB connector. The USB connector on the Trinket board is a micro-B connector; your keyboard presumably needs an A jack. There are various ways to convert from one to the other; [Adafruit](https://www.adafruit.com/product/1099 "Micro B to A cable") sells one.
The PS2 emulator circuit has a modular jack for the LK201 keyboard cable and a standard PS2 mini-DIN connector for the keyboard. If you have a very old PC keyboard with a standard size DIN connector (5 pins), you'll need an adapter for that; the board design I created does not accommodate a standard size connector. Note that those old keyboards may have fewer keys, in which case you may want to adjust the key mapping in the software. Also, some of them draw too much current for the regulator on the Arduino board. If so, you will need to modify the circuit to add an external 12 to 5 volt regulator to feed the PS2 keyboard jack, rather than relying on the 5 volt out from the Arduino board.
## Keyboard mapping
For the most part, the keys on the PC keyboard correspond directly to the same keys on the LK201. This applies to all the letters and digits as well as most punctuation. Similarly, F1 through F12 are the same in both, as are the cursor keys and most of the numeric keypad keys. Both shift keys are shift, but only the left control key is control.
Some other keys are different on the two keyboards. Sometimes similar key labels exist but the positions are different; in that case I have chosen to map the keys by their positions.
| PC keyboard key | LK201 key |
| --- | --- |
| Left Windows | < > |
| Left Alt | Compose |
| Esc | F11 |
| Insert | Find |
| Home | Insert Here |
| PgUp | Remove |
| Delete | Select |
| End | Prev Screen |
| PgDn | Next Screen |
| PrtScr | F14 |
| Scroll Lock | Help (F15) |
| Pause | Do (F16) |
| Right Alt | F17 |
| Right Windows | F18 |
| App Menu | F19 |
| Right Control | F20 |
| Num Lock | PF1 |
| Num keypad / | PF2 |
| Num keypad * | PF3 |
| Num keypad + | Num keypad , |
Note that the PF4 and F13 keys are not available, I ran out of places to put them.
Also, on PS2 keyboards due to an oddity in the way the key is handled, the Pause key (used for the LK201 "Do" function) does not support LK201 up/down modes and will not auto-repeat. The keyboard always pretends that this key is immediately released, so it is not possible to simulate the normal operation.
## Lights
Standard PC keyboards have only three LEDs, while the LK201 has four. The mappings are:
| PC keyboard LED | LK201 keyboard LED |
| --- | --- |
| Scroll lock | Hold screen |
| Caps lock | Lock |
| Num lock | Compose |
The WAIT light is not on the keyboard but is provided by the LED on the center of the Arduino board. On the USB version, that is a multi-color LED, set to green for the WAIT indicator. On the PS2 board, this LED is red.
## Trinket middle LED color coding (USB keyboard emulator)
When operating, the emulator uses the middle LED for the LK201 WAIT light, in green. Other colors are used during initialization, to reflect the phases of the USB discovery.
* Purple: settling.
* Blue: waiting for device. This is the code you will see when no keyboard is plugged in.
* Yellow: attached, reset device.
* Orange: wait for device reset complete.
* Cyan (light blue): configuring device. If the board stays in this state, the USB device is not compatible with this software.
When the USB initialization completes, there is a brief bright green flash.
@@ -0,0 +1,103 @@
# Digital Equipment LK201 keyboard emulators
The `kicad` subdirectory contains two subdirectories, `lk201` for the USB emulator and `lk201ps2` for the PS2 version. In both you will find the design files for the emulator circuit board, which you can inspect or modify using the open source KiCAD package.
## Creating the circuit board
There are three ways to get a circuit board.
1. From the shared designs section of the OSHPark PCB fabricator website. You will there both the [USB board](https://oshpark.com/shared_projects/zDjWDDDL "LK201 emulator") and the [PS2 board](https://oshpark.com/shared_projects/FJsOFwzi "LK201-PS2 emulator").
2. From any PCB fabricator that accepts KiCAD board files (such as OSHPark).
3. From any PCB fabricator that doesn't, by generating the standard *Gerber* files.
If you want to use a fabricator that needs Gerber files, open the `lk201.kicad_pcb` (USB) or `lk201ps2.kicad_pcb` (PS2) file using KiCAD (specifically the *Pcbnew* application) and use the File->Plot menu option to generate them. You'll want to review the detailed instructions from the fabricator to confirm settings, file name rules, etc.
## Schematic
The board schematic is in `lk201.sch` (USB) or `lk201ps2.sch`. You won't need this to create the board, but you can review this if you are interested, or if you want to modify the design.
## Assembly
The design is a simple circuit board with all through-hole components. If you have experience building small electronic kits it should not create any problems. If you do not, you may want to seek out some help since this is not a "Heathkit" style kit with detailed instructions or tutorials.
## USB board
### Parts list
Here are all the parts in the design, with schematic reference (also on the board silk screen labeling), value or device type, description, along with manufacturer name and Digikey part number. The Digikey numbers are just by way of illustration. Capacitors and resistors are generic, you can replace them by similar devices from other suppliers so long as they fit in the available space. The capacitors are small ceramic devices with 0.1 inch lead spacing; the resistors are standard 1/4 watt parts. The transistor is a general purpose small NPN transistor, many other TO92 package transistors should work so long as the pinout matches. Beware of the 2N2222, there are two variants with different pinouts!
If you don't want the key click and beep (bell) features, omit LS1, Q1, R1 and R2.
| Ref | Value | Description | Manufacturer | Digikey part # |
| --- | ----- | ----------- | ------------ | -------------- |
| C1 | 0.1uF | Unpolarized capacitor | Kemet | 399-14010-1-ND |
| C2 | 0.1uF | Unpolarized capacitor | Kemet | 399-14010-1-ND |
| C3 | 0.1uF | Unpolarized capacitor | Kemet | 399-14010-1-ND |
| C4 | 0.1uF | Unpolarized capacitor | Kemet | 399-14010-1-ND |
| C5 | 0.1uF | Unpolarized capacitor | Kemet | 399-14010-1-ND |
| C6 | 0.1uF | Unpolarized capacitor | Kemet | 399-14010-1-ND |
| C7 | 0.1uF | Unpolarized capacitor | Kemet | 399-14010-1-ND |
| J1 | RJ22 | RJ connector, 4P4C (4 positions 4 connected), RJ9/RJ10/RJ22 | Assmann WSW | AE10381-ND |
| LS1 | PS1420 | Crystal speaker/transducer | TDK Corporation | 445-2526-1-ND |
| Q1 | 2N3904 | 0.2A Ic, 40V Vce, Small Signal NPN Transistor, TO-92 | ON Semiconductor | 2N3904FS-ND |
| R1 | 1k | Resistor, 1/4 W | Stackpole | CF14JT1K00CT-ND |
| R2 | 3.3k | Resistor, 1/4 W | Stackpole | CF14JT3K30TR-ND |
| U1 | L78L05 | Positive 100mA 30V Linear Regulator, Fixed Output 5V, TO-92 | ST Microelectronics | 497-13127-1-ND |
| U2 | Trinket M0 | Adafruit Trinket M0 board (SAMD21) | Adafruit | 1528-2361-ND |
| U3 | ICL3232CPZ | Dual RS232 driver/receiver, 5V supply | Renesas | ICL3232CPZ-ND |
If you want to use Digikey as your supplier, the saved BOM is available [there](https://www.digikey.com/short/zrhrcz "Digikey BOM").
If you need alternate sources for various components, that should be no problem so long as the pinouts match. For example, the MAX3232EPE transceiver has been reported as a valid alternative for U3.
### Assembly suggestions
I found that this order of installing the components works well:
1. U3 (16 pin DIP)
2. Resistors and capacitors
3. U1 (voltage regular) and Q1 (transistor)
4. LS1 (piezo beeper)
5. U2 (Trinket M0). The board comes with a set of pins. Cut off two 5-pin sections and solder these to the board, then slip the Trinket onto the pins and solder it.
6. J1 (RJ connector)
Note the correct orientation of U1, U2, U3, and Q1.
## PS2 board
### Parts list
Here are all the parts in the design, with schematic reference (also on the board silk screen labeling), value or device type, description, along with manufacturer name and Digikey part number. The Digikey numbers are just by way of illustration. Capacitors and resistor are generic, you can replace them by similar devices from other suppliers so long as they fit in the available space. The capacitors are small ceramic devices with 0.1 inch lead spacing; the resistors are standard 1/4 watt parts.
If you don't want the key click and beep (bell) features, omit LS1 and R1.
| Ref | Value | Description | Manufacturer | Digikey part # |
| --- | ----- | ----------- | ------------ | -------------- |
| C1 | 0.1uF | Unpolarized capacitor | Kemet | 399-14010-1-ND |
| C2 | 0.01uF | Unpolarized capacitor | Kemet | 399-4150-1-ND |
| C3 | 0.1uF | Unpolarized capacitor | Kemet | 399-14010-1-ND |
| C4 | 0.1uF | Unpolarized capacitor | Kemet | 399-14010-1-ND |
| C5 | 0.1uF | Unpolarized capacitor | Kemet | 399-14010-1-ND |
| C6 | 0.1uF | Unpolarized capacitor | Kemet | 399-14010-1-ND |
| J1 | RJ22 | RJ connector, 4P4C (4 positions 4 connected), RJ9/RJ10/RJ22 | Assmann WSW | AE10381-ND |
| J2 | Mini-DIN-6 | 6-pin Mini-DIN connector | Adam Tech | 2057-MDJ-006-FS-ND |
| LS1 | PS1420 | Crystal speaker/transducer | TDK Corporation | 445-2526-1-ND |
| R1 | 3.3k | Resistor, 1/4 W | Stackpole | CF14JT3K30TR-ND |
| U1 | L78L05 | Positive 100mA 30V Linear Regulator, Fixed Output 5V, TO-92 | ST Microelectronics | 497-13127-1-ND |
| U1 | Itsy Bitsy (5V) | Adafruit Itsy Bitsy board, 5V version | Adafruit | 1528-2501-ND |
| U2 | ICL3232CPZ | Dual RS232 driver/receiver, 5V supply | Renesas | ICL3232CPZ-ND |
Warning: there are two versions of the Itsy Bitsy, as there are with many of the AVR based Arduino microcontrollers. One has 3.3 volt I/O, the other has 5 volt I/O. The PS2 design requires the 5 volt version. Do not use the 3.3 volt version, it will be destroyed when you plug in the DEC side serial cable since that supplies 12 volts to the board and the 3.3 volt Arduino has a regulator that can only handle 6 volt max power input. And even if the regulator could handle it, driving a PS2 keyboard with 3.3 volt logic levels will not work.
If you want to use Digikey as your supplier, the saved BOM is available [there](https://www.digikey.com/short/qbc941dj "Digikey PS2 BOM").
### Assembly suggestions
I found that this order of installing the components works well:
1. U2 (16 pin DIP)
2. Resistor and capacitors
4. LS1 (piezo beeper)
5. U1 (Arduino). The board comes with a set of pins. Cut off two 14-pin sections and a 5-pin section and solder these to the board, then slip the Itsy Bitsy onto the pins and solder it.
6. J1 (RJ) and J2 (mini-DIN) connectors.
Note the correct orientation of U1 and U2.
## Software load
After the board is built you will need to load the software. See the software.md file for instructions.
@@ -0,0 +1,43 @@
# Digital Equipment LK201 keyboard emulators
The `lk201` subdirectory contains the software for the USB emulator circuit board, and the `lk201ps2` subdirectory contains the software for the PS2 emulator board. These are two separate files, although the LK201 command parsing and serial link I/O code are the same in both files. PC keyboard scan and decode are of course entirely different. The audio output (beep and key click) are also different because of different hardware capabilities of the two Arduino devices used.
## Loading the software
### USB emulator board
An Arduino board such as the Adafruit Trinket M0 used in this project comes from the factory with a boot loader which is used to load the main program. By default, the Trinket will connect as a device to the USB port of your computer. But this emulator runs that same USB port in host (not device) mode, so after the initial programming it no longer talks directly to your PC or Mac by default. The procedure given here also works fine for the initial load.
The solution is in the boot loader built into the Trinket:
1. Unplug the RJ22 serial cable (the connection to the DEC system).
2. Connect the Trinket to your computer. If this is not the first time programming it, the Trinket will get power but will not make a connection because both sides are in USB host mode.
3. *Double click* the reset button. The timing is slightly tricky; if done properly the small red LED next to the USB connector will blink (by slowly increasing and decreasing its intensity). At this point, a `TRINKETBOOT` device will appear (USB attached FAT file system).
4. To use the prebuilt binary `lk201.uf2`, copy (drag and drop) that into the TRINKETBOOT device.
5. Alternatively, use the Arduino SDK to compile and load the program source.
Either programming operation (3 or 4) will write the binary into the flash, then reset the Trinket (starting the software). As a result the TRINKETBOOT device will suddenly disappear, which will probably result in a warning message from your computer's operating system about improper removal of the device. This is normal, the message can be ignored.
### PS2 emulator board
The PS2 emulator board is loaded through its micro-USB connector using the Arduino SDK.
Unplug the RJ22 serial cable (the connection to the DEC system), then plug in a USB cable to your SDK machine. Double click the reset button to enter the boot loader (the red LED on the Arduino board will blink), then use the SDK download operation.
## Dependencies
### USB emulator board
The `lk201.ino` source file is largely self contained. To build it you will need the device libraries for the Adafruit Trinket M0 and the Adafruit ZeroTimer and DotStar libraries, all of which the SDK can download for you through the Library Manager. You will also need the USB host library for SAMD based Arduino devices, available [on Github](https://github.com/gdsports/USB_Host_Library_SAMD "SAMD USB host library").
If you want to rebuild the `lk201.uf2` file, you will need the uf2conv.py utility available [on Github](https://github.com/microsoft.com "UF2 file format specification") in `utils/uf2conv.py`. Proceed as follows:
1. Compile the program.
2. Use the `Export compiled binary` menu option to generate the `.bin` file.
3. Use `uv2conv.py` to convert that to a `.uf2` file.
### PS2 emulator board
The `lks201ps2.ino` source file is self-contained. To build it you just need the device libraries for the Adafruit Trinket (classic AVR chip, not M0).
## Options
There is only one build option: change `#define DOIDENT 1` to `#define DOIDENT 0` to eliminate the identification message at device powerup.
@@ -0,0 +1,13 @@
EESchema-DOCLIB Version 2.0
#
$CMP ICL3232
F https://www.renesas.com/us/en/document/dst/icl3221-icl3222-icl3223-icl3232-icl3241-icl3243-datasheet
$ENDCMP
#
$CMP Mini-DIN-6
D 6-pin Mini-DIN connector
K Mini-DIN
F http://service.powerdynamics.com/ec/Catalog17/Section%2011.pdf
$ENDCMP
#
#End Doc Library
@@ -0,0 +1,345 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# 2N3904
#
DEF 2N3904 Q 0 0 Y N 1 F N
F0 "Q" 200 75 50 H V L CNN
F1 "2N3904" 200 0 50 H V L CNN
F2 "Package_TO_SOT_THT:TO-92_Inline" 200 -75 50 H I L CIN
F3 "" 0 0 50 H I L CNN
F4 "2N3904FS-ND" 0 0 50 H I C CNN "Digikey"
F5 "ON Semiconductor" 0 0 50 H I C CNN "Mfg"
F6 "2N3904BU" 0 0 50 H I C CNN "Mfg part"
$FPLIST
TO?92*
$ENDFPLIST
DRAW
C 50 0 111 0 1 10 N
P 2 0 1 0 25 25 100 100 N
P 3 0 1 0 25 -25 100 -100 100 -100 N
P 3 0 1 20 25 75 25 -75 25 -75 N
P 5 0 1 0 50 -70 70 -50 90 -90 50 -70 50 -70 F
X E 1 100 -200 100 U 50 50 1 1 P
X B 2 -200 0 225 R 50 50 1 1 P
X C 3 100 200 100 D 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Audio_piezo_transducer
#
DEF Audio_piezo_transducer LS 0 0 Y N 1 F N
F0 "LS" 25 225 50 H V R CNN
F1 "Audio_piezo_transducer" 25 150 50 H V R CNN
F2 "" -35 -50 50 H I C CNN
F3 "" -35 -50 50 H I C CNN
F4 "​445-2526-1-ND" 0 0 50 H I C CNN "Digikey"
F5 "TDK Corporation" 0 0 50 H I C CNN "Mfg"
F6 "PS1420P02CT" 0 0 50 H I C CNN "Mfg part"
ALIAS Speaker_Ultrasound
DRAW
S -100 50 45 -150 0 0 10 N
S -80 -25 25 -75 0 0 10 N
P 2 0 0 0 -65 -90 15 -90 N
P 2 0 0 0 -65 -10 15 -10 N
P 2 0 0 0 -25 -90 -25 -120 N
P 2 0 0 0 -25 -10 -25 20 N
P 4 0 0 10 45 50 145 150 145 -250 45 -150 N
X 1 1 -200 0 100 R 50 50 1 1 I
X 2 2 -200 -100 100 R 50 50 1 1 I
ENDDRAW
ENDDEF
#
# C
#
DEF C C 0 10 N Y 1 F N
F0 "C" 25 100 50 H V L CNN
F1 "C" 25 -100 50 H V L CNN
F2 "" 38 -150 50 H I C CNN
F3 "" 0 0 50 H I C CNN
F4 "399-14010-1-ND​" 0 0 50 H I C CNN "Digikey"
F5 "Kemet" 0 0 50 H I C CNN "Mfg"
F6 "C315C104M5U5TA7301" 0 0 50 H I C CNN "Mfg part"
$FPLIST
C_*
$ENDFPLIST
DRAW
P 2 0 1 20 -80 -30 80 -30 N
P 2 0 1 20 -80 30 80 30 N
X ~ 1 0 150 110 D 50 50 1 1 P
X ~ 2 0 -150 110 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# ICL3232
#
DEF ICL3232 U 0 40 Y Y 1 F N
F0 "U" -100 1125 50 H V R CNN
F1 "ICL3232" -100 1050 50 H V R CNN
F2 "" 50 -1050 50 H I L CNN
F3 "" 0 100 50 H I C CNN
F4 "ICL3232CPZ-ND​" 0 0 50 H I C CNN "Digikey"
F5 "Renesas" 0 0 50 H I C CNN "Mfg"
F6 "ICL3232CPZ" 0 0 50 H I C CNN "Mfg part"
ALIAS MAX232I MAX202 ADM232A MAX3232
$FPLIST
SOIC*P1.27mm*
DIP*W7.62mm*
TSSOP*4.4x5mm*P0.65mm*
$ENDFPLIST
DRAW
C -100 -700 25 0 1 10 N
C -100 -500 25 0 1 10 N
C 25 -300 25 0 1 10 N
C 25 -100 25 0 1 10 N
T 0 -450 -900 50 0 0 0 LOGIC Normal 0 C C
T 0 450 -900 50 0 0 0 RS232 Normal 0 C C
S -600 -1000 600 1000 0 1 10 f
P 2 0 1 10 -150 -300 -325 -300 N
P 2 0 1 10 -150 -100 -325 -100 N
P 2 0 1 10 -125 -700 -325 -700 N
P 2 0 1 10 -125 -500 -325 -500 N
P 2 0 1 10 50 -300 250 -300 N
P 2 0 1 10 50 -100 250 -100 N
P 2 0 1 10 75 -700 250 -700 N
P 2 0 1 10 75 -500 250 -500 N
P 4 0 1 10 -150 -225 -150 -375 0 -300 -150 -225 N
P 4 0 1 10 -150 -25 -150 -175 0 -100 -150 -25 N
P 4 0 1 10 75 -625 75 -775 -75 -700 75 -625 N
P 4 0 1 10 75 -425 75 -575 -75 -500 75 -425 N
X C1+ 1 -800 900 200 R 50 50 1 1 P
X T2IN 10 -800 -300 200 R 50 50 1 1 I
X T1IN 11 -800 -100 200 R 50 50 1 1 I
X R1OUT 12 -800 -500 200 R 50 50 1 1 O
X R1IN 13 800 -500 200 L 50 50 1 1 I
X T1OUT 14 800 -100 200 L 50 50 1 1 O
X GND 15 0 -1200 200 U 50 50 1 1 W
X VCC 16 0 1200 200 D 50 50 1 1 W
X VS+ 2 800 400 200 L 50 50 1 1 w
X C1- 3 -800 600 200 R 50 50 1 1 P
X C2+ 4 800 900 200 L 50 50 1 1 P
X C2- 5 800 600 200 L 50 50 1 1 P
X VS- 6 800 100 200 L 50 50 1 1 w
X T2OUT 7 800 -300 200 L 50 50 1 1 O
X R2IN 8 800 -700 200 L 50 50 1 1 I
X R2OUT 9 -800 -700 200 R 50 50 1 1 O
ENDDRAW
ENDDEF
#
# Itsy_Bitsy_5V
#
DEF Itsy_Bitsy_5V U 0 20 Y Y 1 F N
F0 "U" -500 550 50 H V L BNN
F1 "Itsy_Bitsy_5V" 350 -1800 50 H V L TNN
F2 "lk201_parts:Itsy" 0 -1350 50 H I C CIN
F3 "" 0 0 50 H I C CNN
F4 "1528-2501-ND" -50 -650 50 H I C CNN "Digikey"
F5 "Adafruit" -150 -350 50 H I C CNN "Mfg"
F6 "3677" -200 -450 50 H I C CNN "Mfg part"
$FPLIST
Itsy
$ENDFPLIST
DRAW
S -500 -1750 500 500 0 1 10 f
X ~RST 1 -600 -1250 100 R 50 50 1 1 I
X A5 10 -600 -500 100 R 50 50 1 1 I
X SCK 11 -600 -800 100 R 50 50 1 1 U
X MO 12 -600 -900 100 R 50 50 1 1 U
X MI 13 -600 -1000 100 R 50 50 1 1 U
X UCAP 14 600 -1550 100 L 50 50 1 1 N
X GND 16 0 -1850 100 U 50 50 1 1 P
X D8 17 600 -600 100 L 50 50 1 1 U
X D6 18 600 -400 100 L 50 50 1 1 U
X D4 19 600 -200 100 L 50 50 1 1 U
X V5_OUT 2 600 -1450 100 L 50 50 1 1 w
X SER_RX 20 600 200 100 L 50 50 1 1 I
X SER_TX 21 600 100 100 L 50 50 1 1 O
X D2 22 600 0 100 L 50 50 1 1 U
X D3 23 600 -100 100 L 50 50 1 1 U
X D5 24 600 -300 100 L 50 50 1 1 U
X D7 25 600 -500 100 L 50 50 1 1 U
X D9 26 600 -700 100 L 50 50 1 1 U
X D10 27 600 -800 100 L 50 50 1 1 U
X D11 28 600 -900 100 L 50 50 1 1 U
X D12 29 600 -1000 100 L 50 50 1 1 U
X AREF 3 -600 300 100 R 50 50 1 1 I
X D13 30 600 -1100 100 L 50 50 1 1 U
X USB 31 100 600 100 D 50 50 1 1 W
X GND 32 200 -1850 100 U 50 50 1 1 P
X VBAT 33 -100 600 100 D 50 50 1 1 W
X GND 4 -200 -1850 100 U 50 50 1 1 P
X A0 5 -600 0 100 R 50 50 1 1 I
X A1 6 -600 -100 100 R 50 50 1 1 I
X A2 7 -600 -200 100 R 50 50 1 1 I
X A3 8 -600 -300 100 R 50 50 1 1 I
X A4 9 -600 -400 100 R 50 50 1 1 I
ENDDRAW
ENDDEF
#
# L7805CV
#
DEF L7805CV U 0 10 Y Y 1 F N
F0 "U" -150 125 50 H V C CNN
F1 "L7805CV" 0 125 50 H V L CNN
F2 "" 25 -150 50 H I L CIN
F3 "" 0 -50 50 H I C CNN
F4 "497-1443-5-ND" 0 0 50 H I C CNN "Digikey"
F5 "ST Microelectronics" 0 0 50 H I C CNN "Mfg"
F6 "L7805CV" 0 0 50 H I C CNN "Mfg part"
ALIAS L7806 L7808 L7885 L7809 L7812 L7815 L7818 L7824
$FPLIST
TO?252*
TO?263*
TO?220*
$ENDFPLIST
DRAW
S -200 75 200 -200 0 1 10 f
X IN 1 -300 0 100 R 50 50 1 1 W
X GND 2 0 -300 100 U 50 50 1 1 W
X OUT 3 300 0 100 L 50 50 1 1 w
ENDDRAW
ENDDEF
#
# MC78L05_TO92
#
DEF MC78L05_TO92 U 0 10 Y Y 1 F N
F0 "U" -150 125 50 H V C CNN
F1 "MC78L05_TO92" 0 125 50 H V L CNN
F2 "Package_TO_SOT_THT:TO-92_Inline" 0 225 50 H I C CIN
F3 "" 0 -50 50 H I C CNN
F4 "497-13127-1-ND" 400 -250 50 H I C CNN "Digikey"
F5 "ST Microelectronics" 400 -350 50 H I C CNN "Mfg"
F6 "L78L05ABZ-TR" 350 -450 50 H I C CNN "Mfg part"
ALIAS LM78L05_TO92 MC78L06_TO92 MC78L08_TO92 MC78L12_TO92 LM78L12_TO92 MC78L15_TO92 MC78L18_TO92 MC78L24_TO92 LM2931AZ-5.0_TO92 LM2936-3.0_TO92 LM2936-3.3_TO92 LM2936-5.0_TO92 LP2950-3.0_TO92 LP2950-3.3_TO92 LP2950-5.0_TO92 L78L33_TO92 L78L05_TO92 L78L06_TO92 L78L08_TO92 L78L09_TO92 L78L10_TO92 L78L12_TO92 L78L15_TO92 L78L18_TO92 L78L24_TO92
$FPLIST
TO?92*
$ENDFPLIST
DRAW
S -200 -200 200 75 0 1 10 f
X VO 1 300 0 100 L 50 50 1 1 w
X GND 2 0 -300 100 U 50 50 1 1 W
X VI 3 -300 0 100 R 50 50 1 1 W
ENDDRAW
ENDDEF
#
# Mini-DIN-6
#
DEF Mini-DIN-6 J 0 40 Y Y 1 F N
F0 "J" 0 250 50 H V C CNN
F1 "Mini-DIN-6" 250 -250 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
MINI?DIN*
$ENDFPLIST
DRAW
A 0 0 200 -1269 -531 0 1 10 N -120 -160 120 -160
A 2 4 200 1021 -1488 0 1 10 N -40 200 -170 -100
A 2 5 198 -320 790 0 1 10 N 170 -100 40 200
C -130 0 20 0 1 0 N
C -80 -100 20 0 1 0 N
C -80 100 20 0 1 0 N
C 80 -100 20 0 1 0 N
C 90 100 20 0 1 0 N
C 130 0 20 0 1 0 N
S -30 100 30 0 0 1 0 F
P 2 0 1 0 -150 0 -200 0 N
P 2 0 1 0 -100 100 -200 100 N
P 2 0 1 0 110 100 200 100 N
P 2 0 1 0 200 0 150 0 N
P 3 0 1 10 -170 -100 -120 -100 -120 -160 N
P 3 0 1 10 170 -100 120 -100 120 -160 N
P 4 0 1 0 -80 -120 -80 -140 -200 -140 -200 -100 N
P 4 0 1 10 -40 200 -40 160 40 160 40 200 N
P 4 0 1 0 80 -120 80 -140 200 -140 200 -100 N
X ~ 1 300 -100 100 L 50 50 1 1 P
X ~ 2 -300 -100 100 R 50 50 1 1 P
X ~ 3 300 0 100 L 50 50 1 1 P
X ~ 4 -300 0 100 R 50 50 1 1 P
X ~ 5 300 100 100 L 50 50 1 1 P
X ~ 6 -300 100 100 R 50 50 1 1 P
X ~ SH 0 -300 100 U 50 50 1 1 W
ENDDRAW
ENDDEF
#
# RJ22
#
DEF RJ22 J 0 40 Y Y 1 F N
F0 "J" -200 350 50 H V R CNN
F1 "RJ22" 100 350 50 H V L CNN
F2 "" 0 50 50 V I C CNN
F3 "" 0 50 50 V I C CNN
F4 "​AE10381-ND" 0 0 50 H I C CNN "Digikey"
F5 "Assmann WSW" 0 0 50 H I C CNN "Mfg"
F6 "A-2004-3-4-LP-N-R␍" 0 0 50 H I C CNN "Mfg part"
ALIAS RJ9 RJ10
$FPLIST
4P4C*
RJ9*
RJ10*
RJ22*
$ENDFPLIST
DRAW
S 300 300 -300 -200 0 1 10 f
P 3 0 1 0 -250 -25 -200 -25 -200 -25 N
P 3 0 1 0 -250 25 -200 25 -200 25 N
P 3 0 1 0 -250 75 -200 75 -200 75 N
P 3 0 1 0 -250 125 -200 125 -200 125 N
P 15 0 1 0 -250 -125 -250 225 -50 225 150 225 150 175 200 175 200 125 250 125 250 -25 200 -25 200 -75 150 -75 150 -125 -250 -125 -250 -125 N
X ~ 1 400 -100 100 L 50 50 1 1 P
X ~ 2 400 0 100 L 50 50 1 1 P
X ~ 3 400 100 100 L 50 50 1 1 P
X ~ 4 400 200 100 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# R_US
#
DEF R_US R 0 0 N Y 1 F N
F0 "R" 100 0 50 V V C CNN
F1 "R_US" -100 0 50 V V C CNN
F2 "" 40 -10 50 V I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
R_*
$ENDFPLIST
DRAW
P 2 0 1 0 0 -90 0 -100 N
P 2 0 1 0 0 90 0 100 N
P 5 0 1 0 0 -30 40 -45 0 -60 -40 -75 0 -90 N
P 5 0 1 0 0 30 40 15 0 0 -40 -15 0 -30 N
P 5 0 1 0 0 90 40 75 0 60 -40 45 0 30 N
X ~ 1 0 150 50 D 50 50 1 1 P
X ~ 2 0 -150 50 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Trinket_M0
#
DEF Trinket_M0 U 0 20 Y Y 1 F N
F0 "U" -500 550 50 H V L BNN
F1 "Trinket_M0" 100 -550 50 H V L TNN
F2 "lk201_parts:Trinket_M0" 0 0 50 H I C CIN
F3 "" 0 0 50 H I C CNN
F4 "1528-2361-ND" 0 0 50 H I C CNN "Digikey"
F5 "Adafruit" 0 0 50 H I C CNN "Mfg"
F6 "3500" 0 0 50 H I C CNN "Mfg part"
$FPLIST
Trinket
$ENDFPLIST
DRAW
S -500 -500 500 500 0 1 10 f
X VBAT 1 -100 600 100 D 50 50 1 1 W
X VCC_5V 10 100 600 100 D 50 50 1 1 W
X GND 2 0 -600 100 U 50 50 1 1 P
X SER_TX 3 600 300 100 L 50 50 1 1 O
X SER_RX 4 600 200 100 L 50 50 1 1 I
X ~RESET 5 600 -200 100 L 50 50 1 1 I
X V3_3_OUT 6 600 -400 100 L 50 50 1 1 w
X PA09 7 600 -100 100 L 50 50 1 1 T
X PA02 8 600 0 100 L 50 50 1 1 U
X PA08 9 600 100 100 L 50 50 1 1 T
ENDDRAW
ENDDEF
#
#End Library
@@ -0,0 +1,244 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# LK201_symbols_2N3904
#
DEF LK201_symbols_2N3904 Q 0 0 Y N 1 F N
F0 "Q" 200 75 50 H V L CNN
F1 "LK201_symbols_2N3904" 200 0 50 H V L CNN
F2 "Package_TO_SOT_THT:TO-92_Inline" 200 -75 50 H I L CIN
F3 "" 0 0 50 H I L CNN
F4 "2N3904FS-ND" 0 0 50 H I C CNN "Digikey"
F5 "ON Semiconductor" 0 0 50 H I C CNN "Mfg"
F6 "2N3904BU" 0 0 50 H I C CNN "Mfg part"
$FPLIST
TO?92*
$ENDFPLIST
DRAW
C 50 0 111 0 1 10 N
P 2 0 1 0 25 25 100 100 N
P 3 0 1 0 25 -25 100 -100 100 -100 N
P 3 0 1 20 25 75 25 -75 25 -75 N
P 5 0 1 0 50 -70 70 -50 90 -90 50 -70 50 -70 F
X E 1 100 -200 100 U 50 50 1 1 P
X B 2 -200 0 225 R 50 50 1 1 P
X C 3 100 200 100 D 50 50 1 1 P
ENDDRAW
ENDDEF
#
# LK201_symbols_Audio_piezo_transducer
#
DEF LK201_symbols_Audio_piezo_transducer LS 0 0 Y N 1 F N
F0 "LS" 25 225 50 H V R CNN
F1 "LK201_symbols_Audio_piezo_transducer" 25 150 50 H V R CNN
F2 "" -35 -50 50 H I C CNN
F3 "" -35 -50 50 H I C CNN
F4 "​445-2526-1-ND" 0 0 50 H I C CNN "Digikey"
F5 "TDK Corporation" 0 0 50 H I C CNN "Mfg"
F6 "PS1420P02CT" 0 0 50 H I C CNN "Mfg part"
ALIAS Speaker_Ultrasound
DRAW
S -100 50 45 -150 0 0 10 N
S -80 -25 25 -75 0 0 10 N
P 2 0 0 0 -65 -90 15 -90 N
P 2 0 0 0 -65 -10 15 -10 N
P 2 0 0 0 -25 -90 -25 -120 N
P 2 0 0 0 -25 -10 -25 20 N
P 4 0 0 10 45 50 145 150 145 -250 45 -150 N
X 1 1 -200 0 100 R 50 50 1 1 I
X 2 2 -200 -100 100 R 50 50 1 1 I
ENDDRAW
ENDDEF
#
# LK201_symbols_C
#
DEF LK201_symbols_C C 0 10 N Y 1 F N
F0 "C" 25 100 50 H V L CNN
F1 "LK201_symbols_C" 25 -100 50 H V L CNN
F2 "" 38 -150 50 H I C CNN
F3 "" 0 0 50 H I C CNN
F4 "399-14010-1-ND​" 0 0 50 H I C CNN "Digikey"
F5 "Kemet" 0 0 50 H I C CNN "Mfg"
F6 "C315C104M5U5TA7301" 0 0 50 H I C CNN "Mfg part"
$FPLIST
C_*
$ENDFPLIST
DRAW
P 2 0 1 20 -80 -30 80 -30 N
P 2 0 1 20 -80 30 80 30 N
X ~ 1 0 150 110 D 50 50 1 1 P
X ~ 2 0 -150 110 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# LK201_symbols_ICL3232
#
DEF LK201_symbols_ICL3232 U 0 40 Y Y 1 F N
F0 "U" -100 1125 50 H V R CNN
F1 "LK201_symbols_ICL3232" -100 1050 50 H V R CNN
F2 "" 50 -1050 50 H I L CNN
F3 "" 0 100 50 H I C CNN
F4 "ICL3232CPZ-ND​" 0 0 50 H I C CNN "Digikey"
F5 "Renesas" 0 0 50 H I C CNN "Mfg"
F6 "ICL3232CPZ" 0 0 50 H I C CNN "Mfg part"
ALIAS MAX232I MAX202 ADM232A MAX3232
$FPLIST
SOIC*P1.27mm*
DIP*W7.62mm*
TSSOP*4.4x5mm*P0.65mm*
$ENDFPLIST
DRAW
C -100 -700 25 0 1 10 N
C -100 -500 25 0 1 10 N
C 25 -300 25 0 1 10 N
C 25 -100 25 0 1 10 N
T 0 -450 -900 50 0 0 0 LOGIC Normal 0 C C
T 0 450 -900 50 0 0 0 RS232 Normal 0 C C
S -600 -1000 600 1000 0 1 10 f
P 2 0 1 10 -150 -300 -325 -300 N
P 2 0 1 10 -150 -100 -325 -100 N
P 2 0 1 10 -125 -700 -325 -700 N
P 2 0 1 10 -125 -500 -325 -500 N
P 2 0 1 10 50 -300 250 -300 N
P 2 0 1 10 50 -100 250 -100 N
P 2 0 1 10 75 -700 250 -700 N
P 2 0 1 10 75 -500 250 -500 N
P 4 0 1 10 -150 -225 -150 -375 0 -300 -150 -225 N
P 4 0 1 10 -150 -25 -150 -175 0 -100 -150 -25 N
P 4 0 1 10 75 -625 75 -775 -75 -700 75 -625 N
P 4 0 1 10 75 -425 75 -575 -75 -500 75 -425 N
X C1+ 1 -800 900 200 R 50 50 1 1 P
X T2IN 10 -800 -300 200 R 50 50 1 1 I
X T1IN 11 -800 -100 200 R 50 50 1 1 I
X R1OUT 12 -800 -500 200 R 50 50 1 1 O
X R1IN 13 800 -500 200 L 50 50 1 1 I
X T1OUT 14 800 -100 200 L 50 50 1 1 O
X GND 15 0 -1200 200 U 50 50 1 1 W
X VCC 16 0 1200 200 D 50 50 1 1 W
X VS+ 2 800 400 200 L 50 50 1 1 w
X C1- 3 -800 600 200 R 50 50 1 1 P
X C2+ 4 800 900 200 L 50 50 1 1 P
X C2- 5 800 600 200 L 50 50 1 1 P
X VS- 6 800 100 200 L 50 50 1 1 w
X T2OUT 7 800 -300 200 L 50 50 1 1 O
X R2IN 8 800 -700 200 L 50 50 1 1 I
X R2OUT 9 -800 -700 200 R 50 50 1 1 O
ENDDRAW
ENDDEF
#
# LK201_symbols_L78L05_TO92
#
DEF LK201_symbols_L78L05_TO92 U 0 10 Y Y 1 F N
F0 "U" -150 125 50 H V C CNN
F1 "LK201_symbols_L78L05_TO92" 0 125 50 H V L CNN
F2 "Package_TO_SOT_THT:TO-92_Inline" 0 225 50 H I C CIN
F3 "" 0 -50 50 H I C CNN
F4 "497-13127-1-ND" 400 -250 50 H I C CNN "Digikey"
F5 "ST Microelectronics" 400 -350 50 H I C CNN "Mfg"
F6 "L78L05ABZ-TR" 350 -450 50 H I C CNN "Mfg part"
ALIAS LM78L05_TO92 MC78L06_TO92 MC78L08_TO92 MC78L12_TO92 LM78L12_TO92 MC78L15_TO92 MC78L18_TO92 MC78L24_TO92 LM2931AZ-5.0_TO92 LM2936-3.0_TO92 LM2936-3.3_TO92 LM2936-5.0_TO92 LP2950-3.0_TO92 LP2950-3.3_TO92 LP2950-5.0_TO92 L78L33_TO92 L78L05_TO92 L78L06_TO92 L78L08_TO92 L78L09_TO92 L78L10_TO92 L78L12_TO92 L78L15_TO92 L78L18_TO92 L78L24_TO92
$FPLIST
TO?92*
$ENDFPLIST
DRAW
S -200 -200 200 75 0 1 10 f
X VO 1 300 0 100 L 50 50 1 1 w
X GND 2 0 -300 100 U 50 50 1 1 W
X VI 3 -300 0 100 R 50 50 1 1 W
ENDDRAW
ENDDEF
#
# LK201_symbols_RJ22
#
DEF LK201_symbols_RJ22 J 0 40 Y Y 1 F N
F0 "J" -200 350 50 H V R CNN
F1 "LK201_symbols_RJ22" 100 350 50 H V L CNN
F2 "" 0 50 50 V I C CNN
F3 "" 0 50 50 V I C CNN
F4 "​AE10381-ND" 0 0 50 H I C CNN "Digikey"
F5 "Assmann WSW" 0 0 50 H I C CNN "Mfg"
F6 "A-2004-3-4-LP-N-R␍" 0 0 50 H I C CNN "Mfg part"
ALIAS RJ9 RJ10
$FPLIST
4P4C*
RJ9*
RJ10*
RJ22*
$ENDFPLIST
DRAW
S 300 300 -300 -200 0 1 10 f
P 3 0 1 0 -250 -25 -200 -25 -200 -25 N
P 3 0 1 0 -250 25 -200 25 -200 25 N
P 3 0 1 0 -250 75 -200 75 -200 75 N
P 3 0 1 0 -250 125 -200 125 -200 125 N
P 15 0 1 0 -250 -125 -250 225 -50 225 150 225 150 175 200 175 200 125 250 125 250 -25 200 -25 200 -75 150 -75 150 -125 -250 -125 -250 -125 N
X ~ 1 400 -100 100 L 50 50 1 1 P
X ~ 2 400 0 100 L 50 50 1 1 P
X ~ 3 400 100 100 L 50 50 1 1 P
X ~ 4 400 200 100 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# LK201_symbols_R_US
#
DEF LK201_symbols_R_US R 0 0 N Y 1 F N
F0 "R" 100 0 50 V V C CNN
F1 "LK201_symbols_R_US" -100 0 50 V V C CNN
F2 "" 40 -10 50 V I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
R_*
$ENDFPLIST
DRAW
P 2 0 1 0 0 -90 0 -100 N
P 2 0 1 0 0 90 0 100 N
P 5 0 1 0 0 -30 40 -45 0 -60 -40 -75 0 -90 N
P 5 0 1 0 0 30 40 15 0 0 -40 -15 0 -30 N
P 5 0 1 0 0 90 40 75 0 60 -40 45 0 30 N
X ~ 1 0 150 50 D 50 50 1 1 P
X ~ 2 0 -150 50 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# LK201_symbols_Trinket_M0
#
DEF LK201_symbols_Trinket_M0 U 0 20 Y Y 1 F N
F0 "U" -500 550 50 H V L BNN
F1 "LK201_symbols_Trinket_M0" 100 -550 50 H V L TNN
F2 "lk201_parts:Trinket_M0" 0 0 50 H I C CIN
F3 "" 0 0 50 H I C CNN
F4 "1528-2361-ND" 0 0 50 H I C CNN "Digikey"
F5 "Adafruit" 0 0 50 H I C CNN "Mfg"
F6 "3500" 0 0 50 H I C CNN "Mfg part"
$FPLIST
Trinket
$ENDFPLIST
DRAW
S -500 -500 500 500 0 1 10 f
X VBAT 1 -100 600 100 D 50 50 1 1 W
X VCC_5V 10 100 600 100 D 50 50 1 1 W
X GND 2 0 -600 100 U 50 50 1 1 P
X SER_TX 3 600 300 100 L 50 50 1 1 O
X SER_RX 4 600 200 100 L 50 50 1 1 I
X ~RESET 5 600 -200 100 L 50 50 1 1 I
X V3_3_OUT 6 600 -400 100 L 50 50 1 1 w
X PA09 7 600 -100 100 L 50 50 1 1 T
X PA02 8 600 0 100 L 50 50 1 1 U
X PA08 9 600 100 100 L 50 50 1 1 T
ENDDRAW
ENDDEF
#
# power_GND
#
DEF power_GND #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -250 50 H I C CNN
F1 "power_GND" 0 -150 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N
X GND 1 0 0 0 D 50 50 1 1 W N
ENDDRAW
ENDDEF
#
#End Library
@@ -0,0 +1,3 @@
(fp_lib_table
(lib (name lk201_parts)(type KiCad)(uri ${KIPRJMOD}/../lk201_parts)(options "")(descr "Footprints for LK201 project"))
)
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,72 @@
update=Friday, May 22, 2020 at 05:05:43 PM
version=1
last_client=kicad
[general]
version=1
RootSch=
BoardNm=
[cvpcb]
version=1
NetIExt=net
[eeschema]
version=1
LibDir=
[eeschema/libraries]
[pcbnew]
version=1
PageLayoutDescrFile=
LastNetListRead=
CopperLayerCount=2
BoardThickness=1.6
AllowMicroVias=0
AllowBlindVias=0
RequireCourtyardDefinitions=0
ProhibitOverlappingCourtyards=1
MinTrackWidth=0.2
MinViaDiameter=0.4
MinViaDrill=0.3
MinMicroViaDiameter=0.2
MinMicroViaDrill=0.09999999999999999
MinHoleToHole=0.25
TrackWidth1=0.25
TrackWidth2=0.25
TrackWidth3=0.5
ViaDiameter1=0.8
ViaDrill1=0.4
dPairWidth1=0.2
dPairGap1=0.25
dPairViaGap1=0.25
SilkLineWidth=0.12
SilkTextSizeV=1
SilkTextSizeH=1
SilkTextSizeThickness=0.15
SilkTextItalic=0
SilkTextUpright=1
CopperLineWidth=0.2
CopperTextSizeV=1.5
CopperTextSizeH=1.5
CopperTextThickness=0.3
CopperTextItalic=0
CopperTextUpright=1
EdgeCutLineWidth=0.05
CourtyardLineWidth=0.05
OthersLineWidth=0.15
OthersTextSizeV=1
OthersTextSizeH=1
OthersTextSizeThickness=0.15
OthersTextItalic=0
OthersTextUpright=1
SolderMaskClearance=0.051
SolderMaskMinWidth=0.25
SolderPasteClearance=0
SolderPasteRatio=-0
[schematic_editor]
version=1
PageLayoutDescrFile=
PlotDirectoryName=./
SubpartIdSeparator=0
SubpartFirstId=65
NetFmtName=
SpiceAjustPassiveValues=0
LabSize=50
ERC_TestSimilarLabels=1
@@ -0,0 +1,408 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A 11000 8500
encoding utf-8
Sheet 1 1
Title "LK201 emulator"
Date "2020-05-18"
Rev "A"
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L LK201_symbols:Trinket_M0 U2
U 1 1 5EC32C3C
P 2650 3750
F 0 "U2" H 2121 3796 50 0000 R CNN
F 1 "Trinket M0" H 2121 3705 50 0000 R CNN
F 2 "lk201_parts:Trinket_M0" H 2650 3750 50 0001 C CIN
F 3 "http://ww1.microchip.com/downloads/en/DeviceDoc/doc2535.pdf" H 2650 3750 50 0001 C CNN
F 4 "1528-2361-ND" H 2650 3750 50 0001 C CNN "Digikey"
F 5 "Adafruit" H 2650 3750 50 0001 C CNN "Mfg"
F 6 "3500" H 2650 3750 50 0001 C CNN "Mfg part"
1 2650 3750
1 0 0 -1
$EndComp
$Comp
L LK201_symbols:RJ22 J1
U 1 1 5EC34B84
P 8750 3450
F 0 "J1" H 8420 3454 50 0000 R CNN
F 1 "RJ22" H 8420 3545 50 0000 R CNN
F 2 "lk201_parts:RJ22" V 8750 3500 50 0001 C CNN
F 3 "~" V 8750 3500 50 0001 C CNN
F 4 "​AE10381-ND" H 8750 3450 50 0001 C CNN "Digikey"
F 5 "Assmann WSW" H 8750 3450 50 0001 C CNN "Mfg"
F 6 "A-2004-3-4-LP-N-R␍" H 8750 3450 50 0001 C CNN "Mfg part"
1 8750 3450
-1 0 0 1
$EndComp
$Comp
L LK201_symbols:Audio_piezo_transducer LS1
U 1 1 5EC38E19
P 5400 5200
F 0 "LS1" H 5574 5196 50 0000 L CNN
F 1 "PS1420" H 5574 5105 50 0000 L CNN
F 2 "lk201_parts:PS1420_buzzer" H 5365 5150 50 0001 C CNN
F 3 "~" H 5365 5150 50 0001 C CNN
1 5400 5200
1 0 0 -1
$EndComp
$Comp
L LK201_symbols:L78L05_TO92 U1
U 1 1 5EC39C27
P 1900 2400
F 0 "U1" H 1900 2642 50 0000 C CNN
F 1 "L78L05" H 1900 2551 50 0000 C CNN
F 2 "lk201_parts:TO-92_Inline_Narrow_Oval" H 1900 2600 50 0001 C CNN
F 3 "http://www.st.com/content/ccc/resource/technical/document/datasheet/41/4f/b3/b0/12/d4/47/88/CD00000444.pdf/files/CD00000444.pdf/jcr:content/translations/en.CD00000444.pdf" H 2000 2150 50 0001 C CNN
1 1900 2400
1 0 0 -1
$EndComp
Wire Wire Line
2750 2400 2750 3150
Wire Wire Line
4000 3750 4000 5100
$Comp
L power:GND #PWR01
U 1 1 5EC3D8F1
P 1900 3050
F 0 "#PWR01" H 1900 2800 50 0001 C CNN
F 1 "GND" H 1905 2877 50 0000 C CNN
F 2 "" H 1900 3050 50 0001 C CNN
F 3 "" H 1900 3050 50 0001 C CNN
1 1900 3050
1 0 0 -1
$EndComp
Wire Wire Line
1900 3050 1900 2900
$Comp
L power:GND #PWR05
U 1 1 5EC3DD01
P 5900 4700
F 0 "#PWR05" H 5900 4450 50 0001 C CNN
F 1 "GND" H 5905 4527 50 0000 C CNN
F 2 "" H 5900 4700 50 0001 C CNN
F 3 "" H 5900 4700 50 0001 C CNN
1 5900 4700
1 0 0 -1
$EndComp
Wire Wire Line
5900 4700 5900 4450
Wire Wire Line
3250 3450 4350 3450
Wire Wire Line
4350 3450 4350 3350
Wire Wire Line
4350 3350 5100 3350
Wire Wire Line
3250 3550 4350 3550
Wire Wire Line
4350 3550 4350 3750
Wire Wire Line
4350 3750 5100 3750
Wire Wire Line
1600 2400 1450 2400
Text Label 1200 2400 0 50 ~ 0
V12
Wire Wire Line
6700 3350 8350 3350
Wire Wire Line
8350 3650 7400 3650
Wire Wire Line
7400 3650 7400 3750
Wire Wire Line
7400 3750 6700 3750
Wire Wire Line
8350 3550 8250 3550
Wire Wire Line
8250 3550 8250 4000
Wire Wire Line
8350 3450 8250 3450
Wire Wire Line
8250 3450 8250 2800
Text Label 8250 2950 0 50 ~ 0
V12
$Comp
L power:GND #PWR07
U 1 1 5EC4216F
P 8250 4000
F 0 "#PWR07" H 8250 3750 50 0001 C CNN
F 1 "GND" H 8255 3827 50 0000 C CNN
F 2 "" H 8250 4000 50 0001 C CNN
F 3 "" H 8250 4000 50 0001 C CNN
1 8250 4000
1 0 0 -1
$EndComp
Wire Wire Line
3250 3750 4000 3750
Text Label 3550 4150 0 50 ~ 0
V3_3
Wire Wire Line
3250 4150 3650 4150
Text Label 6200 2050 0 50 ~ 0
V3_3
$Comp
L LK201_symbols:ICL3232 U3
U 1 1 5EC32F48
P 5900 3250
F 0 "U3" H 5900 4631 50 0000 C CNN
F 1 "ICL3232CPZ" H 5900 4540 50 0000 C CNN
F 2 "lk201_parts:DIP-16_296_ELL" H 5950 2200 50 0001 L CNN
F 3 "https://www.renesas.com/us/en/document/dst/icl3221-icl3222-icl3223-icl3232-icl3241-icl3243-datasheet" H 5900 3350 50 0001 C CNN
F 4 "ICL3232CPZ-ND​" H 5900 3250 50 0001 C CNN "Digikey"
F 5 "Renesas" H 5900 3250 50 0001 C CNN "Mfg"
F 6 "ICL3232CPZ" H 5900 3250 50 0001 C CNN "Mfg part"
1 5900 3250
1 0 0 -1
$EndComp
Wire Wire Line
7550 2050 7550 2150
Wire Wire Line
5900 2050 7550 2050
$Comp
L LK201_symbols:C C4
U 1 1 5EC4C577
P 6950 2500
F 0 "C4" H 7065 2546 50 0000 L CNN
F 1 "0.1uF" H 7065 2455 50 0000 L CNN
F 2 "lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm" H 6988 2350 50 0001 C CNN
F 3 "~" H 6950 2500 50 0001 C CNN
1 6950 2500
1 0 0 -1
$EndComp
$Comp
L LK201_symbols:C C3
U 1 1 5EC4C74A
P 4850 2500
F 0 "C3" H 4965 2546 50 0000 L CNN
F 1 "0.1uF" H 4965 2455 50 0000 L CNN
F 2 "lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm" H 4888 2350 50 0001 C CNN
F 3 "~" H 4850 2500 50 0001 C CNN
1 4850 2500
1 0 0 -1
$EndComp
$Comp
L LK201_symbols:C C7
U 1 1 5EC4C92F
P 7550 2300
F 0 "C7" H 7665 2346 50 0000 L CNN
F 1 "0.1uF" H 7665 2255 50 0000 L CNN
F 2 "lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm" H 7588 2150 50 0001 C CNN
F 3 "~" H 7550 2300 50 0001 C CNN
1 7550 2300
1 0 0 -1
$EndComp
$Comp
L LK201_symbols:C C6
U 1 1 5EC4CB26
P 7300 2850
F 0 "C6" V 7048 2850 50 0000 C CNN
F 1 "0.1uF" V 7139 2850 50 0000 C CNN
F 2 "lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm" H 7338 2700 50 0001 C CNN
F 3 "~" H 7300 2850 50 0001 C CNN
1 7300 2850
0 1 1 0
$EndComp
$Comp
L power:GND #PWR06
U 1 1 5EC4D8C5
P 7550 4050
F 0 "#PWR06" H 7550 3800 50 0001 C CNN
F 1 "GND" H 7555 3877 50 0000 C CNN
F 2 "" H 7550 4050 50 0001 C CNN
F 3 "" H 7550 4050 50 0001 C CNN
1 7550 4050
1 0 0 -1
$EndComp
Wire Wire Line
6700 2350 6950 2350
Wire Wire Line
6700 2650 6950 2650
Wire Wire Line
6700 2850 7150 2850
Wire Wire Line
7550 2450 7550 2850
Wire Wire Line
7250 3150 7550 3150
Connection ~ 7550 3150
Wire Wire Line
7550 3150 7550 4050
Wire Wire Line
7450 2850 7550 2850
Connection ~ 7550 2850
Wire Wire Line
7550 2850 7550 3150
Wire Wire Line
5100 2350 4850 2350
Wire Wire Line
5100 2650 4850 2650
$Comp
L power:GND #PWR02
U 1 1 5EC5F121
P 2650 4600
F 0 "#PWR02" H 2650 4350 50 0001 C CNN
F 1 "GND" H 2655 4427 50 0000 C CNN
F 2 "" H 2650 4600 50 0001 C CNN
F 3 "" H 2650 4600 50 0001 C CNN
1 2650 4600
1 0 0 -1
$EndComp
Wire Wire Line
2650 4600 2650 4350
$Comp
L power:GND #PWR04
U 1 1 5EC697EA
P 4950 4300
F 0 "#PWR04" H 4950 4050 50 0001 C CNN
F 1 "GND" H 4955 4127 50 0000 C CNN
F 2 "" H 4950 4300 50 0001 C CNN
F 3 "" H 4950 4300 50 0001 C CNN
1 4950 4300
1 0 0 -1
$EndComp
Wire Wire Line
5100 3550 4950 3550
Wire Wire Line
4950 3550 4950 4300
Wire Wire Line
6700 3150 6950 3150
$Comp
L LK201_symbols:C C5
U 1 1 5EC4D189
P 7100 3150
F 0 "C5" V 6848 3150 50 0000 C CNN
F 1 "0.1uF" V 6939 3150 50 0000 C CNN
F 2 "lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm" H 7138 3000 50 0001 C CNN
F 3 "~" H 7100 3150 50 0001 C CNN
1 7100 3150
0 1 1 0
$EndComp
Text Label 2300 2400 0 50 ~ 0
V5
Wire Wire Line
2200 2400 2350 2400
$Comp
L LK201_symbols:C C1
U 1 1 5EC9910A
P 1450 2650
F 0 "C1" H 1565 2696 50 0000 L CNN
F 1 "0.1uF" H 1565 2605 50 0000 L CNN
F 2 "lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm" H 1488 2500 50 0001 C CNN
F 3 "~" H 1450 2650 50 0001 C CNN
1 1450 2650
1 0 0 -1
$EndComp
$Comp
L LK201_symbols:C C2
U 1 1 5EC9A360
P 2350 2650
F 0 "C2" H 2465 2696 50 0000 L CNN
F 1 "0.1uF" H 2465 2605 50 0000 L CNN
F 2 "lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm" H 2388 2500 50 0001 C CNN
F 3 "~" H 2350 2650 50 0001 C CNN
1 2350 2650
1 0 0 -1
$EndComp
Wire Wire Line
1450 2800 1450 2900
Wire Wire Line
1450 2900 1900 2900
Connection ~ 1900 2900
Wire Wire Line
1900 2900 1900 2700
Wire Wire Line
1900 2900 2350 2900
Wire Wire Line
2350 2900 2350 2800
Wire Wire Line
2350 2500 2350 2400
Connection ~ 2350 2400
Wire Wire Line
2350 2400 2750 2400
Wire Wire Line
1450 2500 1450 2400
Connection ~ 1450 2400
Wire Wire Line
1450 2400 1150 2400
NoConn ~ 2550 3150
NoConn ~ 3250 3950
NoConn ~ 3250 3850
NoConn ~ 3250 3650
NoConn ~ 6700 3550
NoConn ~ 6700 3950
NoConn ~ 5100 3950
$Comp
L LK201_symbols:2N3904 Q1
U 1 1 5ECB9074
P 4400 5800
F 0 "Q1" V 4728 5800 50 0000 C CNN
F 1 "2N3904" V 4637 5800 50 0000 C CNN
F 2 "lk201_parts:TO-92_Inline_Narrow_Oval" H 4600 5725 50 0001 L CIN
F 3 "https://www.fairchildsemi.com/datasheets/2N/2N3904.pdf" H 4400 5800 50 0001 L CNN
1 4400 5800
0 1 -1 0
$EndComp
$Comp
L LK201_symbols:R_US R1
U 1 1 5ECBA5B0
P 4000 5250
F 0 "R1" H 4068 5296 50 0000 L CNN
F 1 "1k" H 4068 5205 50 0000 L CNN
F 2 "lk201_parts:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal" V 4040 5240 50 0001 C CNN
F 3 "~" H 4000 5250 50 0001 C CNN
F 4 "CF14JT1K00CT-ND" H 4000 5250 50 0001 C CNN "Digikey"
F 5 "Stackpole" H 4000 5250 50 0001 C CNN "Mfg"
F 6 "CF14JT1K00" H 4000 5250 50 0001 C CNN "Mfg part"
1 4000 5250
1 0 0 -1
$EndComp
$Comp
L LK201_symbols:R_US R2
U 1 1 5ECBBE28
P 4800 5250
F 0 "R2" H 4868 5296 50 0000 L CNN
F 1 "3.3k" H 4868 5205 50 0000 L CNN
F 2 "lk201_parts:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal" V 4840 5240 50 0001 C CNN
F 3 "~" H 4800 5250 50 0001 C CNN
F 4 "CF14JT3K30TR-ND" H 4800 5250 50 0001 C CNN "Digikey"
F 5 "Stackpole" H 4800 5250 50 0001 C CNN "Mfg"
F 6 "CF14JT3K30" H 4800 5250 50 0001 C CNN "Mfg part"
1 4800 5250
1 0 0 -1
$EndComp
Wire Wire Line
4000 5400 4000 5700
Wire Wire Line
4000 5700 4200 5700
Wire Wire Line
4800 5400 4800 5700
Wire Wire Line
4800 5700 4600 5700
Wire Wire Line
5200 5300 5200 5700
Wire Wire Line
5200 5700 4800 5700
Connection ~ 4800 5700
Wire Wire Line
4800 5100 4800 4950
Wire Wire Line
5200 5200 5200 4950
Wire Wire Line
5200 4950 4800 4950
Connection ~ 4800 4950
Wire Wire Line
4800 4950 4800 4750
Wire Wire Line
4400 6000 4400 6200
Wire Wire Line
4400 6200 4050 6200
Text Label 4800 4800 0 50 ~ 0
V12
Text Label 4150 6200 0 50 ~ 0
V3_3
$EndSCHEMATC
@@ -0,0 +1,3 @@
(sym_lib_table
(lib (name LK201_symbols)(type Legacy)(uri ${KIPRJMOD}/../LK201_symbols.lib)(options "")(descr ""))
)
@@ -0,0 +1,231 @@
(module LK201:AK_Design_9mm (layer F.Cu) (tedit 5EC6EF5E) (tstamp 5EC6F4BB)
(at 33.655 -33.655)
(fp_text reference REF** (at 0 0.5) (layer F.SilkS) hide
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value AK_Design_9mm (at 0 -0.5) (layer F.Fab) hide
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start 0.573643 -0.644323) (end 0.573643 -0.006628) (layer F.SilkS) (width 0.099998))
(fp_line (start 0.272843 -0.644323) (end 0.573643 -0.644323) (layer F.SilkS) (width 0.099998))
(fp_line (start 6.536863 -0.042724) (end 6.874042 -0.042724) (layer F.SilkS) (width 0.099998))
(fp_line (start 5.708314 -0.042724) (end 5.539724 -0.211314) (layer F.SilkS) (width 0.099998))
(fp_line (start 6.045541 -0.042724) (end 5.708314 -0.042724) (layer F.SilkS) (width 0.099998))
(fp_line (start 6.214131 -0.211314) (end 6.045541 -0.042724) (layer F.SilkS) (width 0.099998))
(fp_line (start 6.214131 -0.379904) (end 6.214131 -0.211314) (layer F.SilkS) (width 0.099998))
(fp_line (start 6.045541 -0.548494) (end 6.214131 -0.379904) (layer F.SilkS) (width 0.099998))
(fp_line (start 5.708314 -0.548494) (end 6.045541 -0.548494) (layer F.SilkS) (width 0.099998))
(fp_line (start 5.539724 -0.717084) (end 5.708314 -0.548494) (layer F.SilkS) (width 0.099998))
(fp_line (start 5.539724 -0.885674) (end 5.539724 -0.717084) (layer F.SilkS) (width 0.099998))
(fp_line (start 5.216992 -1.054263) (end 4.542633 -1.054263) (layer F.SilkS) (width 0.099998))
(fp_line (start 4.051311 -1.054263) (end 3.545542 -1.054263) (layer F.SilkS) (width 0.099998))
(fp_line (start 4.219901 -0.885674) (end 4.051311 -1.054263) (layer F.SilkS) (width 0.099998))
(fp_line (start 4.219901 -0.211314) (end 4.219901 -0.885674) (layer F.SilkS) (width 0.099998))
(fp_line (start 4.051311 -0.042724) (end 4.219901 -0.211314) (layer F.SilkS) (width 0.099998))
(fp_line (start 3.545542 -0.042724) (end 4.051311 -0.042724) (layer F.SilkS) (width 0.099998))
(fp_line (start 3.545542 -1.054263) (end 3.545542 -0.042724) (layer F.SilkS) (width 0.099998))
(fp_line (start 0.934602 -2.59952) (end 0.934602 -2.6296) (layer F.SilkS) (width 0.099998))
(fp_line (start 0.934602 -0.957155) (end 0.934602 -2.59952) (layer F.SilkS) (width 0.099998))
(fp_line (start 8.873056 -0.042724) (end 8.873056 -1.054263) (layer F.SilkS) (width 0.099998))
(fp_line (start 8.198697 -1.054263) (end 8.873056 -0.042724) (layer F.SilkS) (width 0.099998))
(fp_line (start 8.198697 -0.042724) (end 8.198697 -1.054263) (layer F.SilkS) (width 0.099998))
(fp_line (start 7.875965 -0.548494) (end 7.538738 -0.548494) (layer F.SilkS) (width 0.099998))
(fp_line (start 7.875965 -0.211314) (end 7.875965 -0.548494) (layer F.SilkS) (width 0.099998))
(fp_line (start 7.707328 -0.042724) (end 7.875965 -0.211314) (layer F.SilkS) (width 0.099998))
(fp_line (start 7.370148 -0.042724) (end 7.707328 -0.042724) (layer F.SilkS) (width 0.099998))
(fp_line (start 7.201558 -0.211314) (end 7.370148 -0.042724) (layer F.SilkS) (width 0.099998))
(fp_line (start 7.201558 -0.885674) (end 7.201558 -0.211314) (layer F.SilkS) (width 0.099998))
(fp_line (start 7.370148 -1.054263) (end 7.201558 -0.885674) (layer F.SilkS) (width 0.099998))
(fp_line (start 7.707328 -1.054263) (end 7.370148 -1.054263) (layer F.SilkS) (width 0.099998))
(fp_line (start 2.342344 -0.644323) (end 2.727367 -0.644323) (layer F.SilkS) (width 0.099998))
(fp_line (start 2.342344 -0.006628) (end 2.342344 -0.644323) (layer F.SilkS) (width 0.099998))
(fp_line (start 1.981384 -0.006628) (end 2.342344 -0.006628) (layer F.SilkS) (width 0.099998))
(fp_line (start 4.542633 -0.042724) (end 5.216992 -0.042724) (layer F.SilkS) (width 0.099998))
(fp_line (start 4.542633 -1.054263) (end 4.542633 -0.042724) (layer F.SilkS) (width 0.099998))
(fp_line (start 3.184582 -1.799393) (end 3.184582 -3.062751) (layer F.SilkS) (width 0.099998))
(fp_line (start 6.705452 -0.042724) (end 6.705452 -1.054263) (layer F.SilkS) (width 0.099998))
(fp_line (start 3.184582 -3.062751) (end 2.823623 -3.062751) (layer F.SilkS) (width 0.099998))
(fp_line (start 0.573643 -2.59952) (end 0.573643 -0.957155) (layer F.SilkS) (width 0.099998))
(fp_line (start 5.708314 -1.054263) (end 5.539724 -0.885674) (layer F.SilkS) (width 0.099998))
(fp_line (start 6.045541 -1.054263) (end 5.708314 -1.054263) (layer F.SilkS) (width 0.099998))
(fp_line (start 6.214131 -0.885674) (end 6.045541 -1.054263) (layer F.SilkS) (width 0.099998))
(fp_line (start 4.542633 -0.548494) (end 4.879813 -0.548494) (layer F.SilkS) (width 0.099998))
(fp_line (start 1.981384 -0.644323) (end 1.981384 -0.006628) (layer F.SilkS) (width 0.099998))
(fp_line (start 1.740745 -0.644323) (end 1.981384 -0.644323) (layer F.SilkS) (width 0.099998))
(fp_line (start 1.740745 -0.006628) (end 1.740745 -0.644323) (layer F.SilkS) (width 0.099998))
(fp_line (start 2.342344 -3.062751) (end 1.981384 -3.062751) (layer F.SilkS) (width 0.099998))
(fp_line (start 2.342344 -0.957155) (end 2.342344 -3.062751) (layer F.SilkS) (width 0.099998))
(fp_line (start 0.573643 -0.006628) (end 0.934602 -0.006628) (layer F.SilkS) (width 0.099998))
(fp_line (start 0.032204 -0.957155) (end 0.272843 -0.644323) (layer F.SilkS) (width 0.099998))
(fp_line (start 0.573643 -0.957155) (end 0.032204 -0.957155) (layer F.SilkS) (width 0.099998))
(fp_line (start 1.379785 -0.957155) (end 0.934602 -0.957155) (layer F.SilkS) (width 0.099998))
(fp_line (start 1.379785 -2.59952) (end 1.379785 -0.957155) (layer F.SilkS) (width 0.099998))
(fp_line (start 1.379785 -2.617568) (end 1.379785 -2.59952) (layer F.SilkS) (width 0.099998))
(fp_line (start 1.740745 -0.957155) (end 1.740745 -2.59952) (layer F.SilkS) (width 0.099998))
(fp_line (start 0.934602 -0.006628) (end 0.934602 -0.644323) (layer F.SilkS) (width 0.099998))
(fp_line (start 1.981384 -0.957155) (end 1.740745 -0.957155) (layer F.SilkS) (width 0.099998))
(fp_line (start 1.981384 -3.062751) (end 1.981384 -0.957155) (layer F.SilkS) (width 0.099998))
(fp_line (start 1.379785 -0.006628) (end 1.740745 -0.006628) (layer F.SilkS) (width 0.099998))
(fp_line (start 1.379785 -0.644323) (end 1.379785 -0.006628) (layer F.SilkS) (width 0.099998))
(fp_line (start 0.934602 -0.644323) (end 1.379785 -0.644323) (layer F.SilkS) (width 0.099998))
(fp_line (start 2.823623 -3.062751) (end 2.823623 -1.787362) (layer F.SilkS) (width 0.099998))
(fp_line (start 7.875965 -0.885674) (end 7.707328 -1.054263) (layer F.SilkS) (width 0.099998))
(fp_line (start 6.536863 -1.054263) (end 6.874042 -1.054263) (layer F.SilkS) (width 0.099998))
(fp_line (start 3.184582 -0.006628) (end 3.184582 -0.5601) (layer F.SilkS) (width 0.099998))
(fp_line (start 2.823623 -0.006628) (end 3.184582 -0.006628) (layer F.SilkS) (width 0.099998))
(fp_line (start 2.823623 -0.548068) (end 2.823623 -0.006628) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.272843 -0.644347) (end 0.272843 -0.659387) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.573643 -0.644347) (end 0.573643 -0.629307) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.536863 -0.042724) (end 6.536863 -0.060772) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.874042 -0.042724) (end 6.874042 -0.024676) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 5.708338 -0.042724) (end 5.695571 -0.029982) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 5.539748 -0.211314) (end 5.552514 -0.224057) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.045541 -0.042724) (end 6.045541 -0.024676) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 5.708314 -0.042724) (end 5.708314 -0.060772) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.214107 -0.211314) (end 6.226873 -0.198572) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.045517 -0.042724) (end 6.032751 -0.055467) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.214131 -0.379904) (end 6.232179 -0.379904) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.214131 -0.211314) (end 6.196083 -0.211314) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.045517 -0.548518) (end 6.058284 -0.561284) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.214107 -0.379904) (end 6.201341 -0.367162) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 5.708314 -0.548494) (end 5.708314 -0.566542) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.045541 -0.548494) (end 6.045541 -0.530446) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 5.539748 -0.717107) (end 5.552514 -0.729874) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 5.708338 -0.548518) (end 5.695571 -0.535751) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 5.539724 -0.885674) (end 5.557772 -0.885674) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 5.539724 -0.717084) (end 5.521676 -0.717084) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 5.708338 -1.054287) (end 5.721104 -1.041521) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 5.539748 -0.885697) (end 5.526982 -0.898463) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 4.542633 -1.054263) (end 4.542633 -1.072311) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 4.051311 -1.054263) (end 4.051311 -1.036215) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 3.545542 -1.054263) (end 3.545542 -1.072311) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 4.219925 -0.885697) (end 4.207159 -0.872931) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 4.051335 -1.054287) (end 4.064101 -1.067053) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 4.219901 -0.211314) (end 4.201853 -0.211314) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 4.219901 -0.885674) (end 4.237949 -0.885674) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 4.051335 -0.042724) (end 4.038569 -0.055467) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 4.219925 -0.211314) (end 4.232691 -0.198572) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 3.545542 -0.042724) (end 3.545542 -0.060772) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 4.051311 -0.042724) (end 4.051311 -0.024676) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 3.545542 -1.054263) (end 3.56359 -1.054263) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 3.545542 -0.042724) (end 3.527494 -0.042724) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.934626 -2.59952) (end 0.919586 -2.59952) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.934626 -2.6296) (end 0.949666 -2.6296) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.934626 -0.957155) (end 0.919586 -0.957155) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.934626 -2.59952) (end 0.949666 -2.59952) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.379785 -0.957155) (end 1.379785 -0.942091) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.934602 -0.957155) (end 0.934602 -0.972219) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 8.873056 -0.042724) (end 8.855008 -0.042724) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 8.873056 -1.054263) (end 8.891104 -1.054263) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 8.198697 -1.054287) (end 8.213713 -1.064306) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 8.873056 -0.042724) (end 8.85804 -0.032729) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 8.198697 -0.042724) (end 8.180649 -0.042724) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 8.198697 -1.054263) (end 8.216745 -1.054263) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.875965 -0.548494) (end 7.875965 -0.530446) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.538738 -0.548494) (end 7.538738 -0.566542) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.875965 -0.211314) (end 7.857917 -0.211314) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.875965 -0.548494) (end 7.894013 -0.548494) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.707352 -0.042724) (end 7.694585 -0.055467) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.875941 -0.211314) (end 7.888708 -0.198572) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.370148 -0.042724) (end 7.370148 -0.060772) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.707328 -0.042724) (end 7.707328 -0.024676) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.201582 -0.211314) (end 7.214348 -0.224057) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.370172 -0.042724) (end 7.357406 -0.029982) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.201558 -0.885674) (end 7.219606 -0.885674) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.201558 -0.211314) (end 7.18351 -0.211314) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.370172 -1.054287) (end 7.382938 -1.041521) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.201582 -0.885697) (end 7.188816 -0.898463) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.707328 -1.054263) (end 7.707328 -1.036215) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.370148 -1.054263) (end 7.370148 -1.072311) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.875941 -0.885697) (end 7.863175 -0.872931) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.823623 -0.548068) (end 2.808607 -0.548068) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.727365 -0.548065) (end 2.823623 -0.548068) (angle -89.99734692) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.342344 -0.644347) (end 2.342344 -0.659387) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.727367 -0.644347) (end 2.727367 -0.629307) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.342344 -0.006628) (end 2.327328 -0.006628) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.342344 -0.644323) (end 2.35736 -0.644323) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.981384 -0.006628) (end 1.981384 -0.021692) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.342344 -0.006628) (end 2.342344 0.008435) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.981384 -0.644323) (end 1.996401 -0.644323) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.981384 -0.006628) (end 1.966368 -0.006628) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.823623 -1.787361) (end 2.838639 -1.787125) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.342344 -0.957155) (end 2.33467 -0.970087) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.838671 -1.803744) (end 2.342344 -0.957155) (angle -58.29686479) (layer F.SilkS) (width 0.099998))
(fp_arc (start 5.216992 -0.042724) (end 5.216992 -0.024676) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 4.542633 -1.054263) (end 4.560681 -1.054263) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 4.542633 -0.042724) (end 4.524585 -0.042724) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 5.216992 -1.054263) (end 5.216992 -1.036215) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.740745 -2.59952) (end 1.725729 -2.59952) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.157194 -2.59952) (end 1.740745 -2.59952) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 3.184582 -1.799393) (end 3.199599 -1.800151) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.823623 -0.957155) (end 2.813817 -0.968571) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.144543 -1.746657) (end 2.823623 -0.957155) (angle -52.2027069) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.823623 -0.957155) (end 2.824334 -0.972171) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 3.184582 -0.5601) (end 3.169566 -0.56081) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.705452 -0.042724) (end 6.687404 -0.042724) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.705452 -1.054263) (end 6.7235 -1.054263) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 3.184606 -1.799393) (end 3.169566 -1.799393) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 3.184606 -3.062751) (end 3.199646 -3.062751) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.573666 -0.957155) (end 0.558627 -0.957155) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.934626 -2.59952) (end 0.919586 -2.59952) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.379809 -2.59952) (end 1.364769 -2.59952) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.157194 -2.59952) (end 1.379785 -2.59952) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.573666 -2.59952) (end 0.558627 -2.59952) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.045541 -1.054263) (end 6.045541 -1.036215) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 5.708314 -1.054263) (end 5.708314 -1.072311) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.214107 -0.885697) (end 6.201341 -0.872931) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.045517 -1.054287) (end 6.058284 -1.067053) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 4.542633 -0.548494) (end 4.542633 -0.566542) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 4.879813 -0.548494) (end 4.879813 -0.530446) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 4.542633 -0.042724) (end 4.542633 -0.060772) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.740745 -0.644347) (end 1.740745 -0.659387) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.981384 -0.644347) (end 1.981384 -0.629307) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.740745 -0.006628) (end 1.725729 -0.006628) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.740745 -0.644323) (end 1.755761 -0.644323) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.379785 -0.006628) (end 1.379785 -0.021692) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.342344 -3.062751) (end 2.342344 -3.047735) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.981384 -3.062751) (end 1.981384 -3.077768) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.342344 -0.957155) (end 2.327328 -0.957155) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.342344 -3.062751) (end 2.35736 -3.062751) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.934602 -0.006628) (end 0.934602 0.008435) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.573666 -0.644323) (end 0.588706 -0.644323) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.573666 -0.006628) (end 0.558627 -0.006628) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.032204 -0.957155) (end 0.044141 -0.966345) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.272843 -0.644323) (end 0.260906 -0.635134) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.573643 -0.957155) (end 0.573643 -0.942091) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.032204 -0.957155) (end 0.032204 -0.972219) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.573666 -2.59952) (end 0.588706 -2.59952) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.379809 -2.59952) (end 1.394849 -2.59952) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.379809 -0.957155) (end 1.364769 -0.957155) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.379809 -2.617568) (end 1.394849 -2.617568) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.379809 -2.59952) (end 1.364769 -2.59952) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.740745 -0.957155) (end 1.725729 -0.957155) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.740745 -2.59952) (end 1.755761 -2.59952) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.981384 -0.957155) (end 1.981384 -0.942091) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.934626 -0.644323) (end 0.949666 -0.644323) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.573643 -0.006628) (end 0.573643 -0.021692) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.740745 -0.957155) (end 1.740745 -0.972219) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.981384 -3.062751) (end 1.996401 -3.062751) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.981384 -0.957155) (end 1.966368 -0.957155) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.740745 -0.006628) (end 1.740745 0.008435) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.379809 -0.644323) (end 1.394849 -0.644323) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.379809 -0.006628) (end 1.364769 -0.006628) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.934602 -0.644347) (end 0.934602 -0.659387) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 1.379785 -0.644347) (end 1.379785 -0.629307) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 0.934626 -0.006628) (end 0.919586 -0.006628) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.823623 -3.062751) (end 2.838639 -3.062751) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.823623 -1.787362) (end 2.808607 -1.787362) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 3.184582 -3.062751) (end 3.184582 -3.047735) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.823623 -3.062751) (end 2.823623 -3.077768) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 7.707352 -1.054287) (end 7.720118 -1.067053) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.536863 -1.054263) (end 6.536863 -1.072311) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 6.874042 -1.054263) (end 6.874042 -1.036215) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.805566 -0.578139) (end 3.184582 -0.5601) (angle -89.99734692) (layer F.SilkS) (width 0.099998))
(fp_arc (start 3.184606 -0.006628) (end 3.169566 -0.006628) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 3.184606 -0.5601) (end 3.199646 -0.5601) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.823623 -0.006628) (end 2.823623 -0.021692) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 3.184582 -0.006628) (end 3.184582 0.008435) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.823623 -0.548068) (end 2.838639 -0.548068) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.823623 -0.006628) (end 2.808607 -0.006628) (angle -180) (layer F.SilkS) (width 0.099998))
(fp_arc (start 2.727367 -0.644347) (end 2.727367 -0.659387) (angle -180) (layer F.SilkS) (width 0.099998))
)
@@ -0,0 +1,34 @@
(module C_Rect_L4.0mm_W2.5mm_P2.54mm (layer F.Cu) (tedit 5FECF770)
(descr "C, Rect series, Radial, pin pitch=2.50mm, , length*width=4*2.5mm^2, Capacitor")
(tags "C Rect series Radial pin pitch 2.50mm length 4mm width 2.5mm Capacitor")
(fp_text reference REF** (at 1.25 -2.5) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value C_Rect_L4.0mm_W2.5mm_P2.54mm (at 1.25 2.5) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start 3.55 -1.5) (end -1.05 -1.5) (layer F.CrtYd) (width 0.05))
(fp_line (start 3.59 1.5) (end 3.59 -1.5) (layer F.CrtYd) (width 0.05))
(fp_line (start -1.05 1.5) (end 3.55 1.5) (layer F.CrtYd) (width 0.05))
(fp_line (start -1.05 -1.5) (end -1.05 1.5) (layer F.CrtYd) (width 0.05))
(fp_line (start 3.41 0.665) (end 3.41 1.37) (layer F.SilkS) (width 0.12))
(fp_line (start 3.41 -1.37) (end 3.41 -0.665) (layer F.SilkS) (width 0.12))
(fp_line (start -0.87 0.665) (end -0.87 1.37) (layer F.SilkS) (width 0.12))
(fp_line (start -0.87 -1.37) (end -0.87 -0.665) (layer F.SilkS) (width 0.12))
(fp_line (start -0.87 1.37) (end 3.41 1.37) (layer F.SilkS) (width 0.12))
(fp_line (start -0.87 -1.37) (end 3.41 -1.37) (layer F.SilkS) (width 0.12))
(fp_line (start 3.25 -1.25) (end -0.75 -1.25) (layer F.Fab) (width 0.1))
(fp_line (start 3.29 1.25) (end 3.29 -1.25) (layer F.Fab) (width 0.1))
(fp_line (start -0.75 1.25) (end 3.25 1.25) (layer F.Fab) (width 0.1))
(fp_line (start -0.75 -1.25) (end -0.75 1.25) (layer F.Fab) (width 0.1))
(fp_text user %R (at 1.25 0) (layer F.Fab)
(effects (font (size 0.8 0.8) (thickness 0.12)))
)
(pad 1 thru_hole circle (at 0 0) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask))
(pad 2 thru_hole circle (at 2.54 0) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask))
(model ${KISYS3DMOD}/Capacitor_THT.3dshapes/C_Rect_L4.0mm_W2.5mm_P2.50mm.wrl
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)
@@ -0,0 +1,60 @@
(module LK201:DIP-16_296_ELL (layer F.Cu) (tedit 5EC68F95) (tstamp 5EC425D6)
(at 29.26 -11.43 270)
(path /5EC32F48)
(fp_text reference **REF (at -3.175 0.05) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value ICL3232CPZ (at 0 0 270) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_circle (center -8.89 2) (end -8.636 2) (layer F.SilkS) (width 0.2))
(fp_line (start -9.74 5.01) (end -9.74 -5.01) (layer F.CrtYd) (width 0.05))
(fp_line (start 9.74 5.01) (end -9.74 5.01) (layer F.CrtYd) (width 0.05))
(fp_line (start 9.74 -5.01) (end 9.74 5.01) (layer F.CrtYd) (width 0.05))
(fp_line (start -9.74 -5.01) (end 9.74 -5.01) (layer F.CrtYd) (width 0.05))
(fp_line (start -9.99 1.753333) (end -9.99 5.259999) (layer F.SilkS) (width 0.12))
(fp_line (start -9.63 1.753333) (end -9.99 1.753333) (layer F.SilkS) (width 0.12))
(fp_line (start -9.63 -1.753333) (end -9.63 1.753333) (layer F.SilkS) (width 0.12))
(fp_line (start -9.99 -1.753333) (end -9.63 -1.753333) (layer F.SilkS) (width 0.12))
(fp_line (start -9.99 -5.26) (end -9.99 -1.753333) (layer F.SilkS) (width 0.12))
(fp_line (start 9.99 -5.259999) (end -9.99 -5.26) (layer F.SilkS) (width 0.12))
(fp_line (start 9.99 5.26) (end 9.99 -5.259999) (layer F.SilkS) (width 0.12))
(fp_line (start -9.99 5.259999) (end 9.99 5.26) (layer F.SilkS) (width 0.12))
(pad 8 thru_hole oval (at 8.89 3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 14 "Net-(U3-Pad8)"))
(pad 9 thru_hole oval (at 8.89 -3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 15 "Net-(U3-Pad9)"))
(pad 7 thru_hole oval (at 6.35 3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 16 "Net-(U3-Pad7)"))
(pad 10 thru_hole oval (at 6.35 -3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 1 GND))
(pad 6 thru_hole oval (at 3.81 3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 20 "Net-(C5-Pad2)"))
(pad 11 thru_hole oval (at 3.81 -3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 12 "Net-(U2-Pad3)"))
(pad 5 thru_hole oval (at 1.27 3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 3 "Net-(C4-Pad2)"))
(pad 12 thru_hole oval (at 1.27 -3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 11 "Net-(U2-Pad4)"))
(pad 4 thru_hole oval (at -1.27 3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 19 "Net-(C4-Pad1)"))
(pad 13 thru_hole oval (at -1.27 -3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 5 "Net-(J1-Pad4)"))
(pad 3 thru_hole oval (at -3.81 3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 2 "Net-(C3-Pad2)"))
(pad 14 thru_hole oval (at -3.81 -3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 7 "Net-(J1-Pad1)"))
(pad 2 thru_hole oval (at -6.35 3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 21 "Net-(C6-Pad2)"))
(pad 15 thru_hole oval (at -6.35 -3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 1 GND))
(pad 1 thru_hole oval (at -8.89 3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 18 "Net-(C3-Pad1)"))
(pad 16 thru_hole oval (at -8.89 -3.76 270) (size 1.2 2) (drill 0.8) (layers *.Cu *.Mask)
(net 4 /V3_3))
(model ${KISYS3DMOD}/Package_DIP.3dshapes/DIP-16_W7.62mm.step
(offset (xyz 8.890000000000001 3.81 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 90))
)
)
@@ -0,0 +1,150 @@
(module Itsy (layer F.Cu) (tedit 5FEF9B3B)
(fp_text reference REF** (at 16.51 -5.08) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value Itsy (at 16.51 -8.89) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -1.02 -4.6756) (end -1.02 1.1664) (layer F.SilkS) (width 0.2))
(fp_line (start -1.02 1.1664) (end 34.54 1.1664) (layer F.SilkS) (width 0.2))
(fp_line (start 34.54 1.1664) (end 34.54 -16.6136) (layer F.SilkS) (width 0.2))
(fp_line (start 34.54 -16.6136) (end -1.02 -16.6136) (layer F.SilkS) (width 0.2))
(fp_line (start -1.02 -16.6136) (end -1.02 -10.7716) (layer F.SilkS) (width 0.2))
(fp_line (start -1.02 -10.7716) (end -0.512 -10.2636) (layer F.SilkS) (width 0.2))
(fp_line (start -0.512 -10.2636) (end -0.512 -5.1836) (layer F.SilkS) (width 0.2))
(fp_line (start -0.512 -5.1836) (end -1.02 -4.6756) (layer F.SilkS) (width 0.2))
(fp_text user G (at 7.681816 -1 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user Aref (at 5.154544 -1 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user 5V (at 2.627272 -1 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user RST (at 0.1 -1 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user A0 (at 10.209088 -1 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user A1 (at 12.73636 -1 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user A2 (at 15.263632 -1 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user A3 (at 17.790904 -1 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user A4 (at 20.318176 -1 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user A5 (at 22.845448 -1 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user SCLK (at 25.37272 -1 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user MO (at 27.9 -1 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user MI (at 30.1 -1 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user En (at 31.3 -2.2 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user G (at 31.3 -4.4 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user 8 (at 31.3 -6.998414 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user 6 (at 31.3 -9.549207 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user 4 (at 31.3 -12.1 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify left))
)
(fp_text user G (at 2.5 -13.4) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user USB (at 5.1 -13.4) (layer F.SilkS)
(effects (font (size 1 0.8) (thickness 0.15)))
)
(fp_text user 13 (at 7.6 -13.4) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user 12 (at 10.2 -13.4) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user 11 (at 12.7 -13.4) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user 10 (at 15.2 -13.4) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user 9 (at 17.8 -13.4) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user 7 (at 20.3 -13.4) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user 5 (at 22.9 -13.4) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user SCL (at 25.4 -13.4) (layer F.SilkS)
(effects (font (size 1 0.8) (thickness 0.15)))
)
(fp_text user SDA (at 27.9 -13.4) (layer F.SilkS)
(effects (font (size 1 0.8) (thickness 0.15)))
)
(fp_text user TX (at 30.2 -13.4) (layer F.SilkS)
(effects (font (size 1 0.8) (thickness 0.15)))
)
(fp_text user BAT (at 0.1 -13.4) (layer F.SilkS)
(effects (font (size 1 0.8) (thickness 0.15)))
)
(fp_text user RX (at 31.9 -14 45) (layer F.SilkS)
(effects (font (size 0.8 0.8) (thickness 0.15)))
)
(pad 33 thru_hole circle (at 0 -15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 32 thru_hole circle (at 2.54 -15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 31 thru_hole circle (at 5.08 -15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 30 thru_hole circle (at 7.62 -15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 29 thru_hole circle (at 10.16 -15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 28 thru_hole circle (at 12.7 -15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 27 thru_hole circle (at 15.24 -15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 26 thru_hole circle (at 17.78 -15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 25 thru_hole circle (at 20.32 -15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 24 thru_hole circle (at 22.86 -15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 23 thru_hole circle (at 25.4 -15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 22 thru_hole circle (at 27.94 -15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 21 thru_hole circle (at 30.48 -15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 20 thru_hole circle (at 33.02 -15.24) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 19 thru_hole circle (at 33.02 -12.7) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 18 thru_hole circle (at 33.02 -10.16) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 17 thru_hole circle (at 33.02 -7.62) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 16 thru_hole circle (at 33.02 -5.08) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 15 thru_hole circle (at 33.02 -2.54) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 14 thru_hole circle (at 33.02 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 13 thru_hole circle (at 30.48 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 12 thru_hole circle (at 27.94 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 11 thru_hole circle (at 25.4 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 10 thru_hole circle (at 22.86 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 9 thru_hole circle (at 20.32 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 8 thru_hole circle (at 17.78 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 7 thru_hole circle (at 15.24 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 6 thru_hole circle (at 12.7 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 5 thru_hole circle (at 10.16 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 4 thru_hole circle (at 7.62 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 3 thru_hole circle (at 5.08 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 2 thru_hole circle (at 2.54 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(pad 1 thru_hole circle (at 0 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask))
(model :USER3DMOD:Itsy.step
(offset (xyz -132.1 112.6 2.5))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,26 @@
(module MDJ-006 (layer F.Cu) (tedit 603C0CA2)
(fp_text reference REF** (at 0.3 -2.6) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value MDJ-006 (at 0 -1.1) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -7 0) (end 7 0) (layer F.SilkS) (width 0.12))
(fp_line (start 7 0) (end 7.1 -13) (layer F.SilkS) (width 0.12))
(fp_line (start 7.1 -13) (end -7 -13) (layer F.SilkS) (width 0.12))
(fp_line (start -7 -13) (end -7 0) (layer F.SilkS) (width 0.12))
(pad SH thru_hole circle (at 0 -4.7) (size 3.2 3.2) (drill 2.2) (layers *.Cu *.Mask))
(pad SH thru_hole circle (at 6.75 -5.5) (size 3.2 3.2) (drill 2.2) (layers *.Cu *.Mask))
(pad SH thru_hole circle (at -6.75 -5.5) (size 3.2 3.2) (drill 2.2) (layers *.Cu *.Mask))
(pad 1 thru_hole circle (at 1.3 -8.5) (size 1.4 1.4) (drill 0.9) (layers *.Cu *.Mask))
(pad 2 thru_hole circle (at -1.3 -8.5) (size 1.4 1.4) (drill 0.9) (layers *.Cu *.Mask))
(pad 4 thru_hole circle (at -3.4 -8.5) (size 1.4 1.4) (drill 0.9) (layers *.Cu *.Mask))
(pad 3 thru_hole circle (at 3.4 -8.5) (size 1.4 1.4) (drill 0.9) (layers *.Cu *.Mask))
(pad 5 thru_hole circle (at 3.4 -11) (size 1.4 1.4) (drill 0.9) (layers *.Cu *.Mask))
(pad 6 thru_hole circle (at -3.4 -11) (size 1.4 1.4) (drill 0.9) (layers *.Cu *.Mask))
(model ${KIPRJMOD}/../lk201_parts/MDJ-00x.step
(offset (xyz -7 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,18 @@
(module Mounting_Holes:MountingHole_2.2mm_M2 (layer F.Cu) (tedit 56D1B4CB) (tstamp 5EC6E9C6)
(at 2.54 -2.54)
(descr "Mounting Hole 2.2mm, no annular, M2")
(tags "mounting hole 2.2mm no annular m2")
(attr virtual)
(fp_text reference REF** (at 0 -4.2) (layer F.SilkS) hide
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value MountingHole_2.2mm_M2 (at 0 4.2) (layer F.Fab) hide
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_circle (center 0 0) (end 2.2 0) (layer Cmts.User) (width 0.15))
(fp_circle (center 0 0) (end 2.45 0) (layer F.CrtYd) (width 0.05))
(fp_text user %R (at 0.3 0) (layer F.Fab) hide
(effects (font (size 1 1) (thickness 0.15)))
)
(pad 1 np_thru_hole circle (at 0 0) (size 2.2 2.2) (drill 2.2) (layers *.Cu *.Mask))
)
@@ -0,0 +1,20 @@
(module LK201:PS1420_buzzer (layer F.Cu) (tedit 5EC6900F) (tstamp 5EC41E39)
(at 26.035 -30.48 180)
(path /5EC38E19)
(fp_text reference **REF (at 0 1.905 180) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value PS1420 (at 0 -1.905 180) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_circle (center 0 0) (end 7 0) (layer F.SilkS) (width 0.12))
(pad 2 thru_hole circle (at -2.5 0 180) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask)
(net 22 "Net-(LS1-Pad2)"))
(pad 1 thru_hole circle (at 2.5 0 180) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask)
(net 6 /V12))
(model ${KISYS3DMOD}/Buzzer_Beeper.3dshapes/Buzzer_15x7.5RM7.6.step
(offset (xyz -3.6 0 0))
(scale (xyz 0.93 0.93 1.1))
(rotate (xyz 0 0 0))
)
)
@@ -0,0 +1,23 @@
(module RJ22 (layer F.Cu) (tedit 5FEF9014)
(fp_text reference **REF (at 0 2.54) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value RJ22 (at 0 -0.5) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -5.6 7.85) (end 5.6 7.85) (layer F.SilkS) (width 0.12))
(fp_line (start 5.6 7.85) (end 5.6 -10.15) (layer F.SilkS) (width 0.12))
(fp_line (start 5.6 -10.15) (end -5.6 -10.15) (layer F.SilkS) (width 0.12))
(fp_line (start -5.6 7.85) (end -5.6 -10.15) (layer F.SilkS) (width 0.12))
(pad "" np_thru_hole circle (at -3.81 0) (size 3.2 3.2) (drill 3.2) (layers *.Mask F.Cu))
(pad "" np_thru_hole circle (at 3.81 0) (size 3.2 3.2) (drill 3.2) (layers *.Mask F.Cu))
(pad 4 thru_hole circle (at 1.905 -8.89) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask))
(pad 3 thru_hole circle (at 0.635 -6.35) (size 1.524 1.524) (drill 0.762) (layers *.Cu *.Mask))
(pad 2 thru_hole circle (at -0.635 -8.89) (size 1.524 1.524) (drill 0.9) (layers *.Cu *.Mask))
(pad 1 thru_hole rect (at -1.905 -6.35) (size 1.524 1.524) (drill 0.9) (layers *.Cu *.Mask))
(model ${KIPRJMOD}/../lk201_parts/modular_jack_a-20040.step
(offset (xyz 0 -10.5 1.2))
(scale (xyz 1 1 1))
(rotate (xyz 90 180 180))
)
)
@@ -0,0 +1,36 @@
(module R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal (layer F.Cu) (tedit 5AE5139B)
(descr "Resistor, Axial_DIN0207 series, Axial, Horizontal, pin pitch=7.62mm, 0.25W = 1/4W, length*diameter=6.3*2.5mm^2, http://cdn-reichelt.de/documents/datenblatt/B400/1_4W%23YAG.pdf")
(tags "Resistor Axial_DIN0207 series Axial Horizontal pin pitch 7.62mm 0.25W = 1/4W length 6.3mm diameter 2.5mm")
(fp_text reference REF** (at 3.81 -2.37) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal (at 3.81 2.37) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start 0.66 -1.25) (end 0.66 1.25) (layer F.Fab) (width 0.1))
(fp_line (start 0.66 1.25) (end 6.96 1.25) (layer F.Fab) (width 0.1))
(fp_line (start 6.96 1.25) (end 6.96 -1.25) (layer F.Fab) (width 0.1))
(fp_line (start 6.96 -1.25) (end 0.66 -1.25) (layer F.Fab) (width 0.1))
(fp_line (start 0 0) (end 0.66 0) (layer F.Fab) (width 0.1))
(fp_line (start 7.62 0) (end 6.96 0) (layer F.Fab) (width 0.1))
(fp_line (start 0.54 -1.04) (end 0.54 -1.37) (layer F.SilkS) (width 0.12))
(fp_line (start 0.54 -1.37) (end 7.08 -1.37) (layer F.SilkS) (width 0.12))
(fp_line (start 7.08 -1.37) (end 7.08 -1.04) (layer F.SilkS) (width 0.12))
(fp_line (start 0.54 1.04) (end 0.54 1.37) (layer F.SilkS) (width 0.12))
(fp_line (start 0.54 1.37) (end 7.08 1.37) (layer F.SilkS) (width 0.12))
(fp_line (start 7.08 1.37) (end 7.08 1.04) (layer F.SilkS) (width 0.12))
(fp_line (start -1.05 -1.5) (end -1.05 1.5) (layer F.CrtYd) (width 0.05))
(fp_line (start -1.05 1.5) (end 8.67 1.5) (layer F.CrtYd) (width 0.05))
(fp_line (start 8.67 1.5) (end 8.67 -1.5) (layer F.CrtYd) (width 0.05))
(fp_line (start 8.67 -1.5) (end -1.05 -1.5) (layer F.CrtYd) (width 0.05))
(pad 1 thru_hole circle (at 0 0) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask))
(pad 2 thru_hole oval (at 7.62 0) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask))
(fp_text user %R (at 3.81 0) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(model ${KISYS3DMOD}/Resistor_THT.3dshapes/R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal.wrl
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)
@@ -0,0 +1,36 @@
(module LK201:TO-92_Inline_Narrow_Oval (layer F.Cu) (tedit 5EC9668E) (tstamp 5ECABDBB)
(at 36.195 -27.94 90)
(descr "TO-92 leads in-line, narrow, oval pads, drill 0.6mm (see NXP sot054_po.pdf)")
(tags "to-92 sc-43 sc-43a sot54 PA33 transistor")
(path /5ECB9074)
(fp_text reference **REF (at -1.905 -1.905 90) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value 2N3904 (at 1.27 2.79 90) (layer F.Fab) hide
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -0.53 1.85) (end 3.07 1.85) (layer F.SilkS) (width 0.12))
(fp_line (start -0.5 1.75) (end 3 1.75) (layer F.Fab) (width 0.1))
(fp_line (start -1.46 -2.73) (end 4 -2.73) (layer F.CrtYd) (width 0.05))
(fp_line (start -1.46 -2.73) (end -1.46 2.01) (layer F.CrtYd) (width 0.05))
(fp_line (start 4 2.01) (end 4 -2.73) (layer F.CrtYd) (width 0.05))
(fp_line (start 4 2.01) (end -1.46 2.01) (layer F.CrtYd) (width 0.05))
(fp_text user %R (at 1.27 -3.56 90) (layer F.Fab) hide
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_arc (start 1.27 0) (end 1.27 -2.48) (angle 135) (layer F.Fab) (width 0.1))
(fp_arc (start 1.27 0) (end 1.27 -2.6) (angle -135) (layer F.SilkS) (width 0.12))
(fp_arc (start 1.27 0) (end 1.27 -2.48) (angle -135) (layer F.Fab) (width 0.1))
(fp_arc (start 1.27 0) (end 1.27 -2.6) (angle 135) (layer F.SilkS) (width 0.12))
(pad 2 thru_hole oval (at 1.27 0 270) (size 0.9 1.5) (drill 0.6) (layers *.Cu *.Mask)
(net 4 /V3_3))
(pad 3 thru_hole oval (at 2.54 0 270) (size 0.9 1.5) (drill 0.6) (layers *.Cu *.Mask)
(net 22 "Net-(LS1-Pad2)"))
(pad 1 thru_hole rect (at 0 0 270) (size 0.9 1.5) (drill 0.6) (layers *.Cu *.Mask)
(net 24 "Net-(Q1-Pad1)"))
(model ${KISYS3DMOD}/Package_TO_SOT_THT.3dshapes/TO-92L_Inline.step
(offset (xyz 0 0 -1.5))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,72 @@
(module Trinket_M0 (layer F.Cu) (tedit 5FEF8FE0)
(fp_text reference **REF (at 0 6.985) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value "Trinket M0" (at 0 -0.5) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -7.62 11.43) (end -7.62 -11.684) (layer F.SilkS) (width 0.12))
(fp_line (start -7.62 -11.684) (end -6.858 -12.446) (layer F.SilkS) (width 0.12))
(fp_line (start -6.858 -12.446) (end -3.556 -12.446) (layer F.SilkS) (width 0.12))
(fp_line (start -3.556 -12.446) (end -2.032 -13.97) (layer F.SilkS) (width 0.12))
(fp_line (start -2.032 -13.97) (end 5.08 -13.97) (layer F.SilkS) (width 0.12))
(fp_line (start 5.08 -13.97) (end 6.858 -12.192) (layer F.SilkS) (width 0.12))
(fp_line (start 6.858 -12.192) (end 7.62 -12.192) (layer F.SilkS) (width 0.12))
(fp_line (start 7.62 -12.192) (end 7.62 11.43) (layer F.SilkS) (width 0.12))
(fp_line (start -6.35 12.7) (end -2.794 12.7) (layer F.SilkS) (width 0.12))
(fp_line (start -2.794 12.7) (end -2.412 12.319) (layer F.SilkS) (width 0.12))
(fp_line (start -2.413 12.319) (end 2.413 12.319) (layer F.SilkS) (width 0.12))
(fp_line (start 2.413 12.319) (end 2.794 12.7) (layer F.SilkS) (width 0.12))
(fp_line (start 2.794 12.7) (end 6.35 12.7) (layer F.SilkS) (width 0.12))
(fp_text user USB (at -3.175 3.81) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user 0 (at -4.445 1.27) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user 1 (at -4.445 -1.27) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user 2 (at -4.445 -3.81) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user 3V (at -3.81 -6.35) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user Rst (at 3.81 -6.35) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user 3 (at 4.445 -3.81) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user 4 (at 4.445 -1.27) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user Gnd (at 3.81 1.27) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user Bat (at 3.81 3.81) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_arc (start 6.35 11.43) (end 6.35 12.7) (angle -90) (layer F.SilkS) (width 0.12))
(fp_arc (start -6.35 11.43) (end -7.62 11.43) (angle -90) (layer F.SilkS) (width 0.12))
(pad 10 thru_hole circle (at -6.35 3.81) (size 1.93 1.93) (drill 1) (layers *.Cu *.Mask))
(pad 9 thru_hole circle (at -6.35 1.27) (size 1.93 1.93) (drill 1) (layers *.Cu *.Mask))
(pad 8 thru_hole circle (at -6.35 -1.27) (size 1.93 1.93) (drill 1) (layers *.Cu *.Mask))
(pad 7 thru_hole circle (at -6.35 -3.81) (size 1.93 1.93) (drill 1) (layers *.Cu *.Mask))
(pad 6 thru_hole circle (at -6.35 -6.35) (size 1.93 1.93) (drill 1) (layers *.Cu *.Mask))
(pad 5 thru_hole circle (at 6.35 -6.35) (size 1.93 1.93) (drill 1) (layers *.Cu *.Mask))
(pad 4 thru_hole circle (at 6.35 -3.81) (size 1.93 1.93) (drill 1) (layers *.Cu *.Mask))
(pad 3 thru_hole circle (at 6.35 -1.27) (size 1.93 1.93) (drill 1) (layers *.Cu *.Mask))
(pad 2 thru_hole circle (at 6.35 1.27) (size 1.93 1.93) (drill 1) (layers *.Cu *.Mask))
(pad 1 thru_hole circle (at 6.35 3.81) (size 1.93 1.93) (drill 1) (layers *.Cu *.Mask))
(pad "" np_thru_hole circle (at -5.715 -10.16) (size 2.2 2.2) (drill 2.2) (layers *.Mask F.Cu))
(pad "" np_thru_hole circle (at 5.715 -10.16) (size 2.2 2.2) (drill 2.2) (layers *.Mask F.Cu))
(pad "" np_thru_hole circle (at 6.096 6.223) (size 2.2 2.2) (drill 2.2) (layers *.Mask F.Cu))
(pad "" np_thru_hole circle (at -6.096 6.223) (size 2.2 2.2) (drill 2.2) (layers *.Mask F.Cu))
(model ${KIPRJMOD}/../lk201_parts/Trinket.step
(offset (xyz 0 0 4))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 180))
)
)
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,3 @@
(fp_lib_table
(lib (name lk201_parts)(type KiCad)(uri ${KIPRJMOD}/../lk201_parts)(options "")(descr "Footprints for LK201 project"))
)
@@ -0,0 +1,259 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# LK201_symbols_Audio_piezo_transducer
#
DEF LK201_symbols_Audio_piezo_transducer LS 0 0 Y N 1 F N
F0 "LS" 25 225 50 H V R CNN
F1 "LK201_symbols_Audio_piezo_transducer" 25 150 50 H V R CNN
F2 "" -35 -50 50 H I C CNN
F3 "" -35 -50 50 H I C CNN
F4 "​445-2526-1-ND" 0 0 50 H I C CNN "Digikey"
F5 "TDK Corporation" 0 0 50 H I C CNN "Mfg"
F6 "PS1420P02CT" 0 0 50 H I C CNN "Mfg part"
ALIAS Speaker_Ultrasound
DRAW
S -100 50 45 -150 0 0 10 N
S -80 -25 25 -75 0 0 10 N
P 2 0 0 0 -65 -90 15 -90 N
P 2 0 0 0 -65 -10 15 -10 N
P 2 0 0 0 -25 -90 -25 -120 N
P 2 0 0 0 -25 -10 -25 20 N
P 4 0 0 10 45 50 145 150 145 -250 45 -150 N
X 1 1 -200 0 100 R 50 50 1 1 I
X 2 2 -200 -100 100 R 50 50 1 1 I
ENDDRAW
ENDDEF
#
# LK201_symbols_C
#
DEF LK201_symbols_C C 0 10 N Y 1 F N
F0 "C" 25 100 50 H V L CNN
F1 "LK201_symbols_C" 25 -100 50 H V L CNN
F2 "" 38 -150 50 H I C CNN
F3 "" 0 0 50 H I C CNN
F4 "399-14010-1-ND​" 0 0 50 H I C CNN "Digikey"
F5 "Kemet" 0 0 50 H I C CNN "Mfg"
F6 "C315C104M5U5TA7301" 0 0 50 H I C CNN "Mfg part"
$FPLIST
C_*
$ENDFPLIST
DRAW
P 2 0 1 20 -80 -30 80 -30 N
P 2 0 1 20 -80 30 80 30 N
X ~ 1 0 150 110 D 50 50 1 1 P
X ~ 2 0 -150 110 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# LK201_symbols_ICL3232
#
DEF LK201_symbols_ICL3232 U 0 40 Y Y 1 F N
F0 "U" -100 1125 50 H V R CNN
F1 "LK201_symbols_ICL3232" -100 1050 50 H V R CNN
F2 "" 50 -1050 50 H I L CNN
F3 "" 0 100 50 H I C CNN
F4 "ICL3232CPZ-ND​" 0 0 50 H I C CNN "Digikey"
F5 "Renesas" 0 0 50 H I C CNN "Mfg"
F6 "ICL3232CPZ" 0 0 50 H I C CNN "Mfg part"
ALIAS MAX232I MAX202 ADM232A MAX3232
$FPLIST
SOIC*P1.27mm*
DIP*W7.62mm*
TSSOP*4.4x5mm*P0.65mm*
$ENDFPLIST
DRAW
C -100 -700 25 0 1 10 N
C -100 -500 25 0 1 10 N
C 25 -300 25 0 1 10 N
C 25 -100 25 0 1 10 N
T 0 -450 -900 50 0 0 0 LOGIC Normal 0 C C
T 0 450 -900 50 0 0 0 RS232 Normal 0 C C
S -600 -1000 600 1000 0 1 10 f
P 2 0 1 10 -150 -300 -325 -300 N
P 2 0 1 10 -150 -100 -325 -100 N
P 2 0 1 10 -125 -700 -325 -700 N
P 2 0 1 10 -125 -500 -325 -500 N
P 2 0 1 10 50 -300 250 -300 N
P 2 0 1 10 50 -100 250 -100 N
P 2 0 1 10 75 -700 250 -700 N
P 2 0 1 10 75 -500 250 -500 N
P 4 0 1 10 -150 -225 -150 -375 0 -300 -150 -225 N
P 4 0 1 10 -150 -25 -150 -175 0 -100 -150 -25 N
P 4 0 1 10 75 -625 75 -775 -75 -700 75 -625 N
P 4 0 1 10 75 -425 75 -575 -75 -500 75 -425 N
X C1+ 1 -800 900 200 R 50 50 1 1 P
X T2IN 10 -800 -300 200 R 50 50 1 1 I
X T1IN 11 -800 -100 200 R 50 50 1 1 I
X R1OUT 12 -800 -500 200 R 50 50 1 1 O
X R1IN 13 800 -500 200 L 50 50 1 1 I
X T1OUT 14 800 -100 200 L 50 50 1 1 O
X GND 15 0 -1200 200 U 50 50 1 1 W
X VCC 16 0 1200 200 D 50 50 1 1 W
X VS+ 2 800 400 200 L 50 50 1 1 w
X C1- 3 -800 600 200 R 50 50 1 1 P
X C2+ 4 800 900 200 L 50 50 1 1 P
X C2- 5 800 600 200 L 50 50 1 1 P
X VS- 6 800 100 200 L 50 50 1 1 w
X T2OUT 7 800 -300 200 L 50 50 1 1 O
X R2IN 8 800 -700 200 L 50 50 1 1 I
X R2OUT 9 -800 -700 200 R 50 50 1 1 O
ENDDRAW
ENDDEF
#
# LK201_symbols_Itsy_Bitsy_5V
#
DEF LK201_symbols_Itsy_Bitsy_5V U 0 20 Y Y 1 F N
F0 "U" -500 550 50 H V L BNN
F1 "LK201_symbols_Itsy_Bitsy_5V" 350 -1800 50 H V L TNN
F2 "lk201_parts:Itsy" 0 -1350 50 H I C CIN
F3 "" 0 0 50 H I C CNN
F4 "1528-2501-ND" -50 -650 50 H I C CNN "Digikey"
F5 "Adafruit" -150 -350 50 H I C CNN "Mfg"
F6 "3677" -200 -450 50 H I C CNN "Mfg part"
$FPLIST
Itsy
$ENDFPLIST
DRAW
S -500 -1750 500 500 0 1 10 f
X ~RST 1 -600 -1250 100 R 50 50 1 1 I
X A5 10 -600 -500 100 R 50 50 1 1 I
X SCK 11 -600 -800 100 R 50 50 1 1 U
X MO 12 -600 -900 100 R 50 50 1 1 U
X MI 13 -600 -1000 100 R 50 50 1 1 U
X UCAP 14 600 -1550 100 L 50 50 1 1 N
X GND 16 0 -1850 100 U 50 50 1 1 P
X D8 17 600 -600 100 L 50 50 1 1 U
X D6 18 600 -400 100 L 50 50 1 1 U
X D4 19 600 -200 100 L 50 50 1 1 U
X V5_OUT 2 600 -1450 100 L 50 50 1 1 w
X SER_RX 20 600 200 100 L 50 50 1 1 I
X SER_TX 21 600 100 100 L 50 50 1 1 O
X D2 22 600 0 100 L 50 50 1 1 U
X D3 23 600 -100 100 L 50 50 1 1 U
X D5 24 600 -300 100 L 50 50 1 1 U
X D7 25 600 -500 100 L 50 50 1 1 U
X D9 26 600 -700 100 L 50 50 1 1 U
X D10 27 600 -800 100 L 50 50 1 1 U
X D11 28 600 -900 100 L 50 50 1 1 U
X D12 29 600 -1000 100 L 50 50 1 1 U
X AREF 3 -600 300 100 R 50 50 1 1 I
X D13 30 600 -1100 100 L 50 50 1 1 U
X USB 31 100 600 100 D 50 50 1 1 W
X GND 32 200 -1850 100 U 50 50 1 1 P
X VBAT 33 -100 600 100 D 50 50 1 1 W
X GND 4 -200 -1850 100 U 50 50 1 1 P
X A0 5 -600 0 100 R 50 50 1 1 I
X A1 6 -600 -100 100 R 50 50 1 1 I
X A2 7 -600 -200 100 R 50 50 1 1 I
X A3 8 -600 -300 100 R 50 50 1 1 I
X A4 9 -600 -400 100 R 50 50 1 1 I
ENDDRAW
ENDDEF
#
# LK201_symbols_Mini-DIN-6
#
DEF LK201_symbols_Mini-DIN-6 J 0 40 Y Y 1 F N
F0 "J" 0 250 50 H V C CNN
F1 "LK201_symbols_Mini-DIN-6" 250 -250 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
MINI?DIN*
$ENDFPLIST
DRAW
A 0 0 200 -1269 -531 0 1 10 N -120 -160 120 -160
A 2 4 200 1021 -1488 0 1 10 N -40 200 -170 -100
A 2 5 198 -320 790 0 1 10 N 170 -100 40 200
C -130 0 20 0 1 0 N
C -80 -100 20 0 1 0 N
C -80 100 20 0 1 0 N
C 80 -100 20 0 1 0 N
C 90 100 20 0 1 0 N
C 130 0 20 0 1 0 N
S -30 100 30 0 0 1 0 F
P 2 0 1 0 -150 0 -200 0 N
P 2 0 1 0 -100 100 -200 100 N
P 2 0 1 0 110 100 200 100 N
P 2 0 1 0 200 0 150 0 N
P 3 0 1 10 -170 -100 -120 -100 -120 -160 N
P 3 0 1 10 170 -100 120 -100 120 -160 N
P 4 0 1 0 -80 -120 -80 -140 -200 -140 -200 -100 N
P 4 0 1 10 -40 200 -40 160 40 160 40 200 N
P 4 0 1 0 80 -120 80 -140 200 -140 200 -100 N
X ~ 1 300 -100 100 L 50 50 1 1 P
X ~ 2 -300 -100 100 R 50 50 1 1 P
X ~ 3 300 0 100 L 50 50 1 1 P
X ~ 4 -300 0 100 R 50 50 1 1 P
X ~ 5 300 100 100 L 50 50 1 1 P
X ~ 6 -300 100 100 R 50 50 1 1 P
X ~ SH 0 -300 100 U 50 50 1 1 W
ENDDRAW
ENDDEF
#
# LK201_symbols_RJ22
#
DEF LK201_symbols_RJ22 J 0 40 Y Y 1 F N
F0 "J" -200 350 50 H V R CNN
F1 "LK201_symbols_RJ22" 100 350 50 H V L CNN
F2 "" 0 50 50 V I C CNN
F3 "" 0 50 50 V I C CNN
F4 "​AE10381-ND" 0 0 50 H I C CNN "Digikey"
F5 "Assmann WSW" 0 0 50 H I C CNN "Mfg"
F6 "A-2004-3-4-LP-N-R␍" 0 0 50 H I C CNN "Mfg part"
ALIAS RJ9 RJ10
$FPLIST
4P4C*
RJ9*
RJ10*
RJ22*
$ENDFPLIST
DRAW
S 300 300 -300 -200 0 1 10 f
P 3 0 1 0 -250 -25 -200 -25 -200 -25 N
P 3 0 1 0 -250 25 -200 25 -200 25 N
P 3 0 1 0 -250 75 -200 75 -200 75 N
P 3 0 1 0 -250 125 -200 125 -200 125 N
P 15 0 1 0 -250 -125 -250 225 -50 225 150 225 150 175 200 175 200 125 250 125 250 -25 200 -25 200 -75 150 -75 150 -125 -250 -125 -250 -125 N
X ~ 1 400 -100 100 L 50 50 1 1 P
X ~ 2 400 0 100 L 50 50 1 1 P
X ~ 3 400 100 100 L 50 50 1 1 P
X ~ 4 400 200 100 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# LK201_symbols_R_US
#
DEF LK201_symbols_R_US R 0 0 N Y 1 F N
F0 "R" 100 0 50 V V C CNN
F1 "LK201_symbols_R_US" -100 0 50 V V C CNN
F2 "" 40 -10 50 V I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
R_*
$ENDFPLIST
DRAW
P 2 0 1 0 0 -90 0 -100 N
P 2 0 1 0 0 90 0 100 N
P 5 0 1 0 0 -30 40 -45 0 -60 -40 -75 0 -90 N
P 5 0 1 0 0 30 40 15 0 0 -40 -15 0 -30 N
P 5 0 1 0 0 90 40 75 0 60 -40 45 0 30 N
X ~ 1 0 150 50 D 50 50 1 1 P
X ~ 2 0 -150 50 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# power_GND
#
DEF power_GND #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -250 50 H I C CNN
F1 "power_GND" 0 -150 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N
X GND 1 0 0 0 D 50 50 1 1 W N
ENDDRAW
ENDDEF
#
#End Library
File diff suppressed because it is too large. Load diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 572 KiB

@@ -0,0 +1,240 @@
update=Thursday, January 07, 2021 at 09:31:52 AM
version=1
last_client=pcbnew
[general]
version=1
RootSch=
BoardNm=
[cvpcb]
version=1
NetIExt=net
[eeschema]
version=1
LibDir=
[eeschema/libraries]
[pcbnew]
version=1
PageLayoutDescrFile=
LastNetListRead=
CopperLayerCount=2
BoardThickness=1.6
AllowMicroVias=0
AllowBlindVias=0
RequireCourtyardDefinitions=0
ProhibitOverlappingCourtyards=1
MinTrackWidth=0.1524
MinViaDiameter=0.508
MinViaDrill=0.254
MinMicroViaDiameter=0.508
MinMicroViaDrill=0.254
MinHoleToHole=0.254
TrackWidth1=0.1524
TrackWidth2=0.254
TrackWidth3=0.508
ViaDiameter1=0.508
ViaDrill1=0.254
dPairWidth1=0.1524
dPairGap1=0.254
dPairViaGap1=0.25
SilkLineWidth=0.12
SilkTextSizeV=1
SilkTextSizeH=1
SilkTextSizeThickness=0.15
SilkTextItalic=0
SilkTextUpright=1
CopperLineWidth=0.2
CopperTextSizeV=1.5
CopperTextSizeH=1.5
CopperTextThickness=0.3
CopperTextItalic=0
CopperTextUpright=1
EdgeCutLineWidth=0.05
CourtyardLineWidth=0.05
OthersLineWidth=0.15
OthersTextSizeV=1
OthersTextSizeH=1
OthersTextSizeThickness=0.15
OthersTextItalic=0
OthersTextUpright=1
SolderMaskClearance=0.0508
SolderMaskMinWidth=0
SolderPasteClearance=0
SolderPasteRatio=-0
[pcbnew/Layer.F.Cu]
Name=F.Cu
Type=0
Enabled=1
[pcbnew/Layer.In1.Cu]
Name=In1.Cu
Type=0
Enabled=0
[pcbnew/Layer.In2.Cu]
Name=In2.Cu
Type=0
Enabled=0
[pcbnew/Layer.In3.Cu]
Name=In3.Cu
Type=0
Enabled=0
[pcbnew/Layer.In4.Cu]
Name=In4.Cu
Type=0
Enabled=0
[pcbnew/Layer.In5.Cu]
Name=In5.Cu
Type=0
Enabled=0
[pcbnew/Layer.In6.Cu]
Name=In6.Cu
Type=0
Enabled=0
[pcbnew/Layer.In7.Cu]
Name=In7.Cu
Type=0
Enabled=0
[pcbnew/Layer.In8.Cu]
Name=In8.Cu
Type=0
Enabled=0
[pcbnew/Layer.In9.Cu]
Name=In9.Cu
Type=0
Enabled=0
[pcbnew/Layer.In10.Cu]
Name=In10.Cu
Type=0
Enabled=0
[pcbnew/Layer.In11.Cu]
Name=In11.Cu
Type=0
Enabled=0
[pcbnew/Layer.In12.Cu]
Name=In12.Cu
Type=0
Enabled=0
[pcbnew/Layer.In13.Cu]
Name=In13.Cu
Type=0
Enabled=0
[pcbnew/Layer.In14.Cu]
Name=In14.Cu
Type=0
Enabled=0
[pcbnew/Layer.In15.Cu]
Name=In15.Cu
Type=0
Enabled=0
[pcbnew/Layer.In16.Cu]
Name=In16.Cu
Type=0
Enabled=0
[pcbnew/Layer.In17.Cu]
Name=In17.Cu
Type=0
Enabled=0
[pcbnew/Layer.In18.Cu]
Name=In18.Cu
Type=0
Enabled=0
[pcbnew/Layer.In19.Cu]
Name=In19.Cu
Type=0
Enabled=0
[pcbnew/Layer.In20.Cu]
Name=In20.Cu
Type=0
Enabled=0
[pcbnew/Layer.In21.Cu]
Name=In21.Cu
Type=0
Enabled=0
[pcbnew/Layer.In22.Cu]
Name=In22.Cu
Type=0
Enabled=0
[pcbnew/Layer.In23.Cu]
Name=In23.Cu
Type=0
Enabled=0
[pcbnew/Layer.In24.Cu]
Name=In24.Cu
Type=0
Enabled=0
[pcbnew/Layer.In25.Cu]
Name=In25.Cu
Type=0
Enabled=0
[pcbnew/Layer.In26.Cu]
Name=In26.Cu
Type=0
Enabled=0
[pcbnew/Layer.In27.Cu]
Name=In27.Cu
Type=0
Enabled=0
[pcbnew/Layer.In28.Cu]
Name=In28.Cu
Type=0
Enabled=0
[pcbnew/Layer.In29.Cu]
Name=In29.Cu
Type=0
Enabled=0
[pcbnew/Layer.In30.Cu]
Name=In30.Cu
Type=0
Enabled=0
[pcbnew/Layer.B.Cu]
Name=B.Cu
Type=0
Enabled=1
[pcbnew/Layer.B.Adhes]
Enabled=1
[pcbnew/Layer.F.Adhes]
Enabled=1
[pcbnew/Layer.B.Paste]
Enabled=1
[pcbnew/Layer.F.Paste]
Enabled=1
[pcbnew/Layer.B.SilkS]
Enabled=1
[pcbnew/Layer.F.SilkS]
Enabled=1
[pcbnew/Layer.B.Mask]
Enabled=1
[pcbnew/Layer.F.Mask]
Enabled=1
[pcbnew/Layer.Dwgs.User]
Enabled=1
[pcbnew/Layer.Cmts.User]
Enabled=1
[pcbnew/Layer.Eco1.User]
Enabled=1
[pcbnew/Layer.Eco2.User]
Enabled=1
[pcbnew/Layer.Edge.Cuts]
Enabled=1
[pcbnew/Layer.Margin]
Enabled=1
[pcbnew/Layer.B.CrtYd]
Enabled=1
[pcbnew/Layer.F.CrtYd]
Enabled=1
[pcbnew/Layer.B.Fab]
Enabled=1
[pcbnew/Layer.F.Fab]
Enabled=1
[pcbnew/Layer.Rescue]
Enabled=0
[pcbnew/Netclasses]
[pcbnew/Netclasses/Default]
Name=Default
Clearance=0.254
TrackWidth=0.1524
ViaDiameter=0.508
ViaDrill=0.254
uViaDiameter=0.508
uViaDrill=0.254
dPairWidth=0.1524
dPairGap=0.254
dPairViaGap=0.25
@@ -0,0 +1,427 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A 11000 8500
encoding utf-8
Sheet 1 1
Title "LK201 emulator, PS2 interface"
Date "2020-12-30"
Rev "A"
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L LK201_symbols:RJ22 J1
U 1 1 5EC34B84
P 8750 3450
F 0 "J1" H 8420 3454 50 0000 R CNN
F 1 "RJ22" H 8420 3545 50 0000 R CNN
F 2 "lk201_parts:RJ22" V 8750 3500 50 0001 C CNN
F 3 "~" V 8750 3500 50 0001 C CNN
F 4 "​AE10381-ND" H 8750 3450 50 0001 C CNN "Digikey"
F 5 "Assmann WSW" H 8750 3450 50 0001 C CNN "Mfg"
F 6 "A-2004-3-4-LP-N-R␍" H 8750 3450 50 0001 C CNN "Mfg part"
1 8750 3450
-1 0 0 1
$EndComp
$Comp
L LK201_symbols:Audio_piezo_transducer LS1
U 1 1 5EC38E19
P 7300 5100
F 0 "LS1" H 7474 5096 50 0000 L CNN
F 1 "PS1420" H 7474 5005 50 0000 L CNN
F 2 "lk201_parts:PS1420_buzzer" H 7265 5050 50 0001 C CNN
F 3 "~" H 7265 5050 50 0001 C CNN
F 4 "445-2526-1-ND" H 7300 5100 50 0001 C CNN "Digikey"
F 5 "TDK" H 7300 5100 50 0001 C CNN "Mfg"
1 7300 5100
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR04
U 1 1 5EC3DD01
P 5900 4700
F 0 "#PWR04" H 5900 4450 50 0001 C CNN
F 1 "GND" H 5905 4527 50 0000 C CNN
F 2 "" H 5900 4700 50 0001 C CNN
F 3 "" H 5900 4700 50 0001 C CNN
1 5900 4700
1 0 0 -1
$EndComp
Wire Wire Line
5900 4700 5900 4450
Wire Wire Line
6700 3350 8350 3350
Wire Wire Line
8350 3650 7400 3650
Wire Wire Line
7400 3650 7400 3750
Wire Wire Line
7400 3750 6700 3750
Wire Wire Line
8350 3550 8250 3550
Wire Wire Line
8250 3550 8250 4000
Wire Wire Line
8350 3450 8250 3450
Wire Wire Line
8250 3450 8250 2800
Text Label 8250 2950 0 50 ~ 0
V12
$Comp
L power:GND #PWR06
U 1 1 5EC4216F
P 8250 4000
F 0 "#PWR06" H 8250 3750 50 0001 C CNN
F 1 "GND" H 8255 3827 50 0000 C CNN
F 2 "" H 8250 4000 50 0001 C CNN
F 3 "" H 8250 4000 50 0001 C CNN
1 8250 4000
1 0 0 -1
$EndComp
Wire Wire Line
7550 2050 7550 2150
Wire Wire Line
5900 2050 7550 2050
$Comp
L LK201_symbols:C C3
U 1 1 5EC4C577
P 6950 2500
F 0 "C3" H 7065 2546 50 0000 L CNN
F 1 "0.1uF" H 7065 2455 50 0000 L CNN
F 2 "lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm" H 6988 2350 50 0001 C CNN
F 3 "~" H 6950 2500 50 0001 C CNN
F 4 "399-14010-1-ND​" H 6950 2500 50 0001 C CNN "Digikey"
F 5 "Kemet" H 6950 2500 50 0001 C CNN "Mfg"
F 6 "C315C104M5U5TA7301" H 6950 2500 50 0001 C CNN "Mfg part"
1 6950 2500
1 0 0 -1
$EndComp
$Comp
L LK201_symbols:C C1
U 1 1 5EC4C74A
P 4850 2500
F 0 "C1" H 4965 2546 50 0000 L CNN
F 1 "0.1uF" H 4965 2455 50 0000 L CNN
F 2 "lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm" H 4888 2350 50 0001 C CNN
F 3 "~" H 4850 2500 50 0001 C CNN
F 4 "399-14010-1-ND​" H 4850 2500 50 0001 C CNN "Digikey"
F 5 "Kemet" H 4850 2500 50 0001 C CNN "Mfg"
F 6 "C315C104M5U5TA7301" H 4850 2500 50 0001 C CNN "Mfg part"
1 4850 2500
1 0 0 -1
$EndComp
$Comp
L LK201_symbols:C C6
U 1 1 5EC4C92F
P 7550 2300
F 0 "C6" H 7665 2346 50 0000 L CNN
F 1 "0.1uF" H 7665 2255 50 0000 L CNN
F 2 "lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm" H 7588 2150 50 0001 C CNN
F 3 "~" H 7550 2300 50 0001 C CNN
F 4 "399-14010-1-ND​" H 7550 2300 50 0001 C CNN "Digikey"
F 5 "Kemet" H 7550 2300 50 0001 C CNN "Mfg"
F 6 "C315C104M5U5TA7301" H 7550 2300 50 0001 C CNN "Mfg part"
1 7550 2300
1 0 0 -1
$EndComp
$Comp
L LK201_symbols:C C5
U 1 1 5EC4CB26
P 7300 2850
F 0 "C5" V 7048 2850 50 0000 C CNN
F 1 "0.1uF" V 7139 2850 50 0000 C CNN
F 2 "lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm" H 7338 2700 50 0001 C CNN
F 3 "~" H 7300 2850 50 0001 C CNN
F 4 "399-14010-1-ND​" H 7300 2850 50 0001 C CNN "Digikey"
F 5 "Kemet" H 7300 2850 50 0001 C CNN "Mfg"
F 6 "C315C104M5U5TA7301" H 7300 2850 50 0001 C CNN "Mfg part"
1 7300 2850
0 1 1 0
$EndComp
$Comp
L power:GND #PWR05
U 1 1 5EC4D8C5
P 7550 4050
F 0 "#PWR05" H 7550 3800 50 0001 C CNN
F 1 "GND" H 7555 3877 50 0000 C CNN
F 2 "" H 7550 4050 50 0001 C CNN
F 3 "" H 7550 4050 50 0001 C CNN
1 7550 4050
1 0 0 -1
$EndComp
Wire Wire Line
6700 2350 6950 2350
Wire Wire Line
6700 2650 6950 2650
Wire Wire Line
7550 2450 7550 2850
Wire Wire Line
7250 3150 7550 3150
Connection ~ 7550 3150
Wire Wire Line
7550 3150 7550 4050
Wire Wire Line
7450 2850 7550 2850
Connection ~ 7550 2850
Wire Wire Line
7550 2850 7550 3150
Wire Wire Line
5100 2350 4850 2350
Wire Wire Line
5100 2650 4850 2650
Wire Wire Line
6700 3150 6950 3150
$Comp
L LK201_symbols:C C4
U 1 1 5EC4D189
P 7100 3150
F 0 "C4" V 6848 3150 50 0000 C CNN
F 1 "0.1uF" V 6939 3150 50 0000 C CNN
F 2 "lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm" H 7138 3000 50 0001 C CNN
F 3 "~" H 7100 3150 50 0001 C CNN
F 4 "399-14010-1-ND​" H 7100 3150 50 0001 C CNN "Digikey"
F 5 "Kemet" H 7100 3150 50 0001 C CNN "Mfg"
F 6 "C315C104M5U5TA7301" H 7100 3150 50 0001 C CNN "Mfg part"
1 7100 3150
0 1 1 0
$EndComp
NoConn ~ 6700 3950
NoConn ~ 5100 3950
Wire Wire Line
7100 5200 7100 5400
Wire Wire Line
6700 2850 7150 2850
Text Label 6750 2850 0 50 ~ 0
VS+
$Comp
L LK201_symbols:R_US R1
U 1 1 5FED5C13
P 7100 4350
F 0 "R1" H 7168 4396 50 0000 L CNN
F 1 "3.3k" H 7168 4305 50 0000 L CNN
F 2 "lk201_parts:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal" V 7140 4340 50 0001 C CNN
F 3 "" H 7100 4350 50 0001 C CNN
F 4 "CF14JT3K30TR-ND" H 7100 4350 50 0001 C CNN "Digikey"
F 5 "Stackpole" H 7100 4350 50 0001 C CNN "Mfg"
1 7100 4350
1 0 0 -1
$EndComp
Wire Wire Line
6700 3550 7100 3550
Wire Wire Line
7100 3550 7100 4200
Text Label 7100 5700 0 50 ~ 0
VS+
$Comp
L LK201_symbols:C C2
U 1 1 5FED740E
P 6650 5000
F 0 "C2" H 6765 5046 50 0000 L CNN
F 1 "0.01uF" H 6765 4955 50 0000 L CNN
F 2 "lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm" H 6688 4850 50 0001 C CNN
F 3 "" H 6650 5000 50 0001 C CNN
F 4 "399-4150-ND" H 6650 5000 50 0001 C CNN "Digikey"
F 5 "Kemet" H 6650 5000 50 0001 C CNN "Mfg"
F 6 "C315C103M5U5TA" H 6650 5000 50 0001 C CNN "Mfg part"
1 6650 5000
1 0 0 -1
$EndComp
Wire Wire Line
6650 5400 6650 5150
Wire Wire Line
6650 4850 6650 4650
Wire Wire Line
7100 4500 7100 4650
Wire Wire Line
6650 4650 7100 4650
Connection ~ 7100 4650
$Comp
L LK201_symbols:ICL3232 U2
U 1 1 5EC32F48
P 5900 3250
F 0 "U2" H 5900 4631 50 0000 C CNN
F 1 "ICL3232CPZ" H 5900 4540 50 0000 C CNN
F 2 "lk201_parts:DIP-16_296_ELL" H 5950 2200 50 0001 L CNN
F 3 "http://www.intersil.com/content/dam/Intersil/documents/icl3/icl3221-22-23-32-41-43.pdf" H 5900 3350 50 0001 C CNN
F 4 " ICL3232CPZ-ND​" H 5900 3250 50 0001 C CNN "Digikey"
F 5 "Renesas" H 5900 3250 50 0001 C CNN "Mfg"
1 5900 3250
1 0 0 -1
$EndComp
Wire Wire Line
2300 2350 2300 1750
Text Label 2300 1750 0 50 ~ 0
V12
Wire Wire Line
6650 5400 7100 5400
Connection ~ 7100 5400
Wire Wire Line
7100 5400 7100 5600
Wire Wire Line
2200 4800 2200 5000
Wire Wire Line
2400 4800 2400 5000
Wire Wire Line
2600 4800 2600 5000
$Comp
L power:GND #PWR01
U 1 1 5FED2583
P 2200 5000
F 0 "#PWR01" H 2200 4750 50 0001 C CNN
F 1 "GND" H 2205 4827 50 0000 C CNN
F 2 "" H 2200 5000 50 0001 C CNN
F 3 "" H 2200 5000 50 0001 C CNN
1 2200 5000
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR02
U 1 1 5FED284A
P 2400 5000
F 0 "#PWR02" H 2400 4750 50 0001 C CNN
F 1 "GND" H 2405 4827 50 0000 C CNN
F 2 "" H 2400 5000 50 0001 C CNN
F 3 "" H 2400 5000 50 0001 C CNN
1 2400 5000
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR03
U 1 1 5FED2B1D
P 2600 5000
F 0 "#PWR03" H 2600 4750 50 0001 C CNN
F 1 "GND" H 2605 4827 50 0000 C CNN
F 2 "" H 2600 5000 50 0001 C CNN
F 3 "" H 2600 5000 50 0001 C CNN
1 2600 5000
1 0 0 -1
$EndComp
Text Label 3350 4400 0 50 ~ 0
V5
Text Label 6300 2050 0 50 ~ 0
V5
Wire Wire Line
3000 2850 4100 2850
Wire Wire Line
4100 2850 4100 3350
Wire Wire Line
4100 3350 5100 3350
Wire Wire Line
3000 2750 4200 2750
Wire Wire Line
4200 2750 4200 3750
Wire Wire Line
4200 3750 5100 3750
Wire Wire Line
3650 3550 5100 3550
Wire Wire Line
7100 4650 7100 5100
$Comp
L LK201_symbols:Mini-DIN-6 J2
U 1 1 5FED8A8F
P 3700 5150
F 0 "J2" H 3700 5517 50 0000 C CNN
F 1 "Mini-DIN-6" H 3700 5426 50 0000 C CNN
F 2 "lk201_parts:MDJ-006" H 3700 5150 50 0001 C CNN
F 3 "http://www.adam-tech.com/upload/MDJ-00X-FS.pdf" H 3700 5150 50 0001 C CNN
F 4 "2057-MDJ-006-FS-ND" H 3700 5150 50 0001 C CNN "Digikey"
F 5 "Adam Tech" H 3700 5150 50 0001 C CNN "Mfg"
F 6 "MDJ-006-FS" H 3700 5150 50 0001 C CNN "Mfg part"
1 3700 5150
1 0 0 -1
$EndComp
Wire Wire Line
4350 5150 4350 5550
$Comp
L power:GND #PWR0101
U 1 1 5FED9F9F
P 4350 5550
F 0 "#PWR0101" H 4350 5300 50 0001 C CNN
F 1 "GND" H 4355 5377 50 0000 C CNN
F 2 "" H 4350 5550 50 0001 C CNN
F 3 "" H 4350 5550 50 0001 C CNN
1 4350 5550
1 0 0 -1
$EndComp
Wire Wire Line
3400 5150 3150 5150
Wire Wire Line
3150 5150 3150 4400
Wire Wire Line
3150 4400 3350 4400
Wire Wire Line
4000 5150 4350 5150
Wire Wire Line
3000 3850 4200 3850
Wire Wire Line
4200 3850 4200 5250
Wire Wire Line
4200 5250 4000 5250
Wire Wire Line
3000 3950 4100 3950
Wire Wire Line
4100 3950 4100 5050
Wire Wire Line
4100 5050 4000 5050
Wire Wire Line
3700 5450 3700 5600
$Comp
L power:GND #PWR0102
U 1 1 5FEEE35D
P 3700 5600
F 0 "#PWR0102" H 3700 5350 50 0001 C CNN
F 1 "GND" H 3705 5427 50 0000 C CNN
F 2 "" H 3700 5600 50 0001 C CNN
F 3 "" H 3700 5600 50 0001 C CNN
1 3700 5600
1 0 0 -1
$EndComp
NoConn ~ 3400 5250
NoConn ~ 3400 5050
NoConn ~ 3000 2950
NoConn ~ 3000 3050
NoConn ~ 3000 3150
NoConn ~ 3000 3350
NoConn ~ 3000 3450
NoConn ~ 3000 3550
NoConn ~ 3000 3750
NoConn ~ 3000 4050
NoConn ~ 1800 4200
NoConn ~ 1800 3950
NoConn ~ 1800 3850
NoConn ~ 1800 3750
NoConn ~ 1800 3450
NoConn ~ 1800 3350
NoConn ~ 1800 3250
NoConn ~ 1800 3150
NoConn ~ 1800 3050
NoConn ~ 1800 2950
NoConn ~ 1800 2650
NoConn ~ 2500 2350
Wire Wire Line
3000 3650 3650 3650
Wire Wire Line
3650 3650 3650 3550
NoConn ~ 3000 3250
$Comp
L LK201_symbols:Itsy_Bitsy_5V U1
U 1 1 5FEEAD04
P 2400 2950
F 0 "U1" H 2400 3731 50 0000 C CNN
F 1 "Itsy_Bitsy_5V" H 2400 3640 50 0000 C CNN
F 2 "lk201_parts:Itsy" H 2400 1600 50 0001 C CIN
F 3 "" H 2400 2950 50 0001 C CNN
F 4 "1528-2501-ND" H 2350 2300 50 0001 C CNN "Digikey"
F 5 "Adafruit" H 2250 2600 50 0001 C CNN "Mfg"
F 6 "3677" H 2200 2500 50 0001 C CNN "Mfg part"
1 2400 2950
1 0 0 -1
$EndComp
Wire Wire Line
3000 4400 3150 4400
Connection ~ 3150 4400
$EndSCHEMATC
@@ -0,0 +1,521 @@
<?xml version="1.0" encoding="UTF-8"?>
<export version="D">
<design>
<source>/Users/pkoning/Documents/svn/lk201emu/kicad/lk201ps2/lk201ps2.sch</source>
<date>Thursday, January 07, 2021 at 08:19:15 PM</date>
<tool>Eeschema (5.1.6-0-10_14)</tool>
<sheet number="1" name="/" tstamps="/">
<title_block>
<title>LK201 emulator, PS2 interface</title>
<company/>
<rev>A</rev>
<date>2020-12-30</date>
<source>lk201ps2.sch</source>
<comment number="1" value=""/>
<comment number="2" value=""/>
<comment number="3" value=""/>
<comment number="4" value=""/>
</title_block>
</sheet>
</design>
<components>
<comp ref="J1">
<value>RJ22</value>
<footprint>lk201_parts:RJ22</footprint>
<datasheet>~</datasheet>
<fields>
<field name="Digikey">​AE10381-ND</field>
<field name="Mfg">Assmann WSW</field>
<field name="Mfg part">A-2004-3-4-LP-N-R&#xD;</field>
</fields>
<libsource lib="LK201_symbols" part="RJ22" description=""/>
<sheetpath names="/" tstamps="/"/>
<tstamp>5EC34B84</tstamp>
</comp>
<comp ref="LS1">
<value>PS1420</value>
<footprint>lk201_parts:PS1420_buzzer</footprint>
<datasheet>~</datasheet>
<fields>
<field name="Digikey">445-2526-1-ND</field>
<field name="Mfg">TDK</field>
</fields>
<libsource lib="LK201_symbols" part="Audio_piezo_transducer" description=""/>
<sheetpath names="/" tstamps="/"/>
<tstamp>5EC38E19</tstamp>
</comp>
<comp ref="C3">
<value>0.1uF</value>
<footprint>lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm</footprint>
<datasheet>~</datasheet>
<fields>
<field name="Digikey">399-14010-1-ND​</field>
<field name="Mfg">Kemet</field>
<field name="Mfg part">C315C104M5U5TA7301</field>
</fields>
<libsource lib="LK201_symbols" part="C" description=""/>
<sheetpath names="/" tstamps="/"/>
<tstamp>5EC4C577</tstamp>
</comp>
<comp ref="C1">
<value>0.1uF</value>
<footprint>lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm</footprint>
<datasheet>~</datasheet>
<fields>
<field name="Digikey">399-14010-1-ND​</field>
<field name="Mfg">Kemet</field>
<field name="Mfg part">C315C104M5U5TA7301</field>
</fields>
<libsource lib="LK201_symbols" part="C" description=""/>
<sheetpath names="/" tstamps="/"/>
<tstamp>5EC4C74A</tstamp>
</comp>
<comp ref="C6">
<value>0.1uF</value>
<footprint>lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm</footprint>
<datasheet>~</datasheet>
<fields>
<field name="Digikey">399-14010-1-ND​</field>
<field name="Mfg">Kemet</field>
<field name="Mfg part">C315C104M5U5TA7301</field>
</fields>
<libsource lib="LK201_symbols" part="C" description=""/>
<sheetpath names="/" tstamps="/"/>
<tstamp>5EC4C92F</tstamp>
</comp>
<comp ref="C5">
<value>0.1uF</value>
<footprint>lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm</footprint>
<datasheet>~</datasheet>
<fields>
<field name="Digikey">399-14010-1-ND​</field>
<field name="Mfg">Kemet</field>
<field name="Mfg part">C315C104M5U5TA7301</field>
</fields>
<libsource lib="LK201_symbols" part="C" description=""/>
<sheetpath names="/" tstamps="/"/>
<tstamp>5EC4CB26</tstamp>
</comp>
<comp ref="C4">
<value>0.1uF</value>
<footprint>lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm</footprint>
<datasheet>~</datasheet>
<fields>
<field name="Digikey">399-14010-1-ND​</field>
<field name="Mfg">Kemet</field>
<field name="Mfg part">C315C104M5U5TA7301</field>
</fields>
<libsource lib="LK201_symbols" part="C" description=""/>
<sheetpath names="/" tstamps="/"/>
<tstamp>5EC4D189</tstamp>
</comp>
<comp ref="R1">
<value>3.3k</value>
<footprint>lk201_parts:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal</footprint>
<fields>
<field name="Digikey">CF14JT3K30TR-ND</field>
<field name="Mfg">Stackpole</field>
</fields>
<libsource lib="LK201_symbols" part="R_US" description=""/>
<sheetpath names="/" tstamps="/"/>
<tstamp>5FED5C13</tstamp>
</comp>
<comp ref="C2">
<value>0.01uF</value>
<footprint>lk201_parts:C_Rect_L4.0mm_W2.5mm_P2.54mm</footprint>
<fields>
<field name="Digikey">399-4150-ND</field>
<field name="Mfg">Kemet</field>
<field name="Mfg part">C315C103M5U5TA</field>
</fields>
<libsource lib="LK201_symbols" part="C" description=""/>
<sheetpath names="/" tstamps="/"/>
<tstamp>5FED740E</tstamp>
</comp>
<comp ref="U2">
<value>ICL3232CPZ</value>
<footprint>lk201_parts:DIP-16_296_ELL</footprint>
<datasheet>http://www.intersil.com/content/dam/Intersil/documents/icl3/icl3221-22-23-32-41-43.pdf</datasheet>
<fields>
<field name="Digikey"> ICL3232CPZ-ND​</field>
<field name="Mfg">Renesas</field>
</fields>
<libsource lib="LK201_symbols" part="ICL3232" description=""/>
<sheetpath names="/" tstamps="/"/>
<tstamp>5EC32F48</tstamp>
</comp>
<comp ref="J2">
<value>Mini-DIN-6</value>
<footprint>lk201_parts:MDJ-00x</footprint>
<datasheet>http://www.adam-tech.com/upload/MDJ-00X-FS.pdf</datasheet>
<fields>
<field name="Digikey">2057-MDJ-006-FS-ND</field>
<field name="Mfg">Adam Tech</field>
<field name="Mfg part">MDJ-006-FS</field>
</fields>
<libsource lib="LK201_symbols" part="Mini-DIN-6" description="6-pin Mini-DIN connector"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>5FED8A8F</tstamp>
</comp>
<comp ref="U1">
<value>Itsy_Bitsy_5V</value>
<footprint>lk201_parts:Itsy</footprint>
<fields>
<field name="Digikey">1528-2501-ND</field>
<field name="Mfg">Adafruit</field>
<field name="Mfg part">3677</field>
</fields>
<libsource lib="LK201_symbols" part="Itsy_Bitsy_5V" description=""/>
<sheetpath names="/" tstamps="/"/>
<tstamp>5FEEAD04</tstamp>
</comp>
</components>
<libparts>
<libpart lib="LK201_symbols" part="Audio_piezo_transducer">
<aliases>
<alias>Speaker_Ultrasound</alias>
</aliases>
<fields>
<field name="Reference">LS</field>
<field name="Value">Audio_piezo_transducer</field>
<field name="Digikey">​445-2526-1-ND</field>
<field name="Mfg">TDK Corporation</field>
<field name="Mfg part">PS1420P02CT</field>
</fields>
<pins>
<pin num="1" name="1" type="input"/>
<pin num="2" name="2" type="input"/>
</pins>
</libpart>
<libpart lib="LK201_symbols" part="C">
<footprints>
<fp>C_*</fp>
</footprints>
<fields>
<field name="Reference">C</field>
<field name="Value">C</field>
<field name="Digikey">399-14010-1-ND​</field>
<field name="Mfg">Kemet</field>
<field name="Mfg part">C315C104M5U5TA7301</field>
</fields>
<pins>
<pin num="1" name="~" type="passive"/>
<pin num="2" name="~" type="passive"/>
</pins>
</libpart>
<libpart lib="LK201_symbols" part="ICL3232">
<aliases>
<alias>MAX232I</alias>
<alias>MAX202</alias>
<alias>ADM232A</alias>
<alias>MAX3232</alias>
</aliases>
<docs>https://www.renesas.com/us/en/document/dst/icl3221-icl3222-icl3223-icl3232-icl3241-icl3243-datasheet</docs>
<footprints>
<fp>SOIC*P1.27mm*</fp>
<fp>DIP*W7.62mm*</fp>
<fp>TSSOP*4.4x5mm*P0.65mm*</fp>
</footprints>
<fields>
<field name="Reference">U</field>
<field name="Value">ICL3232</field>
<field name="Digikey">ICL3232CPZ-ND​</field>
<field name="Mfg">Renesas</field>
<field name="Mfg part">ICL3232CPZ</field>
</fields>
<pins>
<pin num="1" name="C1+" type="passive"/>
<pin num="2" name="VS+" type="power_out"/>
<pin num="3" name="C1-" type="passive"/>
<pin num="4" name="C2+" type="passive"/>
<pin num="5" name="C2-" type="passive"/>
<pin num="6" name="VS-" type="power_out"/>
<pin num="7" name="T2OUT" type="output"/>
<pin num="8" name="R2IN" type="input"/>
<pin num="9" name="R2OUT" type="output"/>
<pin num="10" name="T2IN" type="input"/>
<pin num="11" name="T1IN" type="input"/>
<pin num="12" name="R1OUT" type="output"/>
<pin num="13" name="R1IN" type="input"/>
<pin num="14" name="T1OUT" type="output"/>
<pin num="15" name="GND" type="power_in"/>
<pin num="16" name="VCC" type="power_in"/>
</pins>
</libpart>
<libpart lib="LK201_symbols" part="Itsy_Bitsy_5V">
<footprints>
<fp>Itsy</fp>
</footprints>
<fields>
<field name="Reference">U</field>
<field name="Value">Itsy_Bitsy_5V</field>
<field name="Footprint">lk201_parts:Itsy</field>
<field name="Digikey">1528-2501-ND</field>
<field name="Mfg">Adafruit</field>
<field name="Mfg part">3677</field>
</fields>
<pins>
<pin num="1" name="~RST" type="input"/>
<pin num="2" name="V5_OUT" type="power_out"/>
<pin num="3" name="AREF" type="input"/>
<pin num="4" name="GND" type="passive"/>
<pin num="5" name="A0" type="input"/>
<pin num="6" name="A1" type="input"/>
<pin num="7" name="A2" type="input"/>
<pin num="8" name="A3" type="input"/>
<pin num="9" name="A4" type="input"/>
<pin num="10" name="A5" type="input"/>
<pin num="11" name="SCK" type="unspc"/>
<pin num="12" name="MO" type="unspc"/>
<pin num="13" name="MI" type="unspc"/>
<pin num="14" name="UCAP" type="NotConnected"/>
<pin num="16" name="GND" type="passive"/>
<pin num="17" name="D8" type="unspc"/>
<pin num="18" name="D6" type="unspc"/>
<pin num="19" name="D4" type="unspc"/>
<pin num="20" name="SER_RX" type="input"/>
<pin num="21" name="SER_TX" type="output"/>
<pin num="22" name="D2" type="unspc"/>
<pin num="23" name="D3" type="unspc"/>
<pin num="24" name="D5" type="unspc"/>
<pin num="25" name="D7" type="unspc"/>
<pin num="26" name="D9" type="unspc"/>
<pin num="27" name="D10" type="unspc"/>
<pin num="28" name="D11" type="unspc"/>
<pin num="29" name="D12" type="unspc"/>
<pin num="30" name="D13" type="unspc"/>
<pin num="31" name="USB" type="power_in"/>
<pin num="32" name="GND" type="passive"/>
<pin num="33" name="VBAT" type="power_in"/>
</pins>
</libpart>
<libpart lib="LK201_symbols" part="Mini-DIN-6">
<description>6-pin Mini-DIN connector</description>
<docs>http://service.powerdynamics.com/ec/Catalog17/Section%2011.pdf</docs>
<footprints>
<fp>MINI?DIN*</fp>
</footprints>
<fields>
<field name="Reference">J</field>
<field name="Value">Mini-DIN-6</field>
</fields>
<pins>
<pin num="1" name="~" type="passive"/>
<pin num="2" name="~" type="passive"/>
<pin num="3" name="~" type="passive"/>
<pin num="4" name="~" type="passive"/>
<pin num="5" name="~" type="passive"/>
<pin num="6" name="~" type="passive"/>
<pin num="SH" name="~" type="power_in"/>
</pins>
</libpart>
<libpart lib="LK201_symbols" part="RJ22">
<aliases>
<alias>RJ9</alias>
<alias>RJ10</alias>
</aliases>
<footprints>
<fp>4P4C*</fp>
<fp>RJ9*</fp>
<fp>RJ10*</fp>
<fp>RJ22*</fp>
</footprints>
<fields>
<field name="Reference">J</field>
<field name="Value">RJ22</field>
<field name="Digikey">​AE10381-ND</field>
<field name="Mfg">Assmann WSW</field>
<field name="Mfg part">A-2004-3-4-LP-N-R&#xD;</field>
</fields>
<pins>
<pin num="1" name="~" type="passive"/>
<pin num="2" name="~" type="passive"/>
<pin num="3" name="~" type="passive"/>
<pin num="4" name="~" type="passive"/>
</pins>
</libpart>
<libpart lib="LK201_symbols" part="R_US">
<footprints>
<fp>R_*</fp>
</footprints>
<fields>
<field name="Reference">R</field>
<field name="Value">R_US</field>
</fields>
<pins>
<pin num="1" name="~" type="passive"/>
<pin num="2" name="~" type="passive"/>
</pins>
</libpart>
</libparts>
<libraries>
<library logical="LK201_symbols">
<uri>/Users/pkoning/Documents/svn/lk201emu/kicad/lk201ps2/../LK201_symbols.lib</uri>
</library>
</libraries>
<nets>
<net code="1" name="Net-(J1-Pad1)">
<node ref="J1" pin="1"/>
<node ref="U2" pin="14"/>
</net>
<net code="2" name="Net-(J1-Pad4)">
<node ref="U2" pin="13"/>
<node ref="J1" pin="4"/>
</net>
<net code="3" name="GND">
<node ref="J2" pin="3"/>
<node ref="U1" pin="4"/>
<node ref="U2" pin="15"/>
<node ref="J1" pin="3"/>
<node ref="U1" pin="32"/>
<node ref="C6" pin="2"/>
<node ref="C5" pin="1"/>
<node ref="U1" pin="16"/>
<node ref="C4" pin="1"/>
<node ref="J2" pin="SH"/>
</net>
<net code="4" name="/V12">
<node ref="J1" pin="2"/>
<node ref="U1" pin="33"/>
</net>
<net code="5" name="Net-(C3-Pad1)">
<node ref="C3" pin="1"/>
<node ref="U2" pin="4"/>
</net>
<net code="6" name="Net-(C3-Pad2)">
<node ref="C3" pin="2"/>
<node ref="U2" pin="5"/>
</net>
<net code="7" name="Net-(C1-Pad1)">
<node ref="U2" pin="1"/>
<node ref="C1" pin="1"/>
</net>
<net code="8" name="Net-(C1-Pad2)">
<node ref="C1" pin="2"/>
<node ref="U2" pin="3"/>
</net>
<net code="9" name="Net-(C4-Pad2)">
<node ref="C4" pin="2"/>
<node ref="U2" pin="6"/>
</net>
<net code="10" name="Net-(U2-Pad8)">
<node ref="U2" pin="8"/>
</net>
<net code="11" name="Net-(U2-Pad9)">
<node ref="U2" pin="9"/>
</net>
<net code="12" name="/VS+">
<node ref="U2" pin="2"/>
<node ref="C5" pin="2"/>
<node ref="C2" pin="2"/>
<node ref="LS1" pin="2"/>
</net>
<net code="13" name="Net-(C2-Pad1)">
<node ref="C2" pin="1"/>
<node ref="R1" pin="2"/>
<node ref="LS1" pin="1"/>
</net>
<net code="14" name="Net-(R1-Pad1)">
<node ref="U2" pin="7"/>
<node ref="R1" pin="1"/>
</net>
<net code="15" name="Net-(U1-Pad21)">
<node ref="U1" pin="21"/>
<node ref="U2" pin="11"/>
</net>
<net code="16" name="Net-(U1-Pad20)">
<node ref="U1" pin="20"/>
<node ref="U2" pin="12"/>
</net>
<net code="17" name="Net-(J2-Pad2)">
<node ref="J2" pin="2"/>
</net>
<net code="18" name="Net-(J2-Pad6)">
<node ref="J2" pin="6"/>
</net>
<net code="19" name="Net-(J2-Pad1)">
<node ref="U1" pin="28"/>
<node ref="J2" pin="1"/>
</net>
<net code="20" name="Net-(J2-Pad5)">
<node ref="U1" pin="29"/>
<node ref="J2" pin="5"/>
</net>
<net code="21" name="Net-(U1-Pad22)">
<node ref="U1" pin="22"/>
</net>
<net code="22" name="Net-(U1-Pad23)">
<node ref="U1" pin="23"/>
</net>
<net code="23" name="Net-(U1-Pad19)">
<node ref="U1" pin="19"/>
</net>
<net code="24" name="Net-(U1-Pad18)">
<node ref="U1" pin="18"/>
</net>
<net code="25" name="Net-(U1-Pad25)">
<node ref="U1" pin="25"/>
</net>
<net code="26" name="Net-(U1-Pad17)">
<node ref="U1" pin="17"/>
</net>
<net code="27" name="Net-(U1-Pad27)">
<node ref="U1" pin="27"/>
</net>
<net code="28" name="Net-(U1-Pad30)">
<node ref="U1" pin="30"/>
</net>
<net code="29" name="Net-(U1-Pad1)">
<node ref="U1" pin="1"/>
</net>
<net code="30" name="Net-(U1-Pad13)">
<node ref="U1" pin="13"/>
</net>
<net code="31" name="Net-(U1-Pad12)">
<node ref="U1" pin="12"/>
</net>
<net code="32" name="Net-(U1-Pad11)">
<node ref="U1" pin="11"/>
</net>
<net code="33" name="Net-(U1-Pad10)">
<node ref="U1" pin="10"/>
</net>
<net code="34" name="Net-(U1-Pad9)">
<node ref="U1" pin="9"/>
</net>
<net code="35" name="Net-(U1-Pad8)">
<node ref="U1" pin="8"/>
</net>
<net code="36" name="Net-(U1-Pad7)">
<node ref="U1" pin="7"/>
</net>
<net code="37" name="Net-(U1-Pad6)">
<node ref="U1" pin="6"/>
</net>
<net code="38" name="Net-(U1-Pad5)">
<node ref="U1" pin="5"/>
</net>
<net code="39" name="Net-(U1-Pad3)">
<node ref="U1" pin="3"/>
</net>
<net code="40" name="Net-(U1-Pad31)">
<node ref="U1" pin="31"/>
</net>
<net code="41" name="Net-(U1-Pad26)">
<node ref="U2" pin="10"/>
<node ref="U1" pin="26"/>
</net>
<net code="42" name="Net-(U1-Pad24)">
<node ref="U1" pin="24"/>
</net>
<net code="43" name="Net-(U1-Pad14)">
<node ref="U1" pin="14"/>
</net>
<net code="44" name="/V5">
<node ref="U1" pin="2"/>
<node ref="U2" pin="16"/>
<node ref="C6" pin="1"/>
<node ref="J2" pin="4"/>
</net>
</nets>
</export>
@@ -0,0 +1,3 @@
(sym_lib_table
(lib (name LK201_symbols)(type Legacy)(uri ${KIPRJMOD}/../LK201_symbols.lib)(options "")(descr ""))
)
@@ -0,0 +1,945 @@
/*
LK-201 emulator
Interfaces between a DEC terminal or workstation that expects an
LK201-AA keyboard and a standard PC type USB keyboard.
Copyright (c) 2020, Paul Koning
Please read file LICENSE for the license that applies to this project.
*/
#define DOIDENT 1 // Set to 0 to suppress power up ident
/*
Parts of this code were taken from various sample files:
KeyboardController tutorial
created 8 Oct 2012
by Cristian Maglie
http://arduino.cc/en/Tutorial/KeyboardController
This sample code is part of the public domain.
3-color LED example from
https://hackaday.io/project/9017-skywalker-lightsaber/log/72354-adafruit-trinket-m0-controlling-the-onboard-dotstar-led-via-arduino-ide
ZeroTimer library example from
https://github.com/adafruit/Adafruit_ZeroTimer/tree/master/examples/timer_callback
*/
#include <Arduino.h>
#include "Adafruit_ZeroTimer.h"
// Require keyboard control library
#include <KeyboardController.h>
#include <Adafruit_DotStar.h>
#include <SPI.h>
#define NUMPIXELS 1 // Number of LEDs in strip
// Here's how to control the LEDs from any two pins:
#define DATAPIN 7
#define CLOCKPIN 8
Adafruit_DotStar strip = Adafruit_DotStar(
NUMPIXELS, DATAPIN, CLOCKPIN, DOTSTAR_BGR);
// PC 105-key keyboard (USB HID Boot mode codes) to LK201 mapping.
//
// Entries in the main lookup table are keyed by the scan code. The
// value is the LK201 keycode. Entries in the "divs" table are keyed
// by LK201 keycode, and give the "keyboard division" number which
// selects the mode (up/down, autorepeat, down only) and, if
// applicable, autorepeat parameter buffer.
//
// For the most part these mappings are obvious. The 6 editing keys
// (above the cursor keys) are mapped according to their location, not
// their labels, so "home" is coded as LK201 "insert here" (rather than
// using the "insert" key for this code).
//
// Similarly, num lock, scroll lock and pause become F14, F15 (Help)
// and F16 (Do). And the numeric keypad mappings are by layout. Note
// that there is no PF4 because the PC keypad has one key less than the
// LK201, so the - key is used for - (Cut) instead of PF4 as its
// placement might suggest.
//
// The left Windows key is the < > key.
//
// For convenience, Esc is mapped to F11 which is its conventional
// interpretation. Both shifts are shift, but the right
// Alt/Win/App/Ctrl keys are F17 to F20 instead.
const uint8_t divs[] =
{
10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0,
11, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0,
12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 13, 13, 0, 0,
14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9,
0, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
0, 0, 0, 7, 7, 8, 8, 0, 0, 0, 6, 6, 5, 5, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 3, 4, 4, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,
0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0,
1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0,
1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1
};
// First LK201 code in divs is 86
#define DIVBASE 86
// Main lookup table, indexed by report scan code
const uint8_t usb_lk201[] =
{
0, // No keys
0, // Rollover overflow
0, // error
0, // reserved
194, // A
217, // B
206, // C
205, // D
204, // E
210, // F
216, // G
221, // H
230, // I
226, // J
231, // K
236, // L
227, // M
222, // N
235, // O
240, // P
193, // Q
209, // R
199, // S
215, // T
225, // U
211, // V
198, // W
200, // X
220, // Y
195, // Z
192, // 1
197, // 2
203, // 3
208, // 4
214, // 5
219, // 6
224, // 7
229, // 8
234, // 9
239, // 0
189, // Enter
113, // Esc (F11)
188, // Backspace
190, // Tab
212, // Space
249, // - / _
245, // = / +
250, // [ / {
246, // ] / }
247, // \ / |
0, // unused code
242, // ; / :
251, // ' / "
191, // ` / ~
232, // , / <
237, // . / >
243, // / / ?
176, // Caps Lock
86, // F1
87, // F2
88, // F3
89, // F4
90, // F5
100, // F6
101, // F7
102, // F8
103, // F9
104, // F10
113, // F11
114, // F12
116, // PrtScr (F14)
124, // Scroll Lock (Help)
125, // Pause (Do)
138, // Insert (Find)
139, // Home (Insert here)
140, // PgUp (Remove)
141, // Delete (Select)
142, // End (Prev Screen)
143, // PgDn (Next Screen)
168, // Right
167, // Left
169, // Down
170, // Up
161, // Num Lock (PF1)
162, // KP / (PF2)
163, // KP * (PF3)
160, // KP -
156, // KP + (num comma)
149, // KP Enter
150, // KP 1 / End
151, // KP 2 / Down
152, // KP 3 / PgDn
153, // KP 4 / Left
154, // KP 5
155, // KP 6 / Right
157, // KP 7 / Home
158, // KP 8 / Up
159, // KP 9 / PgUp
146, // KP 0 / Ins
148, // KP . / Del
0, // unused code
130 // Applic (F19)
};
#define MAXSCAN sizeof (usb_lk201)
// Modifier lookup table, indexed by bit number
const uint8_t usbmod_lk201[] =
{
175, // Left control
174, // Shift
177, // Left Alt (Compose)
201, // Left Windows (< >)
131, // Right control (F20)
0, // Unused (right shift)
128, // Right Alt (F17)
129 // Right Windows (F18)
};
// Modifier bit values
#define LCTRL 0x01
#define LSHIFT 0x02
#define LALT 0x04
#define LWIN 0x08
#define RCTRL 0x10
#define RSHIFT 0x20
#define RALT 0x40
#define RWIN 0x80
// Modes
#define D 0 // Down only
#define A 1 // Autorepeat
#define U 3 // Up/down
// Default mode settings for the divisions. Note that divisions are
// numbered starting at 1.
// Defaults are: main, keypad, delete, cursor - autorepeat; return,
// tab, lock, compose: down only; shift, control, editing: down/up.
// Documentation doesn't say what we do for function keys: make those
// down only.
// Division 0 doesn't exist, we use it internally for special keys
// like ALL UP. Set it to up/down so those are always sent.
const uint8_t defmodes[] =
{ U, A, A, A, D, D, U, A, A, U, D, D, D, D, D };
// Active modes, loaded from defmode at reset but can be modified by
// the host.
uint8_t modes[sizeof (defmodes)];
// Auto-repeat buffers
struct arparams
{
int timeout; // Delay before first repeat
int interval; // Delay between subsequent repeats
};
// Timer interrupt interval is 0.25 ms, to give 2 kHz square wave
// (which is the resonant frequency of the piezo beeper used).
#define INTRATE 4000
#define MS2DELAY(x) ((x) * INTRATE / 1000)
#define WPM2DELAY(x) MS2DELAY (1200 / (x))
#define RATE2DELAY(x) (INTRATE / (x))
#define ARBUF(tmo,rate) { MS2DELAY (tmo), RATE2DELAY (rate) }
const arparams defarbufs[4] =
{
ARBUF (500, 30),
ARBUF (300, 30),
ARBUF (500, 40),
ARBUF (300, 40)
};
// These are the active params, loaded at reset but changeable.
arparams arbufs[4];
// Auto-repeat buffer assignments for divisions. Documentation
// doesn't state what the default assignment is for divisions that
// don't default to autorepeat; use zero for those.
const uint8_t defar[] =
{ 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 };
// Active auto-repeat buffer assignments, loaded from defar at reset
// but can be modified by the host.
uint8_t ar[sizeof (defar)];
// Current auto-repeat values
int arDelay;
const arparams *arBuf;
int nextArKey;
// Ident stuff
#define IDUNIT WPM2DELAY (30) // 30 wpm
#define T 1
#define H (T * 3)
#define S (-T)
#define LS (-H)
const int8_t *idp;
const int8_t errA[] =
{ LS, T, S, H, LS, 0 };
const int8_t errB[] =
{ LS, H, S, T, S, T, S, T, LS, 0 };
#if DOIDENT
const int8_t ident[] =
{ H, S, T, S, T, LS, T, LS, LS, S,
H, S, T, LS, T, S, T, LS,
T, S, H, S, H, S, H, S, H, LS,
H, S, T, S, T, 0
};
#endif
// Key click and bell parameters
bool clickOff = false;
bool ctrlClick = false;
int clickVol;
bool bellOff = false;
int bellVol;
#define DEFVOL 2
// Analog output (for beeper) -- use the real DAC since PWM doesn't
// work well with piezo beepers.
#define APIN A0
// Analog output goes through an amplifier, so we have to map values
// to account for that.
#define HIGH 1023 // full scale value
#define BIAS (HIGH / 6) // 0.5 V adjustment for diode drop
#define FS (HIGH - BIAS)
#define AOUT(x) (FS - (x))
#define AOFF HIGH
#define P 0.707
#define E(i, b, pp) ((i & (1 << b)) ? (pp): 1)
// Volume table (analog output value for a given volume). Note that 0
// is highest. We scale exponentially since audio perception is
// logarithmic. The exponent (P) is determined experimentally, by
// looking for something that sounds right. Sqrt(0.5) seems about
// right.
#define VOL(i) AOUT (FS * E(i, 2, P*P*P*P) * E(i, 1, P*P) * E(i, 0, P))
const int vol[8] =
{
VOL (0), VOL (1), VOL (2), VOL (3),
VOL (4), VOL (5), VOL (6), VOL (7)
};
// Audio generation control
#define CLICKTIME 10 // 5 cycles of the tone
#define BELLTIME MS2DELAY(125) // 125 ms tone
int audioCounter;
int curVol;
void doClick (void)
{
if (!clickOff)
{
audioCounter = CLICKTIME;
curVol = vol[clickVol];
}
}
void doBell (void)
{
if (!bellOff)
{
audioCounter = BELLTIME;
curVol = vol[bellVol];
}
}
// On SAMD boards where the native USB port is also the serial console, use
// Serial1 for the serial console. This applies to all SAMD boards except for
// Arduino Zero and M0 boards.
#if (USB_VID==0x2341 && defined(ARDUINO_SAMD_ZERO)) || (USB_VID==0x2a03 && defined(ARDUINO_SAM_ZERO))
#define Serial SERIAL_PORT_MONITOR
#else
#define Serial Serial1
#endif
HID *kb_hid;
// timer tester
Adafruit_ZeroTimer zerotimer = Adafruit_ZeroTimer(3);
void TC3_Handler() {
Adafruit_ZeroTimer::timerHandler(3);
}
class KeyboardRaw : public KeyboardReportParser {
public:
KeyboardRaw(USBHost &usb) : hostKeyboard(&usb) {
hostKeyboard.SetReportParser(0, this);
};
void Parse(HID *hid, uint32_t is_rpt_id, uint32_t len, uint8_t *buf);
private:
HIDBoot<HID_PROTOCOL_KEYBOARD> hostKeyboard;
};
// USB scan state
uint8_t prevmod;
uint8_t prevscans[7];
uint8_t curmod;
uint8_t curscans[7];
// LK201 key down stack. This tracks all the LK201 keys that are
// down, except for Up/Down mode keys (modifiers like shift). The
// purpose is to handle autorepeat when keys are pressed and released;
// the rule is that the most recent key that is still down is
// autorepeated if applicable to that key.
uint8_t lkdown[14];
int downcnt;
// LK201 command buffer
uint8_t cmd[4];
int cmdcnt;
void send (int k)
{
Serial.write (k);
}
void panic (char c, const int8_t * code)
{
strip.setPixelColor(0, 0x280000); // red
strip.show();
send (c);
idp = code;
audioCounter = 1;
send (181);
}
void setar (int lk, bool sendlk = false)
{
const int div = divs[lk - DIVBASE];
if (modes[div] == A)
{
arBuf = &arbufs[ar[div]];
arDelay = arBuf->timeout;
if (sendlk)
nextArKey = lk; // First time, send the actual key
else
nextArKey = 180; // Metronome code
}
}
void key(int lk, bool down)
{
const int div = divs[lk - DIVBASE];
// First of all, cancel any current auto-repeat on every new
// keystroke.
arDelay = 0;
// If this isn't an up/down key, adjust the list of currently down
// keys -- this is what allows auto-repeat to work properly when
// several repeating keys are pressed and released.
if (modes[div] != U)
{
if (down)
{
// Key down, push it onto the "down" stack
if (downcnt >= sizeof (lkdown))
{
// No room, something is wrong
panic ('A', errA);
return;
}
if (downcnt)
memmove (lkdown + 1, lkdown, downcnt);
downcnt++;
lkdown[0] = lk;
}
else
{
// Key up, remove it from the list
int i;
for (i = 0; i < downcnt; i++)
if (lkdown[i] == lk)
break;
if (i == downcnt)
{
// Not there, bug, just exit
panic ('B', errB);
return;
}
if (i != downcnt - 1)
memmove (lkdown + i, lkdown + i + 1, downcnt - i - 1);
downcnt--;
// If anything is left, and the last entry (most recent key
// that's still down) is up/down, start it autorepeating.
if (downcnt)
setar (lkdown[0], true);
return;
}
}
send (lk);
if (down && lk != 174 && (lk != 175 || ctrlClick))
{
doClick ();
}
// If this key is an auto-repeating one, set up the initial delay
setar (lk);
}
void KeyboardRaw::Parse(HID *hid, uint32_t is_rpt_id, uint32_t len, uint8_t *buf)
{
bool down;
int i, j;
uint8_t p, c;
// Save HID pointer
kb_hid = hid;
if (buf[2] == 1)
return; // Error case
curmod = buf[0];
memcpy (curscans, &buf[2], 6);
if (buf[0] == 0 && buf[2] == 0)
{
// No keys down, so send "all up"
send (179);
// No more autorepeat, nothing down
arDelay = downcnt = 0;
}
else
{
if (curmod & RSHIFT)
{
curmod = (curmod | LSHIFT) & (~RSHIFT);
}
int cmod = curmod ^ prevmod;
for (int i = 0; i < 8; i++)
{
if (cmod & (1 << i))
{
down = ((curmod & (1 << i)) != 0);
key (usbmod_lk201[i], down);
}
}
i = j = 0;
while (i < 7 && j < 7)
{
p = prevscans[j];
c = curscans[i];
if (p != c)
{
if (p == 0)
{
// New key, so send "down"
if (c < MAXSCAN)
{
// New key down, so send "down"
key (usb_lk201[c], true);
}
i++;
}
else
{
if (p < MAXSCAN)
{
// Previous key down, so send "up"
key (usb_lk201[p], false);
}
j++;
}
}
else
{
// Matching keys, advance both
i++;
j++;
}
}
}
// Save current into previous
prevmod = curmod;
memcpy (prevscans, curscans, 6);
}
// Timer callback handler
void TimerCallback0(void)
{
if (audioCounter)
{
if (--audioCounter & 1)
{
// turn analog output on
analogWrite (APIN, curVol);
}
else
{
int id;
analogWrite (APIN, AOFF);
#if DOIDENT
if (audioCounter == 0 && (id = *idp) != 0)
{
++idp;
id *= IDUNIT;
if (id > 0)
{
curVol = VOL (4);
audioCounter = id;
}
else
{
curVol = AOFF;
audioCounter = -id;
}
}
#endif
}
}
// autorepeat
if (arDelay && --arDelay == 0)
{
// Yes, and it just expired
send (nextArKey);
nextArKey = 180; // Next time send metronome code
arDelay = arBuf->interval;
}
}
void setupTimer (int freq)
{
// Set up the flexible divider/compare
uint8_t divider = 1;
uint16_t compare = 0;
tc_clock_prescaler prescaler = TC_CLOCK_PRESCALER_DIV1;
if ((freq < 24000000) && (freq > 800)) {
divider = 1;
prescaler = TC_CLOCK_PRESCALER_DIV1;
compare = 48000000/freq;
} else if (freq > 400) {
divider = 2;
prescaler = TC_CLOCK_PRESCALER_DIV2;
compare = (48000000/2)/freq;
} else if (freq > 200) {
divider = 4;
prescaler = TC_CLOCK_PRESCALER_DIV4;
compare = (48000000/4)/freq;
} else if (freq > 100) {
divider = 8;
prescaler = TC_CLOCK_PRESCALER_DIV8;
compare = (48000000/8)/freq;
} else if (freq > 50) {
divider = 16;
prescaler = TC_CLOCK_PRESCALER_DIV16;
compare = (48000000/16)/freq;
} else if (freq > 12) {
divider = 64;
prescaler = TC_CLOCK_PRESCALER_DIV64;
compare = (48000000/64)/freq;
} else if (freq > 3) {
divider = 256;
prescaler = TC_CLOCK_PRESCALER_DIV256;
compare = (48000000/256)/freq;
} else if (freq >= 0.75) {
divider = 1024;
prescaler = TC_CLOCK_PRESCALER_DIV1024;
compare = (48000000/1024)/freq;
} else {
//Serial.println("Invalid frequency");
while (1) delay(10);
}
zerotimer.enable(false);
zerotimer.configure(prescaler, // prescaler
TC_COUNTER_SIZE_16BIT, // bit width of timer/counter
TC_WAVE_GENERATION_MATCH_PWM // frequency or PWM mode
);
zerotimer.setCompare(0, compare);
zerotimer.setCallback(true, TC_CALLBACK_CC_CHANNEL0, TimerCallback0);
zerotimer.enable(true);
}
// Initialize USB Controller
USBHost usb;
// Attach keyboard controller to USB
//KeyboardController keyboard(usb);
KeyboardRaw keyboard(usb);
uint32_t lastUSBstate = 0;
uint8_t curleds;
#define WAIT 1 // Wait LED (keyboard locked in RSTS)
#define COMPOS 2 // Compose mode
#define CAPS 4 // Caps/shift lock
#define HOLD 8 // Hold Screen
#define USB_COMPOS 1 // Num Lock
#define USB_CAPS 2 // Caps Lock
#define USB_HOLD 4 // Scroll lock
void changeLeds (uint8_t mask, bool on)
{
uint8_t usbLeds;
mask &= 0x0f;
if (on)
curleds |= mask;
else
curleds &= ~mask;
// Send command, if we know how and if USB is up and running.
if (kb_hid != NULL && usb.getUsbTaskState() == USB_STATE_RUNNING)
{
// The mapping from LK-201 LEDs to USB ones is simply a right
// shift by one.
usbLeds = curleds >> 1;
kb_hid->SetReport (0, 0, 2, 0, 1, &usbLeds);
if (curleds & 1)
{
// Wait LED -- use the 3-color LED on the Trinket
strip.setPixelColor(0, 0x002800); // green
strip.show();
}
else
{
strip.setPixelColor(0, 0x000000); // off
strip.show();
}
}
}
void resetkb ()
{
// Keyboard reset code
memcpy (modes, defmodes, sizeof (modes));
memcpy (ar, defar, sizeof (ar));
memcpy (arbufs, defarbufs, sizeof (arbufs));
// Reset current state
prevmod = 0;
memset (prevscans, 0, sizeof (prevscans));
downcnt = cmdcnt = 0;
clickOff = ctrlClick = bellOff = false;
clickVol = bellVol = DEFVOL;
arDelay = 0;
// Send reply
send (1);
send (0);
send (0);
send (0);
// Flash the LEDs
changeLeds (0x0f, true);
delay (100);
changeLeds (0x0f, false);
}
void setup()
{
Serial.begin( 4800 );
strip.begin(); // Initialize pins for output
strip.show(); // Turn all LEDs off ASAP
setupTimer (INTRATE);
analogWrite (APIN, AOFF);
#if DOIDENT
idp = ident;
audioCounter = 1;
#else
audioCounter = 0;
#endif
usb.Init();
delay( 20 );
}
void serialEvent()
{
while (Serial.available())
{
// get the new byte:
uint8_t inChar = (uint8_t)Serial.read();
if (inChar == 0xfd)
{
// Power up reset is recognized immediately
resetkb ();
return;
}
if (cmdcnt < sizeof (cmd))
{
cmd[cmdcnt++] = inChar;
}
// If not end of parameters, keep collecting
if ((inChar & 0x80) == 0)
continue;
const uint8_t op = cmd[0];
if ((op & 1) == 0)
{
// Mode or auto-repeat parameters
const int div = (op >> 3) & 0x0f;
const int modnum = (op >> 1) & 0x03;
if (div == 0x0f)
{
// Auto-repeat params. "modnum" is the buffer number
if (cmdcnt > 2)
{
arbufs[modnum].timeout = MS2DELAY ((cmd[1] & 0x7f) * 5);
int rate = cmd[2] & 0x7f;
if (rate < 12)
rate = 12;
arbufs[modnum].interval = RATE2DELAY (rate);
}
}
else
{
// Set mode
if (div > 0 && div < sizeof (modes) && modnum != 2)
{
modes[div] = modnum;
// Do AR buffer change if requested
if (cmdcnt > 1)
{
ar[div] = cmd[1] & 0x03;
}
}
// Ack the mode change
send (186);
}
}
else
{
switch (op)
{
case 0xab:
// Request keyboard ID
send (0);
send (0);
break;
case 0x11:
// LEDs off
changeLeds (cmd[1], false);
break;
case 0x13:
// LEDs on
changeLeds (cmd[1], true);
break;
case 0x99:
// Disable key click
clickOff = true;
break;
case 0x1b:
// Enable key click, set volume
clickOff = false;
clickVol = cmd[1] & 7;
break;
case 0xb9:
// Disable click for CTRL
ctrlClick = false;
break;
case 0xbb:
// Enable click for CTRL
ctrlClick = true;
break;
case 0x9f:
// sound click
doClick ();
break;
case 0xA1:
// Disable bell
bellOff = true;
break;
case 0x23:
// Enable bell, set volume
bellOff = false;
bellVol = cmd[1] & 7;
break;
case 0xa7:
// Sound bell
doBell ();
break;
case 0xc1:
// Inhibit autorepeat, current key only
arDelay = 0;
break;
}
}
// Reset command buffer
cmdcnt = 0;
}
}
void loop()
{
// Check for input
serialEvent();
// Process USB tasks
usb.Task();
uint32_t currentUSBstate = usb.getUsbTaskState();
if (lastUSBstate != currentUSBstate)
{
switch (currentUSBstate)
{
case USB_ATTACHED_SUBSTATE_SETTLE:
strip.setPixelColor(0, 0x280028); // purple
strip.show();
break;
case USB_DETACHED_SUBSTATE_WAIT_FOR_DEVICE:
strip.setPixelColor(0, 0x000028); // blue
strip.show();
break;
case USB_ATTACHED_SUBSTATE_RESET_DEVICE:
strip.setPixelColor(0, 0x282800); // yellow
strip.show();
break;
case USB_ATTACHED_SUBSTATE_WAIT_RESET_COMPLETE:
strip.setPixelColor(0, 0x281400); // orange
strip.show();
break;
case USB_STATE_CONFIGURING:
strip.setPixelColor(0, 0x002828); // cyan
strip.show();
break;
case USB_STATE_RUNNING:
strip.setPixelColor(0, 0x005500); // green, bright
strip.show();
resetkb ();
strip.setPixelColor(0, 0x000000); // off
strip.show();
break;
}
lastUSBstate = currentUSBstate;
}
}
Binary file not shown.
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,36 @@
/*
* ps2keypolled.h
* Copyright 2009 by Bill Westfield
*
* defines for polled interface to PS2-like keyboards.
*/
#ifdef __cplusplus
extern "C"{
#endif
extern unsigned char ps2k_getcode(void);
extern int ps2k_getkey(void);
extern void ps2k_sendbyte(unsigned char);
extern unsigned char ps2k_translate(int);
extern void ps2k_init (unsigned char clock, unsigned char data);
#ifdef __cplusplus
} // extern "C"
#endif
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
/*
* Value to add to "extended" keycodes. Can be 0x80 to fit in a singlpe
* byte, which ALMOST never conflicts with anything. Or it can be 100.
*/
#define PS2K_EXTEND 0x100
#define PS2K_NOKEY 0xFF
extern unsigned char ps2k_clk, ps2k_dat;
@@ -0,0 +1,647 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="generator" content="Website XSL Stylesheet V2.6.0">
<link rel="home" href="../../../../." title="Welcome to The NetBSD Project: Of course it runs NetBSD.">
<link rel="up" href="../../../../docs/Hardware/Machines/." title="Hardware Documentation - Machines">
<link rel="previous" href="../../../../docs/Hardware/Machines/ARC/." title="Advanced RISC Computing (ARC) Specification for the Advanced Computing Environment (ACE)">
<link rel="next" href="../../../../docs/Hardware/Machines/DEC/lk201_keycodes.html" title="LK201 Keycodes and Keyboard Divisions">
<link rel="first" href="../../../../docs/Hardware/Machines/ARC/." title="Advanced RISC Computing (ARC) Specification for the Advanced Computing Environment (ACE)">
<link rel="last" href="../../../../docs/Hardware/Machines/DEC/vax/." title="Hardware Documentation - Machines DEC - VAX hardware reference">
<link rel="stylesheet" href="../../../../global.css" type="text/css">
<link rel="stylesheet" href="../../../../donations/thermo/fundraiser.css" type="text/css">
<title>LK201 Interface</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
</head>
<body class="website"><div class="webpage" id="docs-Hardware-Machines-DEC-lk201">
<div id="top"><a href="#mainContent" id="skiplink" tabindex="1">Skip to main content.</a></div>
<input id="hamburger" type="checkbox"><label class="menuicon" for="hamburger"><span></span><span></span><span></span></label><div id="navBar" role="navigation">
<div id="centralHeader"><div id="logo">
<a href="../../../../"><img id="projectLogo" alt="" height="120" src="../../../../images/NetBSD-smaller-tb.png"></a><a href="/"><div id="fundraiser">
<br><div id="fundraiser-amount"><div id="fundraiser-raised"></div></div>
</div></a>
</div></div>
<span class="doNotDisplay">
Navigation:
</span><ul>
<li>
<a href="../../../../">
Home</a><ul>
<li><a href="../../../../changes/">
Recent changes</a></li>
<li><a href="//blog.NetBSD.org/">
NetBSD blog</a></li>
<li><a href="../../../../gallery/presentations/">
Presentations</a></li>
</ul>
</li>
<li>
<a href="../../../../about/">
About</a><ul>
<li><a href="../../../../people/developers.html">
Developers</a></li>
<li><a href="../../../../gallery/">
Gallery</a></li>
<li><a href="//wiki.NetBSD.org/ports/">
Ports</a></li>
<li><a href="//www.pkgsrc.org/">
Packages</a></li>
</ul>
</li>
<li>
<a href="../../../../docs/">
Documentation</a><ul>
<li><a href="../../../../docs/misc/index.html">
FAQ &amp; HOWTOs</a></li>
<li><a href="../../../../docs/guide/en/">
The Guide</a></li>
<li><a href="//man.NetBSD.org/">
Manual pages</a></li>
<li><a href="//wiki.NetBSD.org/">
Wiki</a></li>
</ul>
</li>
<li>
<a href="../../../../support/">
Support</a><ul>
<li><a href="/community/">
Community</a></li>
<li><a href="/mailinglists/">
Mailing lists</a></li>
<li><a href="../../../../support/send-pr.html">
Bug reports</a></li>
<li><a href="../../../../support/security/">
Security</a></li>
</ul>
</li>
<li>
<a href="../../../../developers/">
Developers</a><ul>
<li><a href="//cvsweb.NetBSD.org/">
CVSWeb</a></li>
<li><a href="//anonhg.NetBSD.org/">
Mercurial</a></li>
<li><a href="//nxr.NetBSD.org/">
Cross-reference</a></li>
<li><a href="//releng.NetBSD.org/">
Release engineering</a></li>
<li><a href="//wiki.NetBSD.org/projects/">
Projects list</a></li>
</ul>
</li>
</ul>
</div>
<div id="content"><div id="mainContent" class="fullWidth"><div class="rowOfBoxes">
<h1>LK201 Interface</h1>
<h2 class="title">LK201 Keyboard Interface</h2>
<h3 class="title">Overview</h3>
<ul><li><a href="#introduction">Introduction and Purpose</a></li></ul>
<h3 class="title">Electrical Interface</h3>
<ul>
<li><a href="#electrical">Electrical Specifications</a></li>
<li><a href="#pinout">Connector Pinout</a></li>
</ul>
<h3 class="title">Communications from the Keyboard to the Computer</h3>
<ul>
<li><a href="#lk2dec">Overview</a></li>
<li><a href="#kbdmodes">Keyboard Modes</a></li>
</ul>
<h3 class="title">Communications from the Computer to the Keyboard</h3>
<ul>
<li><a href="#dec2lk">Overview</a></li>
<li><a href="#led_control">LED Control</a></li>
<li><a href="#click_control">Key Click Control</a></li>
<li><a href="#bell_control"> Bell Control</a></li>
<li><a href="#key_control">Key Control</a></li>
<li><a href="#ar_control">Autorepeat Control</a></li>
<li><a href="#power_up">Power-Up and Self Test</a></li>
</ul>
<h3 class="title">References</h3>
<ul><li><a href="#references"> Sources of this Information</a></li></ul>
<h3 class="title">DISCLAIMER</h3>
<ul><li><a href="#nosmoke">No Fault</a></li></ul>
<hr>
<h3 class="title">Overview</h3>
<h4 class="title" id="introduction">Introduction and Purpose</h4>
<p>This page is intended to detail the DEC LK201 keyboard interface.
If anything on this page is unclear or incorrect, please contact <a class="ulink" href="mailto:dmcmahill@NetBSD.org" target="_top">me</a> and I will do my best to
clarify and/or correct the document.</p>
<hr>
<h3 class="title">Electrical Interface</h3>
<h4 class="title" id="electrical">Electrical Specifications</h4>
<p>This section describes the electrical interface between the LK201
Keyboard and the computer. Some of these specifications came from
publication EK-366AA-OG-002 "DECstation 5000, Model 200 Hardware
Operator's Guide, April 1990". The rest of the items in this section
were experimentally determined (like the pin outs).</p>
<p>The LK201 is powered from a 12 Volt supply generated by the
computer. The keyboard and the computer communicate via a fairly
standard serial interface. The key specifications are listed
here:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">Bidirectional asynchronous serial communication: 4800 baud, 8N1.</li>
<li class="listitem">Serial interface levels: EIA RS 423 (ie signals swing +/- 5 Volts).</li>
<li class="listitem">Power input: 4.2 Watts Max. 350 mA @ 11.8 Volts +/- 6%. (NOTE: This is the
value quoted in the manual, but I measured 30 mA on a working LK201.
Perhaps the 350 mA is the maximum the computer can supply?)</li>
</ul></div>
<h4 class="title" id="pinout">Connector Pinout</h4>
<p>The pinout of the connector on the LK201 and on the computer in jpeg and
postscript form are linked below.</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><a class="ulink" href="LK201_connector.jpg" target="_top">LK201 Connector Diagram (jpeg 29k)</a></li>
<li class="listitem"><a class="ulink" href="LK201_connector.ps" target="_top">LK201 Connector Diagram (postscript 12k)</a></li>
</ul></div>
<pre class="programlisting">
|----- data -&lt; -------------------------------------------|
| |-------- &gt;- Power -----------------------------| |
| | |------------- GND -------------------| | |
| | | |------------- &lt;- data -----| | | |
------------------- -------------------
| " " " " | | " " " " |
| L V G D | | D G V L |
| K + N E | | E N + K |
| -&gt; D C | | C D -&gt; |
| D -&gt; | | -&gt; D |
| E L | | L E |
| C K | | K C |
-- -- -- --
| | | |
-- -- -- --
| | | |
------- -------
Looking into the Looking into the DECstation
LK201 Connector Connector
(Socket on keyboard) (Socket on DECstation)
</pre>
<hr>
<h3 class="title">Communications from the Keyboard to the Computer</h3>
<h4 class="title" id="lk2dec">Overview</h4>
<p>The next two sections will refer to the following table and/or
diagram:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><a class="ulink" href="lk201_keycodes.html" target="_top">LK201 Keycode and Keyboard Division Table (html)</a></li>
<li class="listitem"><a class="ulink" href="LK201_large_keycodes.jpg" target="_top">LK201 Keycode and Keyboard Division Chart (in color) (jpg 67k)</a></li>
<li class="listitem"><a class="ulink" href="LK201_keycode.ps" target="_top">LK201 Keycode and Keyboard Division Chart (postscript 136k)</a></li>
</ul></div>
<p>(I had a hard time getting a jpeg version which was legible so
please bear with me on the postscript format for now.)</p>
<h4 class="title" id="kbdmodes">Keyboard Modes</h4>
<p>The LK201 keyboard has its keys divided into 14 distinct groups.
These groups are indicated on the <a class="ulink" href="#lk2dec" target="_top">LK201 Keycode
and Keyboard Division Chart/Table</a>. Each of the groups is
separately programmed for its behaviour with respect to keycode
generation. There are three operating modes to select from.</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<code class="code">LK_DOWN</code> mode: In this mode, the code indicated on the keycode chart
is transmitted by the keyboard when the corresponding key is pressed. If held
down, the key does <span class="emphasis"><em>not</em></span> repeat and no further codes are generated.</li>
<li class="listitem">
<code class="code">LK_AUTODOWN</code> mode: In this mode, the code indicated on the keycode chart
is transmitted by the keyboard when the corresponding key is pressed. If held down
the LK201 transmits the <code class="code">LK_REPEAT</code> value, <code class="code">0xB4</code>,repeatedly
at the key repeat rate. It is up to the computer to know what key is being
repeated.</li>
<li class="listitem">
<code class="code">LK_UPDOWN</code> mode: In this mode, the code indicated on the keycode chart
is transmitted by the keyboard when the corresponding key is pressed. In addition,
a code is generated when the key is released. The release code is determined by the
following rule. If no other keys in <code class="code">LK_UPDOWN</code> mode are pressed in addition
to the one being released, the <code class="code">LK_ALLUP</code>, <code class="code">0xB3</code> is generated.
If there is another key currently pressed which has been programmed for
<code class="code">LK_UPDOWN</code> mode, the code indicated on the keycode chart is used for
the key release code. If held, the key does <span class="emphasis"><em>not</em></span> repeat.
<code class="code">LK_UPDOWN</code> mode is used for keys such as <span class="emphasis"><em>SHIFT</em></span>, and
<span class="emphasis"><em>CONTROL</em></span>. The computer recognizes that the <span class="emphasis"><em>SHIFT</em></span> (or other
"modifying" key) has been pressed and not released. In this manner, the computer
knows to use the shifted character set. Once released, the computer sees the
release code and switches back to the normal character set.</li>
</ul></div>
<hr>
<h3 class="title">Communications from the Computer to the Keyboard</h3>
<h4 class="title" id="dec2lk">Overview</h4>
<p>The LK201 accepts a handful of commands from the computer. These
commands include programming the operational mode of each of the 14
groups of keys, control of the 4 LED's, control of the bell, and control
of keyclicks.</p>
<p>Commands are send to the keyboard as either single byte commands
or as a command byte followed by one data byte. Once again, the
communication is 4800 baud serial.</p>
<h4 class="title" id="led_control">LED Control</h4>
<p>The 4 LED's on the LK201 are controlled by the computer.
Either the command <code class="code">LK_LED_ENABLE</code> or
<code class="code">LK_LED_DISABLE</code> is sent followed by 1 byte
which indicates which of the 4 LED's are affected. The
lower 4 bits of the data byte correspond to the 4 LED's.
For example, to turn on the caps lock LED, the following
two bytes would be sent:</p>
<code class="code">
LK_LED_ENABLE LED_LOCK
</code>
<p>A sample code fragment which defines the LED control codes
is shown here.</p>
<pre class="programlisting">
/* requires LED number data */
#define LK_LED_ENABLE 0x13 /* light LED */
#define LK_LED_DISABLE 0x11 /* turn off LED */
#define LED_WAIT 0x81 /* Wait LED */
#define LED_COMP 0x82 /* Compose LED */
#define LED_LOCK 0x84 /* Lock LED */
#define LED_HOLD 0x88 /* Hold Screen LED */
#define LED_ALL 0x8F /* All LED's */
</pre>
<h4 class="title" id="click_control">Key Click Control</h4>
<p>The LK201 accepts several commands relating to key clicks.</p>
<pre class="programlisting">
/* Requires volume data byte */
#define LK_CL_ENABLE 0x1B /* keyclick enable. Requires volume */
/* byte. This does not affect the */
/* SHIFT key. The CTRL key requires */
/* LK_CL_ENABLE and LK_CCL_ENABLE to */
/* have been sent before it clicks. */
/* All other keys are only controlled */
/* by LK_CL_ENABLE. */
#define LK_CCL_ENABLE 0xBB /* Enable keyclicks for the CTRL key. */
/* The CTRL keyclick volume is set to */
/* be the same as the rest of the keys */
/* LK_CCL_ENABLE sets a flag in the */
/* keyboard with is logically AND'ed */
/* with the LK_CL_ENABLE flag to enable*/
/* CTRL key keyclicks. */
#define LK_CL_DISABLE 0x99 /* keyclick disable */
#define LK_CCL_DISABLE 0xB9 /* CTRL key keyclick disable */
#define LK_SOUND_CLICK 0x9F /* causes the LK201 to sound a keyclick*/
/* max volume is 0, lowest is 0x7 */
#define LK_PARAM_VOLUME(v) (0x80|((v)&amp;0x7))
</pre>
<p>For example, to enable keyclicks at full volume, the following data would
be sent to the keyboard:</p>
<code class="code">
LK_CL_ENABLE LK_PARAM_VOLUME(0x00)
</code>
<h4 class="title" id="bell_control"> Bell Control</h4>
<p>The keyboard bell control commands work in the same manner as the keyclick
commands. The keyboard never generates a bell sound on its own. A bell
sound is always at the command of the computer.</p>
<pre class="programlisting">
/* requires bell volume data */
#define LK_BELL_ENABLE 0x23 /* enable the keyboard bell. Requires */
/* volume data byte. */
#define LK_BELL_DISABLE 0xA1 /* disable the keyboard bell. */
#define LK_RING_BELL 0xA7 /* ring the keyboard bell */
/* max volume is 0, lowest is 0x7 */
#define LK_PARAM_VOLUME(v) (0x80|((v)&amp;0x7))
</pre>
<h4 class="title" id="key_control">Key Control</h4>
<p>The LK201 provides 3 different operating modes for the keys. In
addition, the keyboard is divided into 14 different groups which
are shown in the
<a class="ulink" href="LK201_keycode.ps" target="_top">LK201 Keycode and Keyboard Division Chart (postscript 136k)</a>
and also in the
<a class="ulink" href="lk201_keycodes.html" target="_top">LK201 Keycode and Keyboard Division Table (html)</a>.
The three operating modes are discussed in
<a class="ulink" href="#lk2dec" target="_top">2. Communications from the Keyboard to the Computer</a>.</p>
<p>Programming of the keyboard mode is accomplished via 1 byte per group of keys
on the keyboard. The macro <code class="code">LK_CMD_MODE()</code> is used to form the
command. For example, to set division 2 (the numeric keypad) to LK_AUTODOWN mode,
we would transmit:</p>
<code class="code">LK_CMD_MODE(LK_AUTODOWN,2)</code>
<p>Upon successful receipt of the command, the LK201 responds with
<code class="code">LK_MODECHG_ACK</code>. The macros and constants used for key mode
programming are listed below.</p>
<p>The details of the meaning of each bit in the mode command are
listed below.</p>
<pre class="programlisting">
bit 7: PARAM bit.
1 = no parameter to follow
0 = parameter will follow
bits 3-6: keyboard division
bits 1-2: mode (00 = down, 01=autodown, 11=updown)
bit 0: "type" don't know what that means, but should be set to 0.
</pre>
<p>In the examples below, the PARAM bit is set to 1 meaning that no
parameter will follow.</p>
<pre class="programlisting">
#define LK_UPDOWN 0x86
#define LK_AUTODOWN 0x82
#define LK_DOWN 0x80
#define LK_CMD_MODE(m,div) ((m)|((div)&lt;&lt;3))
#define LK_MODECHG_ACK 0xBA /* sent by the keyboard to acknowledge a */
/* successful mode change. */
#define LK_PFX_KEYDOWN 0xB9 /* indicates that the next byte is a key- */
/* code for a key already down in a */
/* division that has been changed to */
/* LK_UPDOWN. I think this means that if */
/* for example, the 'a' key is in LK_DOWN */
/* mode and the key is being held down and*/
/* division 1 is switched to LK_UPDOWN */
/* mode, the keyboard will produce the */
/* byte LK_PFX_KEYDOWN followed by 0xC2 */
/* (KEY_A). */
#define LK_CMD_RPT_TO_DOWN 0xD9 /* This command causes all divisions which */
/* are programmed for LK_AUTODOWN mode to */
/* be switched to LK_DOWN mode. */
#define LK_CMD_ENB_RPT 0xE3 /* enables auto repeat on the keys */
/* which are in LK_AUTODOWN mode */
#define LK_CMD_DIS_RPT 0xE1 /* disables auto repeat on all keys, but */
/* does not change the mode that the */
/* divisions are programmed to. */
#define LK_CMD_TMP_NORPT 0xD1 /* temporary auto repeat disable. This */
/* command disables auto repeat for the key*/
/* which is currently pressed down. Auto */
/* repeat is re-enabled when another key is*/
/* pressed. */
#define LK_INPUT_ERROR 0xB6 /* sent by the keyboard if it receives an */
/* invalid command. */
</pre>
<p>The LK201 contains 4 autorepeat registers. Each autorepeat
register controls how quickly keys repeat and if repeating is enabled.
The 4 autorepeat registers are independent. Each keyboard division can
be associated with 1 of the 4 registers. To associate a keyboard
division with a particular autorepeat register, use the same command as
setting the key division mode except set the PARAM bit to 0 and send a
second byte which controls which autorepeat register is selected. The
format of the second byte is:</p>
<pre class="programlisting">
bit7: 1
bits 2-6: 0
bits 0-1: number of the autorepeat register 00,01,10,11
</pre>
<p>For example, to set division 2 (the numeric keypad) to LK_AUTODOWN
mode, and associate it with autorepeat register number 2, we would
transmit: <code class="code">LK_CMD_MODE_AR(LK_AUTODOWN,2) 0x82</code> where the
macro <code class="code">LK_CMD_MODE_AR</code> is defined below.</p>
<pre class="programlisting">
#define LK_CMD_MODE_AR(m,div,arreg) (0x7F &amp; ((m)|((div)&lt;&lt;3)) )
</pre>
<h4 class="title" id="ar_control">Autorepeat Control</h4>
<p>The autorepeat rate is programmed by a 3 byte command.</p>
<pre class="programlisting">
first byte:
bit7: 0 (means more bytes to come after this one)
bits 3-6: 1 (means we're calling the rate change command)
bits 1-2: number of autorepeat register (00,01,10,11)
bit 0: "type" set to 0
second byte:
bit7: 0 (more bytes to come after this one)
bits0-6: time out value (how long to wait before beginning to autorepeat)
this is in 5 ms increments. allowed range is 5 ms-630 ms.
note: don't send 635ms, 0111 1111 is a reserved for internal use code.
note: don't send 0ms, 0000 0000 is illegal.
third byte:
bit7: 1 (no more bytes after this one)
bits0-6: autorepeat rate in number of generated key presses/second.
lowest rate is 12 Hz.
note: 125Hz (1111 1101) must not be sent (its identical to the powerup
command)
</pre>
<h4 class="title" id="power_up">Power-Up and Self Test</h4>
<p>This section details the self test features and the power up
sequence of the keyboard. Upon power-up, the keyboard performs a self
test in 70 ms or less. The results are sent to the computer. The
power-up self test results consist of 4 bytes.</p>
<pre class="programlisting">
Byte 1: Keyboard ID stored in the keyboard firmware. On
my LK201, this is 0x01.
Byte 2: Keyboard ID read from hardware jumpers. The documentation
I have doesn't seem to quite match my keyboard (the docs say
that the keyboard uses an 8051 microcontroller while mine
uses a 68HC05C4). Anyway, the docs and my keyboard both say
the result is 0x00.
Byte 3: Error code. This byte indicates the result of the self test.
Possible values are:
0x00 No Error
#define LK_KDOWN_ERROR 0x3D /* Key down on powerup error */
#define LK_POWER_ERROR 0x3E /* Keyboard failure on pwrup tst */
Byte 4: Keycode. This byte contains the keycode of which key (if any)
was pressed down on powerup. If no keys were pressed, this
byte is 0x00.
</pre>
<p>If the keyboard passes all power up tests with no error, the resulting
sequence sent to the computer is:</p>
<pre class="programlisting">0x01 0x00 0x00 0x00 </pre>
<p>If the keyboard finds a key down on the first scan, it continues
to look for an all up condition. When all keys are released, the
keyboard transmits the correct 4 byte sequence (0x01 0x00 0x00
0x00).</p>
<p>Additional test commands are listed below.</p>
<pre class="programlisting">
#define LK_CMD_POWER_UP 0xFD /* This command initiates the keyboard */
/* power up sequence. */
#define LK_CMD_REQ_ID 0xAB /* This command requests the 2 byte */
/* keyboard ID. The keyboard responds */
/* with the same Byte1 and Byte2 as in */
/* the power up self test. */
#define LK_CMD_SET_DEFAULTS 0xD3 /* Restores the keyboard to its default */
/* state. This command sets the: */
/* division mode settings, */
/* auto-repeat interval and timeout rate, */
/* auto-repeat buffer selections, */
/* audio volume, */
/* ctrl key keyclick setting, */
/* to their power up defaults. */
#define LK_CMD_TEST_MODE 0xCB /* causes the keyboard to enter the */
/* factory test mode. This command */
/* should not be used. If received, the */
/* keyboard responds with LK_TESTMODE_ACK */
/* By sending a 0x80, the keyboard will */
/* leave factory test mode and jump to the*/
/* power up sequence. */
#define LK_TESTMODE_ACK 0xB8 /* sent by the keyboard in response to */
/* the LK_CMD_TEST_MODE command. */
</pre>
<p>The following are some additional keyboard
control commands which didn't seem to fit anywhere else.</p>
<pre class="programlisting">
#define LK_CMD_INHIBIT 0xB9 /* This command suspends transmission */
/* the keyboard to the computer. The */
/* keyboard responds with LK_KBDLOCK_ACK */
/* and turns on the LOCK LED. */
#define LK_KDBLOCK_ACK 0xB7 /* send by the keyboard in response to */
/* the LK_CMD_INHIBIT command. */
#define LK_CMD_RESUME 0x8B /* Resumes normal keyboard operation after*/
/* the LK_CMD_INHIBIT command. */
#define LK_OUTPUT_ERROR 0xB5 /* If any keystrokes were lost while the */
/* keyboard was locked (LK_CMD_INHIBIT), */
/* then LK_OUTPUT_ERROR is generated by */
/* the keyboard when LK_CMD_RESUME is */
/* received. */
</pre>
<hr>
<h3 class="title">References</h3>
<h4 class="title" id="references"> Sources of this Information</h4>
<p>Much of this information came from NetBSD sources from mid-March,
1998. In particular, the files <code class="code">lk201.h</code> and
<code class="code">lk201.c</code> from <code class="code">src/sys/arch/pmax/dev/</code> is the
source of most of the code fragments on this page. Additional hints
came from the X11R5 Xserver code for <a class="ulink" href="http://www.openbsd.org" target="_top">OpenBSD</a> (I think the OpenBSD and
NetBSD Xserver's are largely the same, at least with respect to the
keyboard stuff). I also got some good hints and a few
<code class="code">#define</code>'s from an unknown version of Mach from Carnegie
Mellon. The files in the Mach source I looked at were also called
<code class="code">lk201.h</code> and <code class="code">lk201.c</code>, but were not the same as
the NetBSD files of the same names.</p>
<p>In addition to poking around the various pieces of code mentioned
above, I hooked an LK201 up to the serial port on a NetBSD/mac68k
machine and spent some time experimenting with the keyboard and the
various control sequences. This is how I convinced myself of what the
14 keyboard divisions are. This test setup was invaluable for seeing
exactly what the keyboard produces and how it reacts to known
commands.</p>
<p>The text version of the keycodes and keyboard divisions was sent
to me by <a class="ulink" href="mailto:djv@bedford.net" target="_top">Dave</a>. My brother,
<a class="ulink" href="http://www.cs.cmu.edu/~jmcm/" target="_top">Jeff</a>, was also a big
help in answering many <code class="code">C</code> questions and pointing me towards
the Mach code.</p>
<p>In addition, I got a copy rather late in the writing of this page
of what could be considered the "real" document for all this stuff.
"VCB02 Video Subsystem Technical Manual" DEC Educational Services,
AZ-GLGAB-MN, February 1986 The appendix of this document cleaned out
most of the remaining mysteries.</p>
<hr>
<h3 class="title">DISCLAIMER</h3>
<h4 class="title" id="nosmoke">No Fault</h4>
<p>Any software and documentation here is provided "as is", no
warranty, use at your own risk. Please do not hook up your LK201 and/or
computer backwards and blame me!</p>
</div></div></div>
<div class="navfoot"></div>
<div id="footer"><div id="footerContent">
<span class="footfeed"><a href="//www.NetBSD.org/cgi-bin/feedback.cgi">
Contact</a> |
</span><span class="footcopy"><a href="../../../../about/disclaimer.html">
Disclaimer</a> |
<span class="copyright">Copyright © 1994-2026 The NetBSD Foundation, Inc. </span>ALL RIGHTS RESERVED.<br>NetBSD<sup>®</sup> is a registered trademark of The NetBSD
Foundation, Inc.</span>
</div></div>
</div></body>
</html>
@@ -0,0 +1,316 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="generator" content="Website XSL Stylesheet V2.6.0">
<link rel="home" href="../../../../." title="Welcome to The NetBSD Project: Of course it runs NetBSD.">
<link rel="up" href="../../../../docs/Hardware/Machines/." title="Hardware Documentation - Machines">
<link rel="previous" href="../../../../docs/Hardware/Machines/DEC/lk201.html" title="LK201 Interface">
<link rel="next" href="../../../../docs/Hardware/Machines/DEC/vax/." title="Hardware Documentation - Machines DEC - VAX hardware reference">
<link rel="first" href="../../../../docs/Hardware/Machines/ARC/." title="Advanced RISC Computing (ARC) Specification for the Advanced Computing Environment (ACE)">
<link rel="last" href="../../../../docs/Hardware/Machines/DEC/vax/." title="Hardware Documentation - Machines DEC - VAX hardware reference">
<link rel="stylesheet" href="../../../../global.css" type="text/css">
<link rel="stylesheet" href="../../../../donations/thermo/fundraiser.css" type="text/css">
<title>LK201 Keycodes and Keyboard Divisions</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
</head>
<body class="website"><div class="webpage" id="docs-Hardware-Machines-DEC-lk201_keycodes">
<div id="top"><a href="#mainContent" id="skiplink" tabindex="1">Skip to main content.</a></div>
<input id="hamburger" type="checkbox"><label class="menuicon" for="hamburger"><span></span><span></span><span></span></label><div id="navBar" role="navigation">
<div id="centralHeader"><div id="logo">
<a href="../../../../"><img id="projectLogo" alt="" height="120" src="../../../../images/NetBSD-smaller-tb.png"></a><a href="/"><div id="fundraiser">
<br><div id="fundraiser-amount"><div id="fundraiser-raised"></div></div>
</div></a>
</div></div>
<span class="doNotDisplay">
Navigation:
</span><ul>
<li>
<a href="../../../../">
Home</a><ul>
<li><a href="../../../../changes/">
Recent changes</a></li>
<li><a href="//blog.NetBSD.org/">
NetBSD blog</a></li>
<li><a href="../../../../gallery/presentations/">
Presentations</a></li>
</ul>
</li>
<li>
<a href="../../../../about/">
About</a><ul>
<li><a href="../../../../people/developers.html">
Developers</a></li>
<li><a href="../../../../gallery/">
Gallery</a></li>
<li><a href="//wiki.NetBSD.org/ports/">
Ports</a></li>
<li><a href="//www.pkgsrc.org/">
Packages</a></li>
</ul>
</li>
<li>
<a href="../../../../docs/">
Documentation</a><ul>
<li><a href="../../../../docs/misc/index.html">
FAQ &amp; HOWTOs</a></li>
<li><a href="../../../../docs/guide/en/">
The Guide</a></li>
<li><a href="//man.NetBSD.org/">
Manual pages</a></li>
<li><a href="//wiki.NetBSD.org/">
Wiki</a></li>
</ul>
</li>
<li>
<a href="../../../../support/">
Support</a><ul>
<li><a href="/community/">
Community</a></li>
<li><a href="/mailinglists/">
Mailing lists</a></li>
<li><a href="../../../../support/send-pr.html">
Bug reports</a></li>
<li><a href="../../../../support/security/">
Security</a></li>
</ul>
</li>
<li>
<a href="../../../../developers/">
Developers</a><ul>
<li><a href="//cvsweb.NetBSD.org/">
CVSWeb</a></li>
<li><a href="//anonhg.NetBSD.org/">
Mercurial</a></li>
<li><a href="//nxr.NetBSD.org/">
Cross-reference</a></li>
<li><a href="//releng.NetBSD.org/">
Release engineering</a></li>
<li><a href="//wiki.NetBSD.org/projects/">
Projects list</a></li>
</ul>
</li>
</ul>
</div>
<div id="content"><div id="mainContent" class="fullWidth"><div class="rowOfBoxes">
<h1>LK201 Keycodes and Keyboard Divisions</h1>
<div class="sect1" id="kkd">
<div class="titlepage"><h2 class="titlepage">LK201 Keycodes and Keyboard Divisions</h2></div>
<div class="sect2" id="div1">
<div class="titlepage"><h3 class="titlepage">Key Division 1: (191 - 255)</h3></div>
<pre class="programlisting">
191 (xbf): KEY_TILDE
192 (xc0): KEY_TR_1
193 (xc1): KEY_Q
194 (xc2): KEY_A
195 (xc3): KEY_Z
197 (xc5): KEY_TR_2
198 (xc6): KEY_W
199 (xc7): KEY_S
200 (xc8): KEY_X
201 (xc9): KEY_LANGLE_RANGLE
203 (xcb): KEY_TR_3
204 (xcc): KEY_E
205 (xcd): KEY_D
206 (xce): KEY_C
208 (xd0): KEY_TR_4
209 (xd1): KEY_R
210 (xd2): KEY_F
211 (xd3): KEY_V
212 (xd4): KEY_SPACE
214 (xd6): KEY_TR_5
215 (xd7): KEY_T
216 (xd8): KEY_G
217 (xd9): KEY_B
219 (xdb): KEY_TR_6
220 (xdc): KEY_Y
221 (xdd): KEY_H
222 (xde): KEY_N
224 (xe0): KEY_TR_7
225 (xe1): KEY_U
226 (xe2): KEY_J
227 (xe3): KEY_M
229 (xe5): KEY_TR_8
230 (xe6): KEY_I
231 (xe7): KEY_K
232 (xe8): KEY_COMMA
234 (xea): KEY_TR_9
235 (xeb): KEY_O
236 (xec): KEY_L
237 (xed): KEY_PERIOD
239 (xef): KEY_TR_0
240 (xf0): KEY_P
242 (xf2): KEY_SEMICOLON
243 (xf3): KEY_QMARK
245 (xf5): KEY_PLUS
246 (xf6): KEY_RBRACE
247 (xf7): KEY_VBAR
249 (xf9): KEY_UBAR
250 (xfa): KEY_LBRACE
251 (xfb): KEY_QUOTE
</pre>
</div>
<div class="sect2" id="div2">
<div class="titlepage"><h3 class="titlepage">Key Division 2: (145 - 165)</h3></div>
<pre class="programlisting">
146 (x92): KEY_KP_0
148 (x94): KEY_KP_PERIOD
149 (x95): KEY_KP_ENTER
150 (x96): KEY_KP_1
151 (x97): KEY_KP_2
152 (x98): KEY_KP_3
153 (x99): KEY_KP_4
154 (x9a): KEY_KP_5
155 (x9b): KEY_KP_6
156 (x9c): KEY_KP_COMMA
157 (x9d): KEY_KP_7
158 (x9e): KEY_KP_8
159 (x9f): KEY_KP_9
160 (xa0): KEY_KP_HYPHEN
161 (xa1): KEY_KP_PF1
162 (xa2): KEY_KP_PF2
163 (xa3): KEY_KP_PF3
164 (xa4): KEY_KP_PF4
</pre>
</div>
<div class="sect2" id="div3">
<div class="titlepage"><h3 class="titlepage">Key Division 3: (188 - 188)</h3></div>
<pre class="programlisting">
188 (xbc): KEY_DELETE
</pre>
</div>
<div class="sect2" id="div4">
<div class="titlepage"><h3 class="titlepage">Key Division 4: (189 - 190)</h3></div>
<pre class="programlisting">
189 (xbd): KEY_RETURN
190 (xbe): KEY_TAB
</pre>
</div>
<div class="sect2" id="div5">
<div class="titlepage"><h3 class="titlepage">Key Division 5: (176 - 178)</h3></div>
<pre class="programlisting">
176 (xb0): KEY_LOCK
177 (xb1): KEY_META
</pre>
</div>
<div class="sect2" id="div6">
<div class="titlepage"><h3 class="titlepage">Key Division 6: (173 - 175)</h3></div>
<pre class="programlisting">
174 (xae): KEY_SHIFT
175 (xaf): KEY_CTRL
</pre>
</div>
<div class="sect2" id="div7">
<div class="titlepage"><h3 class="titlepage">Key Division 7: (166 - 168)</h3></div>
<pre class="programlisting">
167 (xa7): KEY_LEFT
168 (xa8): KEY_RIGHT
</pre>
</div>
<div class="sect2" id="div8">
<div class="titlepage"><h3 class="titlepage">Key Division 8: (169 - 172)</h3></div>
<pre class="programlisting">
169 (xa9): KEY_DOWN
170 (xaa): KEY_UP
171 (xab): KEY_R_SHIFT
</pre>
</div>
<div class="sect2" id="div9">
<div class="titlepage"><h3 class="titlepage">Key Division 9: (136 - 144)</h3></div>
<pre class="programlisting">
138 (x8a): KEY_FIND
139 (x8b): KEY_INSERT_HERE
140 (x8c): KEY_REMOVE
141 (x8d): KEY_SELECT
142 (x8e): KEY_PREV_SCREEN
143 (x8f): KEY_NEXT_SCREEN
</pre>
</div>
<div class="sect2" id="div10">
<div class="titlepage"><h3 class="titlepage">Key Division 10: (86 - 98)</h3></div>
<pre class="programlisting">
86 (x56): KEY_F1
87 (x57): KEY_F2
88 (x58): KEY_F3
89 (x59): KEY_F4
90 (x5a): KEY_F5
</pre>
</div>
<div class="sect2" id="div11">
<div class="titlepage"><h3 class="titlepage">Key Division 11: (99 - 110)</h3></div>
<pre class="programlisting">
100 (x64): KEY_F6
101 (x65): KEY_F7
102 (x66): KEY_F8
103 (x67): KEY_F9
104 (x68): KEY_F10
</pre>
</div>
<div class="sect2" id="div12">
<div class="titlepage"><h3 class="titlepage">Key Division 12: (111 - 122)</h3></div>
<pre class="programlisting">
113 (x71): KEY_F11
114 (x72): KEY_F12
115 (x73): KEY_F13
116 (x74): KEY_F14
</pre>
</div>
<div class="sect2" id="div13">
<div class="titlepage"><h3 class="titlepage">Key Division 13: (123 - 125)</h3></div>
<pre class="programlisting">
124 (x7c): KEY_HELP
125 (x7d): KEY_MENU
</pre>
</div>
<div class="sect2" id="div14">
<div class="titlepage"><h3 class="titlepage">Key Division 14: (126 - 135)</h3></div>
<pre class="programlisting">
128 (x80): KEY_F17
129 (x81): KEY_F18
130 (x82): KEY_F19
131 (x83): KEY_F20
</pre>
</div>
</div>
</div></div></div>
<div class="navfoot"></div>
<div id="footer"><div id="footerContent">
<span class="footfeed"><a href="//www.NetBSD.org/cgi-bin/feedback.cgi">
Contact</a> |
</span><span class="footcopy"><a href="../../../../about/disclaimer.html">
Disclaimer</a> |
<span class="copyright">Copyright © 1994-2026 The NetBSD Foundation, Inc. </span>ALL RIGHTS RESERVED.<br>NetBSD<sup>®</sup> is a registered trademark of The NetBSD
Foundation, Inc.</span>
</div></div>
</div></body>
</html>
@@ -0,0 +1,177 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>VaxArchive</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<style type="text/css">
body {
padding-top: 20px;
padding-bottom: 40px;
}
/* Custom container */
.container-narrow {
margin: 0 auto;
max-width: 700px;
}
.container-narrow>hr {
margin: 30px 0;
}
/* Main marketing message and sign up button */
.jumbotron {
margin: 60px 0;
text-align: center;
}
.jumbotron h1 {
font-size: 72px;
line-height: 1;
}
.jumbotron .btn {
font-size: 21px;
padding: 14px 24px;
}
/* Supporting marketing content */
.marketing {
margin: 60px 0;
}
.marketing p+h4 {
margin-top: 28px;
}
</style>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="/js/html5shiv.js"></script>
<![endif]-->
<!-- Fav and touch icons -->
<!--<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="../assets/ico/favicon.png">-->
</head>
<body>
<div class="container-narrow">
<div class="masthead">
<h3 class="muted"><img src="../vaxarch.gif"/></h3>
<a href="https://github.com/teverett/vaxarchive"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"></a>
</div>
<hr> <div class="row-fluid marketing">
<div class="span12">
<h3>The DEC round mouse VSXXX-AA</h3>
</div>
</div>
<pre>
Newsgroups: comp.sys.dec
Subject: Re: Ode to the DEC Round Mouse
Date: Mon, 12 Oct 1998 16:38:06 -0400
Organization: OpenVMS Engineering
Message-Id: <3622306E.6B4F7244@star.enet.dec_nospam.com>
[The mouse pin-out is...]
1 GND
2 TXD
3 RXD
4 -12v
5 +5v
6 Not Used
7 Device Present (shorted to pin 1)
Shell - protective ground
Power: +5v +/- 5% at < 150 mA
-8v to -13v at < 20 mA
Signals: RS-232 voltage-level-compatable
4800 baud, 1 stop bit. odd parity. parity ignored on incomming
data (it also ignores bit 7).
7-pin mico-DIN (male). Pin out (+ == connector key):
+
5 6 7
3 4
+1 2+
Commands:
R Select incremental stream mode
D Select prompt mode
P Request mouse position (also enters prompt mode)
T Self test, & identify
Z xx Reserved (test functions)
Data format:
7 6 5 4 3 2 1 0
-------------------------------------
1 0 0 sx sy L M R Byte 1
0 x6 x5 x4 x3 x2 x1 x0 Byte 2
0 y6 y5 y4 y3 y2 y1 y0 Byte 3
Bit 7, byte 1 - Phasing. Bit 7 always clear for byte 2 & 3
Byte DATA bits 5 & 6 always 0
sx, sy sign bits. 1= positive, 0 = negative
L, M, R - button bits, 1 = depressed
X6-X0 - X displacement
Y6-Y0 - Y displacement
Self test, and power up:
7 6 5 4 3 2 1 0
-------------------------------------
1 0 1 0 r3 r2 r1 r0 Byte 1
0 m2 m1 m0 0 0 1 0 Byte 2
0 e6 e5 e4 e3 e2 e1 e0 Byte 3
0 0 0 0 0 L M R Byte 4
Byte 1, bit 7 always set.
Byte 1 bit 6 always clear, bit 5 always set -- MOUSE connected.
R3-R0 - revision
M2-M0 - Maufacturer location code
E6-E0 - Error code
L, M, R - If byte 3 is "=" (0x3d) - button error, mask determines
which button), if byte 3 is > 0x20 other error, if byte 3 < 0x20
no error, LMR are current button state.
</pre>
<p>Thanks to Fred Kleinsorge <kleinsorge@star.enet.dec_nospam.com></p>
<hr>
<div class="footer">
</div>
</body>
</html>
</body>
</html>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,237 @@
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8"/>
<title>LK201 Keyboard</title>
<meta name="viewport" content="width=device-width"/>
<link href="terminal.css" rel="stylesheet"/>
<link href="dark-support.css" rel="stylesheet"/>
<link rel="icon" href="cover-logo-096.png" sizes="96x96"/>
</head>
<body>
<header>
<nav class="breadcrumbs">
<ol>
<li><a href="./"><svg xmlns="http://www.w3.org/2000/svg" width="92" height="16" version="1.1" id="vt100-net-site-logo">
<title>VT100.net</title>
<style>
.blk { fill: #000000 }
.g25 { fill: #626262 }
.g50 { fill: #9b9b9b }
.g75 { fill: #cccccc }
.grd { fill: #006600 }
.grl { fill: #00ff00 }
.scanlines { fill: black; stroke: #5e5e5e; stroke-width: 0.4; paint-order:stroke fill markers }
.dotnet { fill: #404040 }
@media (prefers-color-scheme: dark) {
.blk { fill: #626262 }
.g25 { fill: #9b9b9b }
.g50 { fill: #cccccc }
.g75 { fill: #ffffff }
.scanlines { fill: #00ff00; stroke: #009900 }
.dotnet { fill: #909090 }
}
</style>
<g id="term">
<rect class="g50" x="05" y="02" width="9" height="1"/>
<rect class="blk" x="14" y="02" height="1" width="1"/>
<rect class="g50" x="04" y="03" width="11" height="8"/>
<rect class="g25" x="05" y="03" width="9" height="7"/>
<rect class="blk" x="15" y="03" height="8" width="1"/>
<rect class="blk" x="06" y="04" width="8" height="6"/>
<rect class="grd" x="07" y="05" width="6" height="4"/>
<rect class="grl" x="08" y="05" width="1" height="1"/>
<rect class="grl" x="10" y="05" width="1" height="1"/>
<rect class="grl" x="07" y="06" width="1" height="1"/>
<rect class="grl" x="09" y="06" width="1" height="1"/>
<rect class="grl" x="08" y="07" width="1" height="1"/>
<rect class="grl" x="10" y="07" width="1" height="1"/>
<rect class="blk" x="05" y="11" height="1" width="10"/>
<rect class="blk" x="07" y="12" width="1" height="1"/>
<rect class="g25" x="08" y="12" width="4" height="1"/>
<rect class="blk" x="12" y="12" width="1" height="1"/>
<rect class="g25" x="03" y="13" width="13" height="1"/>
<rect class="g75" x="04" y="13" width="1" height="1"/>
<rect class="g75" x="06" y="13" width="1" height="1"/>
<rect class="g75" x="08" y="13" width="1" height="1"/>
<rect class="g75" x="10" y="13" width="1" height="1"/>
<rect class="g75" x="12" y="13" width="1" height="1"/>
<rect class="g75" x="14" y="13" width="1" height="1"/>
<rect class="blk" x="16" y="13" width="1" height="1"/>
<rect class="g25" x="02" y="14" width="15" height="1"/>
<rect class="blk" x="17" y="14" width="1" height="1"/>
<rect class="blk" x="02" y="15" width="16" height="1"/>
</g>
<g id="g1754" style="display:inline">
<g class="scanlines">
<path d="m 21.632883,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.37601,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.37601,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.37601,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -4.480009,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 3.584007,0 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -3.584007,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 3.584007,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -2.688005,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 3.210673 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -3.210673 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 3.210673 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -3.210673 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0.896002,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1765"/>
<path d="m 30.342891,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 6.794678 c 0.112001,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -6.794678 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 2.688004,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 0,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 0,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 0,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.41867 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.41867 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.41867 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.41867 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.41867 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.41867 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1767"/>
<path d="m 40.490903,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -0.896002,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 2.314671 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -2.314671 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -0.896001,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 3.210672 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -3.210672 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 1.792003,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 0,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m -1.792003,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 5.002676 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -5.002676 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1769"/>
<path class="scanlines" d="m 47.80491,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 3.210673 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -3.210673 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -0.896002,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 3.584007,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -4.480008,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.37601,0 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.37601,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.37601,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.37601,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 5.37601,0 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112001,0 -0.186667,0.205334 -0.186667,0.466667 z m -4.480009,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.41867 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.41867 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 3.584007,0 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m -2.688005,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 3.210673 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -3.210673 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1771"/>
<path class="scanlines" d="m 56.514917,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 3.210672 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -3.210672 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -0.896002,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112001,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 3.584007,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -4.480008,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.376009,0 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112001,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.376009,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.376009,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112001,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.376009,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112001,0 -0.186667,0.205334 -0.186667,0.466667 z m 5.376009,0 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112001,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m -4.480008,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112001,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 3.584007,0 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112001,0 -0.186667,0.205334 -0.186667,0.466667 z m -2.688005,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 3.210672 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -3.210672 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1773"/>
</g>
<g class="dotnet">
<path d="m 65.076956,12.647997 q 0.466667,0 0.784001,0.336 q 0.336001,0.336001 0.336001,0.802669 q 0,0.504 -0.354668,0.858668 q -0.354667,0.354667 -0.858668,0.354667 q -0.448001,0 -0.802668,-0.298667 q -0.336001,-0.298667 -0.336001,-0.746668 q 0,-0.541335 0.354668,-0.914669 q 0.354667,-0.392 0.877335,-0.392 z" id="path1756"/>
<path d="m 68.362297,13.394665 l 1.661336,-4.6480086 q 0.112,-0.2240004 0.09333,-0.5040009 q -0.01867,-0.2800005 -0.224001,-0.2800005 q -0.410667,0 -0.933335,0.4293341 q -0.504001,0.4106674 -0.578668,0.4106674 q -0.205333,0 -0.205333,-0.3920007 q 0,-0.3920007 0.858668,-1.1013353 q 0.858668,-0.7093346 1.680003,-0.7093346 q 1.064002,0 0.634668,1.86667 q -0.01867,0.093333 0.056,0.1306669 q 0.07467,0.037333 0.149334,-0.018667 q 1.997336,-1.9786702 3.714673,-1.9786702 q 0.634668,0 0.765335,0.7840014 q 0.149333,0.7653347 -0.168001,1.6426696 l -1.437336,4.1253411 q -0.112,0.317334 0.149334,0.317334 q 0.392001,0 0.914668,-0.448001 q 0.522668,-0.448001 0.616001,-0.448001 q 0.130667,0 0.130667,0.242667 q 0,0.522668 -0.952001,1.306669 q -0.952002,0.765335 -1.75467,0.765335 q -0.821335,0 -0.821335,-0.765335 q 0,-0.28 0.112,-0.578668 l 1.493336,-4.2560073 q 0.597335,-1.6426696 -0.01867,-1.6426696 q -0.840001,0 -1.848003,1.1573354 q -1.008002,1.1573354 -1.773336,2.6133385 q -0.746668,1.437335 -1.269336,2.893338 q -0.186667,0.560001 -0.448001,0.578668 q -0.224,0.01867 -0.560001,-0.186667 q -0.317334,-0.186667 -0.317334,-0.280001 q 0,-0.224 0.280001,-1.026668 z" id="path1758"/>
<path d="m 79.487639,10.071992 q 0,0.130667 0.112,0.130667 q 1.026669,0 1.829337,-0.8026681 q 0.821335,-0.8213348 0.821335,-1.6053362 q 0,-0.4480008 -0.672001,-0.4480008 q -0.448001,0 -1.269336,1.0266685 q -0.821335,1.0080018 -0.821335,1.6986696 z m 2.370671,-3.4720061 q 1.792003,0 1.792003,1.4373359 q 0,1.0453352 -1.512002,1.9600035 q -1.493336,0.8960017 -2.725339,0.8960017 q -0.130667,0 -0.224,0.317334 q -0.09333,0.298667 -0.09333,0.616001 q 0,0.728001 0.280001,1.250669 q 0.28,0.522668 0.858668,0.522668 q 0.373334,0 0.802668,-0.205334 q 0.429334,-0.224001 0.728002,-0.448001 q 0.298667,-0.224 0.354667,-0.224 q 0.261334,0 0.261334,0.448 q 0,0.429335 -0.989335,1.064002 q -0.989336,0.616001 -1.978671,0.616001 q -0.914668,0 -1.437336,-0.821334 q -0.522667,-0.821335 -0.522667,-1.885337 q 0,-2.053337 1.400002,-3.7893403 q 1.400003,-1.7546698 3.005339,-1.7546698 z" id="path1760"/>
<path d="m 87.663666,4.9759829 q 0.317334,0 0.317334,0.4666675 q 0,0.4480009 -0.280001,1.5306695 h 1.885337 q 0.485334,0 0.485334,0.2800005 q 0,0.186667 -0.298667,0.4853342 q -0.280001,0.2800005 -0.560001,0.2800005 h -1.736003 l -1.362669,5.1333429 q -0.07467,0.317334 0.149333,0.317334 q 0.392001,0 0.914668,-0.448001 q 0.522668,-0.448001 0.616002,-0.448001 q 0.130666,0 0.130666,0.242667 q 0,0.522668 -0.914668,1.306669 q -0.896001,0.765335 -1.69867,0.765335 q -0.821334,0 -0.821334,-0.765335 q 0,-0.130667 0.112,-0.578668 l 1.456002,-5.5253429 h -0.877334 q -0.429335,0 -0.429335,-0.2613338 q 0,-0.2426671 0.242668,-0.5040009 q 0.261333,-0.2800005 0.541334,-0.2800005 h 0.746668 l 0.261334,-1.0453352 q 0.03733,-0.2240005 0.373334,-0.5786678 q 0.354667,-0.373334 0.746668,-0.373334 z" id="path1762"/>
</g>
</g>
</svg></a></li>
<li><a href="dec/">DEC</a></li>
</ol>
</nav>
</header>
<h1>LK201 Keyboard</h1>
<p>The VT320 came with an LK201 keyboard, although it works quite happily with
an LK401, which comes with the newer VT420. I haven't had much luck deciphering
the initial conversation that takes place between the VT320 and an LK201 just
by running the VT320 firmware on my emulator. All I know so far is that the
terminal expects to see four bytes when the keyboard powers up. (That last
sentence sounds odd, because the keyboard obviously powers up at the same time
as the terminal. What I mean is that the keyboard has its own microcontroller,
a Motorola MC68HC05 and it does some of its own tests before talking to the
terminal).</p>
<p>Dan McMahill has produced a great document which explains the
<a href="https://www.netbsd.org/docs/Hardware/Machines/DEC/lk201.html">LK201
Keyboard Interface</a>. That helped explain what the first four bytes should
be, as well as explaining the characteristics of the serial link between the
terminal and the keyboard.</p>
<h2>Startup without errors</h2>
<p>I've now hacked into the keyboard wire and tapped off the data connections
into a 25-way D-type connector, so I can watch the initial conversation on
my shiny ARC Protocol Analyser. The conversation below is between
a VT320 with Rev 1.2 firmware and an LK201 with Rev D01 firmware.
I don't have any timing information for this, so it is occasionally unclear
which byte came first when one from each end is shown vertically aligned.
I believe that where two bytes are vertically aligned, the keyboard one
was sent first. That makes more sense, though I haven't proved it.</p>
<pre style="overflow:scroll">
All bytes are shown in hex. VT = terminal, KB = keyboard.
VT 55 11 8F 13 82 11 8F 13 83 11 8F 13 84 11 8F 13 85 11 8F 13 84
KB 01 00 00 00 B6 BA
VT 11 8F 13 85 11 8F 13 84 11 8F 13 85 11 8F 13 88 11 8F 13 89 11 8F 13 90
KB
VT FD 0A 80 12 81 1A 80 3A 81 42 81 4A 82 5A 82 62 82 6A 82 72 82
KB 01 00 00 00 BA BA BA BA BA BA BA BA BA
VT A2 78 64 9E 7A 64 9E 7C 64 9E 99 E3 11 8F 13 80 11 8E 13 81 FD
KB BA BA 01 00 00
VT 0A 80 12 81 1A 80 3A 81 42 81 4A 82 5A 82 62 82 6A 82 72 82 A2 78 64
KB 00 BA BA BA BA BA BA BA BA BA BA BA
VT 9E 7A 64 9E 7C 64 9E 99 E3 11 8F 13 80 A7 11 8E 13 81 11 8F 13 80
KB
</pre>
<p>All of the above conversation takes place during the terminal's POST
(Power-on Self Test) before a single key has been pressed! However, it is
repetitive and I've decoded it with the help of Dan's document and
correspondence with him.</p>
<p>When the VT sends <code>13</code> or <code>11</code> followed by one byte,
it is turning one or
more of the keyboard LEDs on or off, respectively. Having disregarded these,
the next biggest chunk of commands and responses are to do with setting up
the modes of certain keyboard divisions, ie. whether the keyboard should
report key up and/or key down transitions and whether auto-repeat is enabled.</p>
<pre style="overflow:scroll">
div mm rr
0A 80 -&gt; 0 0001 01 0 100000 00 Set keyboard division 1 (letter keys)
to autodown mode and use autorepeat
register 0.
12 81 -&gt; 0 0010 01 0 100000 01 Div 2 (numeric keypad), autodown, reg 1
1A 80 -&gt; 0 0011 01 0 100000 00 Div 3 (Delete key), autodown, reg 0
3A 81 -&gt; 0 0111 01 0 100000 00 Div 7 (left/right arrows), autodown, reg 0
42 81 -&gt; 0 1000 01 0 100000 01 Div 8 (up/down arrows), autodown, reg 1
4A 82 -&gt; 0 1001 01 0 100000 10 Div 9 (E1-E6), autodown, reg 2
5A 82 -&gt; 0 1011 01 0 100000 10 Div 11 (F6-F10), autodown, reg 2
62 82 -&gt; 0 1100 01 0 100000 10 Div 12 (F11-F14), autodown, reg 2
6A 82 -&gt; 0 1101 01 0 100000 10 Div 13 (Help,Do), autodown, reg 2
72 82 -&gt; 0 1110 01 0 100000 10 Div 14 (F17-F20), autodown, reg 2
A2 -&gt; 1 0100 01 0 Div 4 (Tab key), autodown, default repeat</pre>
<p>The keyboard responds with <code>BA</code> to acknowledge these commands.
The autorepeat rate in the four available registers is programmed by the
next group of commands, which each have three bytes.</p>
<pre>
rr timeout rate
78 64 9E -&gt; 01111 00 0 0 1100100 1 0011110
7A 64 9E -&gt; 01111 01 0 0 1100100 1 0011110
7C 64 9E -&gt; 01111 10 0 0 1100100 1 0011110
</pre>
<p>Autorepeat registers 0, 1 and 2 are programmed to the same settings: timeout
of 500ms before starting to repeat (100 * 5ms) and 30 repeats per
second.</p>
<h2>Startup with errors</h2>
<p>I recorded the following conversation of the startup sequence while holding
down the left shift key. The keyboard changes its POST results string from
<code>01 00 00 00</code> to one that incorporates the keycode of the key that
is held down, in this case, <code>01 00 3D AE</code>. When the terminal sees this,
it resets the terminal several times in the hope that the key will be lifted.
If it isn't lifted, the terminal still performs the full setup on the keyboard,
but will repeat the setup when the keyboard reports that everything is OK again.</p>
<pre style="overflow:scroll">
All bytes are shown in hex. VT = terminal, KB = keyboard.
VT 55 11 8F 13 82 11 8F 13 83 11 8F 13 84 11 8F 13 85 11 8F 13 84
KB 01 00 3D AE
VT 11 8F 13 85 11 8F 13 84 11 8F 13 85 11 8F 13 88 11 8F 13 89 11 8F 13 90
KB
VT FD FD FD 0A 80 12 81 1A 80 3A 81 42 81 4A 82
KB 01 00 3D AE 01 00 3D AE 01 00 3D AE
VT 5A 82 62 82 6A 82 72 82 A2 78 64 9E 7A 64 9E 7C 64 9E 99 E3 11 8F 13 80
KB
VT 11 8E 13 81 FD 0A 80 12 81 1A 80 3A 81 42 81 4A 82 5A 82 62 82
KB
VT 6A 82 72 82 A2 78 64 9E 7A 64 9E 7C 64 9E 99 E3 11 8F 13 80 0A 80 12 81
KB
VT 1A 80 3A 81 42 81 4A 82 5A 82 62 82 6A 82 72 82 A2 78 64 9E 7A 64 9E 7C
KB
VT 64 9E 99 E3 11 8F 13 80 11 8E 13 81 11 8F 13 80
KB
</pre>
<p>While typing this in I notice that I've not recorded the keyboard's
acknowledgement of mode changes (the single byte <code>BA</code>) but you
can mentally insert them in the same positions as the first conversation.</p>
<p>When the stuck key is released, the keyboard immediately sends the POST
results to report everything is OK and the terminal reciprocates by performing
the autorepeat setups.</p>
<pre style="overflow:scroll">
All bytes are shown in hex. VT = terminal, KB = keyboard.
VT 0A 80 12 81 1A 80 3A 81 42 81 4A 82 5A 82 62 82 6A 82 72 82 A2
KB 01 00 00 00 BA BA BA BA BA BA BA BA BA
VT 78 64 9E 7A 64 9E 7C 64 9E 99 E3 11 8F 13 80
KB BA BA
</pre>
<footer>
Copyright 1998 <a href="https://hisdeedsaredust.com">Paul Flo Williams</a>.
</footer>
</body>
</html>
Binary file not shown.
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,752 @@
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width"/>
<title>VT330/VT340 Programmer Reference Manual: Chapter 15</title>
<link href="vt330.css" type="text/css" rel="stylesheet"/>
<link rel="icon" href="/cover-logo-096.png" sizes="96x96"/>
</head>
<body>
<header>
<a href="../../"><svg xmlns="http://www.w3.org/2000/svg" width="92" height="16" version="1.1" id="vt100-net-site-logo">
<title>VT100.net</title>
<style>
.blk { fill: #000000 }
.g25 { fill: #626262 }
.g50 { fill: #9b9b9b }
.g75 { fill: #cccccc }
.grd { fill: #006600 }
.grl { fill: #00ff00 }
.scanlines { fill: black; stroke: #5e5e5e; stroke-width: 0.4; paint-order:stroke fill markers }
.dotnet { fill: #404040 }
@media (prefers-color-scheme: dark) {
.blk { fill: #626262 }
.g25 { fill: #9b9b9b }
.g50 { fill: #cccccc }
.g75 { fill: #ffffff }
.scanlines { fill: #00ff00; stroke: #009900 }
.dotnet { fill: #909090 }
}
</style>
<g id="term">
<rect class="g50" x="05" y="02" width="9" height="1"/>
<rect class="blk" x="14" y="02" height="1" width="1"/>
<rect class="g50" x="04" y="03" width="11" height="8"/>
<rect class="g25" x="05" y="03" width="9" height="7"/>
<rect class="blk" x="15" y="03" height="8" width="1"/>
<rect class="blk" x="06" y="04" width="8" height="6"/>
<rect class="grd" x="07" y="05" width="6" height="4"/>
<rect class="grl" x="08" y="05" width="1" height="1"/>
<rect class="grl" x="10" y="05" width="1" height="1"/>
<rect class="grl" x="07" y="06" width="1" height="1"/>
<rect class="grl" x="09" y="06" width="1" height="1"/>
<rect class="grl" x="08" y="07" width="1" height="1"/>
<rect class="grl" x="10" y="07" width="1" height="1"/>
<rect class="blk" x="05" y="11" height="1" width="10"/>
<rect class="blk" x="07" y="12" width="1" height="1"/>
<rect class="g25" x="08" y="12" width="4" height="1"/>
<rect class="blk" x="12" y="12" width="1" height="1"/>
<rect class="g25" x="03" y="13" width="13" height="1"/>
<rect class="g75" x="04" y="13" width="1" height="1"/>
<rect class="g75" x="06" y="13" width="1" height="1"/>
<rect class="g75" x="08" y="13" width="1" height="1"/>
<rect class="g75" x="10" y="13" width="1" height="1"/>
<rect class="g75" x="12" y="13" width="1" height="1"/>
<rect class="g75" x="14" y="13" width="1" height="1"/>
<rect class="blk" x="16" y="13" width="1" height="1"/>
<rect class="g25" x="02" y="14" width="15" height="1"/>
<rect class="blk" x="17" y="14" width="1" height="1"/>
<rect class="blk" x="02" y="15" width="16" height="1"/>
</g>
<g id="g1754" style="display:inline">
<g class="scanlines">
<path d="m 21.632883,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.37601,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.37601,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.37601,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -4.480009,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 3.584007,0 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -3.584007,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 3.584007,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -2.688005,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 3.210673 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -3.210673 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 3.210673 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -3.210673 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0.896002,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1765"/>
<path d="m 30.342891,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 6.794678 c 0.112001,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -6.794678 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 2.688004,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 0,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 0,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 0,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.41867 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.41867 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.41867 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.41867 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.41867 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.41867 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1767"/>
<path d="m 40.490903,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -0.896002,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 2.314671 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -2.314671 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -0.896001,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 3.210672 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -3.210672 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 1.792003,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 0,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 0,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m -1.792003,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 5.002676 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -5.002676 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1769"/>
<path class="scanlines" d="m 47.80491,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 3.210673 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -3.210673 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -0.896002,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.41867 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.41867 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 3.584007,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -4.480008,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.37601,0 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.37601,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.37601,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.37601,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 5.37601,0 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112001,0 -0.186667,0.205334 -0.186667,0.466667 z m -4.480009,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.41867 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.41867 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 3.584007,0 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m -2.688005,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 3.210673 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -3.210673 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1771"/>
<path class="scanlines" d="m 56.514917,3.3333123 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 3.210672 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -3.210672 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -0.896002,1.86667 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112001,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 3.584007,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -4.480008,1.86667 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.376009,0 c 0,0.2613339 0.07467,0.4666676 0.186667,0.4666676 h 1.418669 c 0.112001,0 0.186667,-0.2053337 0.186667,-0.4666676 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.376009,1.8666701 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112001,0 -0.186667,0.2053337 -0.186667,0.4666675 z m 5.376009,0 c 0,0.2613338 0.07467,0.4666675 0.186667,0.4666675 h 1.418669 c 0.112001,0 0.186667,-0.2053337 0.186667,-0.4666675 c 0,-0.2613338 -0.07467,-0.4666675 -0.186667,-0.4666675 h -1.418669 c -0.112,0 -0.186667,0.2053337 -0.186667,0.4666675 z m -5.376009,1.8666696 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112001,0 -0.186667,0.205334 -0.186667,0.466667 z m 5.376009,0 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112001,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m -4.480008,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112001,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z m 3.584007,0 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 1.418669 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -1.418669 c -0.112001,0 -0.186667,0.205334 -0.186667,0.466667 z m -2.688005,1.86667 c 0,0.261334 0.07467,0.466668 0.186667,0.466668 h 3.210672 c 0.112,0 0.186667,-0.205334 0.186667,-0.466668 c 0,-0.261333 -0.07467,-0.466667 -0.186667,-0.466667 h -3.210672 c -0.112,0 -0.186667,0.205334 -0.186667,0.466667 z" id="path1773"/>
</g>
<g class="dotnet">
<path d="m 65.076956,12.647997 q 0.466667,0 0.784001,0.336 q 0.336001,0.336001 0.336001,0.802669 q 0,0.504 -0.354668,0.858668 q -0.354667,0.354667 -0.858668,0.354667 q -0.448001,0 -0.802668,-0.298667 q -0.336001,-0.298667 -0.336001,-0.746668 q 0,-0.541335 0.354668,-0.914669 q 0.354667,-0.392 0.877335,-0.392 z" id="path1756"/>
<path d="m 68.362297,13.394665 l 1.661336,-4.6480086 q 0.112,-0.2240004 0.09333,-0.5040009 q -0.01867,-0.2800005 -0.224001,-0.2800005 q -0.410667,0 -0.933335,0.4293341 q -0.504001,0.4106674 -0.578668,0.4106674 q -0.205333,0 -0.205333,-0.3920007 q 0,-0.3920007 0.858668,-1.1013353 q 0.858668,-0.7093346 1.680003,-0.7093346 q 1.064002,0 0.634668,1.86667 q -0.01867,0.093333 0.056,0.1306669 q 0.07467,0.037333 0.149334,-0.018667 q 1.997336,-1.9786702 3.714673,-1.9786702 q 0.634668,0 0.765335,0.7840014 q 0.149333,0.7653347 -0.168001,1.6426696 l -1.437336,4.1253411 q -0.112,0.317334 0.149334,0.317334 q 0.392001,0 0.914668,-0.448001 q 0.522668,-0.448001 0.616001,-0.448001 q 0.130667,0 0.130667,0.242667 q 0,0.522668 -0.952001,1.306669 q -0.952002,0.765335 -1.75467,0.765335 q -0.821335,0 -0.821335,-0.765335 q 0,-0.28 0.112,-0.578668 l 1.493336,-4.2560073 q 0.597335,-1.6426696 -0.01867,-1.6426696 q -0.840001,0 -1.848003,1.1573354 q -1.008002,1.1573354 -1.773336,2.6133385 q -0.746668,1.437335 -1.269336,2.893338 q -0.186667,0.560001 -0.448001,0.578668 q -0.224,0.01867 -0.560001,-0.186667 q -0.317334,-0.186667 -0.317334,-0.280001 q 0,-0.224 0.280001,-1.026668 z" id="path1758"/>
<path d="m 79.487639,10.071992 q 0,0.130667 0.112,0.130667 q 1.026669,0 1.829337,-0.8026681 q 0.821335,-0.8213348 0.821335,-1.6053362 q 0,-0.4480008 -0.672001,-0.4480008 q -0.448001,0 -1.269336,1.0266685 q -0.821335,1.0080018 -0.821335,1.6986696 z m 2.370671,-3.4720061 q 1.792003,0 1.792003,1.4373359 q 0,1.0453352 -1.512002,1.9600035 q -1.493336,0.8960017 -2.725339,0.8960017 q -0.130667,0 -0.224,0.317334 q -0.09333,0.298667 -0.09333,0.616001 q 0,0.728001 0.280001,1.250669 q 0.28,0.522668 0.858668,0.522668 q 0.373334,0 0.802668,-0.205334 q 0.429334,-0.224001 0.728002,-0.448001 q 0.298667,-0.224 0.354667,-0.224 q 0.261334,0 0.261334,0.448 q 0,0.429335 -0.989335,1.064002 q -0.989336,0.616001 -1.978671,0.616001 q -0.914668,0 -1.437336,-0.821334 q -0.522667,-0.821335 -0.522667,-1.885337 q 0,-2.053337 1.400002,-3.7893403 q 1.400003,-1.7546698 3.005339,-1.7546698 z" id="path1760"/>
<path d="m 87.663666,4.9759829 q 0.317334,0 0.317334,0.4666675 q 0,0.4480009 -0.280001,1.5306695 h 1.885337 q 0.485334,0 0.485334,0.2800005 q 0,0.186667 -0.298667,0.4853342 q -0.280001,0.2800005 -0.560001,0.2800005 h -1.736003 l -1.362669,5.1333429 q -0.07467,0.317334 0.149333,0.317334 q 0.392001,0 0.914668,-0.448001 q 0.522668,-0.448001 0.616002,-0.448001 q 0.130666,0 0.130666,0.242667 q 0,0.522668 -0.914668,1.306669 q -0.896001,0.765335 -1.69867,0.765335 q -0.821334,0 -0.821334,-0.765335 q 0,-0.130667 0.112,-0.578668 l 1.456002,-5.5253429 h -0.877334 q -0.429335,0 -0.429335,-0.2613338 q 0,-0.2426671 0.242668,-0.5040009 q 0.261333,-0.2800005 0.541334,-0.2800005 h 0.746668 l 0.261334,-1.0453352 q 0.03733,-0.2240005 0.373334,-0.5786678 q 0.354667,-0.373334 0.746668,-0.373334 z" id="path1762"/>
</g>
</g>
</svg></a> VT330/VT340 Programmer Reference Manual
<nav class="sections"><a href="chapter14.html">Chapter 14</a><a href="contents.html">Contents</a><a href="chapter16.html">Chapter 16</a></nav>
</header>
<h1 id="S15"><span class="chapnum">15</span> Using a Mouse or Tablet</h1>
<h2 id="S15.1">Locator Devices</h2>
<p>This chapter describes how to program your VT300 terminal for use with a
locator device. You use a locator device to move the cursor and select position
coordinates on the screen. With a locator device, you can easily move the
graphics input cursor to a specific point or enter data to application programs.</p>
<p>There are two locator devices you can use with your terminal, a mouse or
graphics tablet. You connect the device to the rear of the terminal. These devices
use a serial line input/output format with the micro-DIN connector.</p>
<h2 id="S15.2">VSXXX-AA Mouse</h2>
<p>Digital's VSXXX-AA mouse is a small handheld device, with three buttons on
top and a roller ball on the bottom. You can write applications that use the
mouse as an input device. You can use the three buttons on the mouse to send
data to an application.</p>
<p>The roller ball controls cursor movement. When you move the mouse on a flat
surface, the roller ball turns. The cursor moves in the direction you move the
mouse. You can move the cursor in any direction, and place it anywhere on the
screen.</p>
<p>If you pick the mouse up, the cursor stops moving on the screen. The cursor
stays at this point until you put the mouse down and move the roller ball along
the surface again.</p>
<h2 id="S15.3">VSXXX-AB Graphics Tablet</h2>
<p>Digital's VSXXX-AB tablet has three parts.</p>
<ul class="bare">
<li>Tablet</li>
<li>Puck</li>
<li>Stylus</li>
</ul>
<p>The <dfn>tablet</dfn> has a flat, square surface similar to a tabletop. To move the cursor,
you move the puck or stylus over this surface. The tablet has a position-sensitive
grid that senses the position of the puck or stylus.</p>
<p>The <dfn>puck</dfn> is a handheld device with crosshair markings that help you select
precise coordinates on the tablet. The puck has four buttons that serve the
same purpose as the buttons on the mouse. You can program the buttons to
send position reports when pressed or released.</p>
<p>The <dfn>stylus</dfn> is a handheld device that resembles a pen. The stylus has two buttons,
a barrel and a tip. The barrel is a button on the side of the pen you can
press to send data to an application. You activate the tip by pressing the pen
down onto the tablet surface.</p>
<p>To move the cursor, you move the puck or stylus over the tablet surface. You
do not have to touch the surface, but the tablet or stylus must be within 0.65
cm (0.25 in) of the surface to move the cursor. When the puck or stylus is
close enough to the tablet surface to move the cursor, the puck or stylus is in
<dfn>proximity</dfn> with the tablet.</p>
<p>If you remove the puck or stylus from the tablet surface while the tablet is
plugged in, then the VT300 uses the last known tablet position.</p>
<p>Unlike the mouse, the tablet is an absolute positioning device. The layout of
the tablet corresponds roughly to the layout of the screen. The next section
explains tablet-to-screen mapping.</p>
<h3 id="S15.3.1">Tablet-to-Screen Mapping</h3>
<p>The VT300 screen maps to the bottom two-thirds of the tablet surface.
Applications cannot use the top third of the tablet. The points at the top third
of the tablet map to the top visible scan line of the screen.</p>
<p>The complete horizontal extent of the tablet's coordinate system maps to the
complete horizontal extent of the screen. However, the tablet has borders to
compensate for the difference between the screen's coordinate system and the
tablet's system.</p>
<p>The vertical extent at the bottom of the tablet's coordinate system maps to the
complete vertical extent of the screen. The tablet must also have borders in the
vertical direction.</p>
<p>The origin of the tablet's coordinate system is at the lower-left corner of the
tablet surface, so the lower Y coordinates on the tablet map to the horizontal
extent of the screen. The upper Y coordinates map to the top scan line of the screen.</p>
<h2 id="S15.4">Locator Cursor</h2>
<p>The VT300 can use any one of the following cursor styles with a
locator device.</p>
<table class="padded">
<tbody>
<tr>
<td class="first">Crosshair</td>
<td>ReGIS, 4010/4014</td>
<td>(default input cursor)</td>
</tr>
<tr>
<td class="first">Diamond</td>
<td>ReGIS</td>
<td>(default output cursor)</td>
</tr>
<tr>
<td class="first">Rubber band line</td>
<td>ReGIS</td>
<td></td>
</tr>
<tr>
<td class="first">Rubber band box</td>
<td>ReGIS</td>
<td></td>
</tr>
<tr>
<td class="first">User-defined</td>
<td>ReGIS</td>
<td></td>
</tr>
</tbody>
</table>
<p>In ReGIS mode, software can select the cursor style by using the cursor control
option to the screen command: S(C(I)). See <a href="chapter2.html">Chapter 2</a> for details on the
ReGIS screen command.</p>
<p>In 4010/4014 mode, the terminal only uses the crosshair cursor style.</p>
<h2 id="S15.5">Locator Buttons</h2>
<p>In graphics input mode, pressing a locator button sends a cursor position report
to the host. The mouse has three buttons. The graphics tablet includes a
puck with four buttons, and a stylus with a barrel button and a tip switch. All
the buttons serve the same purpose – they send locator data to the host.</p>
<p>A locator button can be in one of two states, up (released) or down (pressed). A
change from one state to another is called a transition. You can program the
buttons to send reports in three different ways.</p>
<ul>
<li>When pressed</li>
<li>When released</li>
<li>When pressed or released</li>
</ul>
<p>You can also program the locator buttons to send specific codes or control functions
to the host. Programming locator buttons is described later in this chapter.
<a href="#T15-1">Table 15-1</a> shows the default codes that each button sends when pressed or
released.</p>
<table id="T15-1" class="majortable">
<caption>Table 15-1 Default Locator Button Codes</caption>
<thead>
<tr>
<th>Button</th>
<th>Device*</th>
<th>Code (Pressed)</th>
<th>Code (Released)</th>
</tr>
</thead>
<tbody>
<tr>
<td>1 (left)</td>
<td>mouse, puck, or stylus barrel</td>
<td><b>CSI 241 ~</b></td>
<td>no report</td>
</tr>
<tr>
<td>2 (middle)</td>
<td>mouse, puck, or stylus tip</td>
<td><b>CSI 243 ~</b></td>
<td>no report</td>
</tr>
<tr>
<td>3 (right)</td>
<td>mouse or puck</td>
<td><b>CSI 245 ~</b></td>
<td>no report</td>
</tr>
<tr>
<td>4 (fourth)</td>
<td>puck</td>
<td><b>CSI 247 ~</b></td>
<td>no report</td>
</tr>
</tbody>
</table>
<p>If the host requests a report when none of the buttons are in use, the terminal responds with a null-button code: <b>CSI 240 ~</b>.</p>
<h2 id="S15.6">Entering Data with the Locator Device</h2>
<p>Before you can enter data with a locator device, the terminal must be in a
graphics input mode. You can use three different graphics input modes with
the VT300.</p>
<ul class="col2 bare">
<li>ReGIS one-shot graphics input mode</li>
<li>ReGIS multiple graphics input mode</li>
<li>Tektronix GIN mode</li>
</ul>
<h3 id="S15.6.1">ReGIS One-Shot Graphics Input Mode</h3>
<p>An application can select this mode with the following ReGIS command.</p>
<p class="example"><b>R(I0)</b></p>
<p>In one-shot mode, the terminal suspends processing of received characters and
commands. The terminal buffers all received characters, until it leaves one-shot
mode.</p>
<p>When the terminal enters graphics input mode, the input cursor appears on the screen.</p>
<h4 id="S15.6.1.1">Moving the Graphics Cursor</h4>
<p>You can move the input cursor around the
screen by moving the locator device.</p>
<p><strong>Mouse</strong><br/>
The input cursor moves as you move the mouse over a flat surface.</p>
<p><strong>Tablet</strong><br/>
The input cursor moves as you move the stylus or puck across the tablet surface.</p>
<p><strong>Arrow Keys</strong><br/>
The input cursor moves as you press the corresponding arrow key on the keyboard.
If a mouse is connected to the locator port, you can use the arrow keys
or the mouse interchangeably to move the cursor. If a tablet is connected, you
can use the arrow keys to move the cursor only when the puck or stylus is not in
proximity with the tablet surface.</p>
<h4 id="S15.6.1.2">Requesting a Cursor Position Report</h4>
<p>In one-shot mode, the terminal cannot
send a position report until the application sends a request to the terminal. You
use the ReGIS report position interactive command to request a position report.</p>
<p class="example"><b>R(P(I))</b></p>
<p>After sending the report position interactive command, the application does not
receive a report until you press an active key or locator button.</p>
<h4 id="S15.6.1.3">Sending a Cursor Position Report</h4>
<p>You can send a cursor position report from the keyboard or locator device.</p>
<table class="dpadded">
<tbody>
<tr>
<td>Mouse</td>
<td>Press any mouse button.</td>
</tr>
<tr>
<td>Tablet</td>
<td>Press any puck, or stylus button.</td>
</tr>
<tr>
<td>Keyboard</td>
<td>Press any non-arrow key that is active.</td>
</tr>
</tbody>
</table>
<p>When you send a report, the following actions occur.</p>
<ol>
<li><p><strong>If you use the keyboard</strong><br/>
The terminal sends the character code or control function of the key
pressed to the host.</p>
<p><strong>If you use the mouse or tablet</strong><br/>
The terminal sends the code of the button pressed to the host.
<a href="#T15-1">Table 15-1</a> lists the default codes. Digital's mouse has three buttons,
the tablet's puck has four.</p>
<p>Your application can redefine the codes that the locator buttons
send to the host. User-defined codes override the default codes. See
"<a href="#S15.8">Programming Locator Device Buttons</a>" later in the chapter.</p></li>
<li><p><strong>The terminal sends the position report.</strong><br/>
The terminal sends the current coordinates of the input cursor to
the host. The terminal sends this report as an absolute bracketed
extent in ReGIS coordinates (such as [X,Y]).</p></li>
<li><p><strong>The terminal exits one-shot mode.</strong><br/>
The graphics input cursor disappears from the screen when the terminal
exits graphics input mode.</p></li>
</ol>
<h3 id="S15.6.2">ReGIS Multiple Graphics Input Mode</h3>
<p>An application can select this mode with the following ReGIS command.</p>
<p class="example"><b>R(I1)</b></p>
<p>In multiple mode, the user moves the cursor and sends reports as in one-shot
mode. Multiple mode differs from one-shot mode in the following ways.</p>
<ul>
<li><p>The terminal processes characters and command as it receives
them from the host. This feature lets the terminal perform graphics
input and output at the same time.</p></li>
<li><p>The terminal does not exit graphics input mode after the terminal
sends a cursor position report. In multiple mode, the terminal can
send an indefinite number of position reports.</p></li>
<li><p>When you press a button or an application requests a report, the
terminal immediately sends a position report.</p></li>
<li><p>To exit multiple mode, the application must send the ReGIS R(I0)
command. The input cursor remains on the screen until the application
sends this command.</p></li>
</ul>
<h4 id="S15.6.2.1">Sending a Cursor Position Report</h4>
<p>In multiple mode, there are two ways
for the application to receive a report.</p>
<ul>
<li><p><strong>Send R(P(I)) to the terminal.</strong><br/>
An application can request an immediate position report by sending
the ReGIS report position interactive command to the terminal.
When the terminal receives R(P(I)), it immediately sends a position
report to the application.</p></li>
<li><p><strong>Press a locator button.</strong><br/>
When you press (or release) a locator button, the terminal immediately
sends a position report to the application.</p></li>
</ul>
<p><strong>Notes on Multiple Mode</strong></p>
<ul>
<li><p>To exit multiple graphics input mode, you must exit ReGIS. To re-enter
multiple mode, you must use the ReGIS R(I1) command again.</p></li>
<li><p>You cannot use the four arrow keys to position the input cursor as
you can in ReGIS one-shot graphics input mode. If you press an
arrow key in multiple mode, the terminal sends that key's escape
sequence to the host. If the host system is set to echo all of the
input that it receives, then the escape sequence will be sent back
to the terminal, causing ReGIS to abort.</p>
<p>To prevent this, you should either</p>
<ul>
<li><p>turn off the host system's echoing function (using a command
such as <b>SET TERM/NOECHO</b> on VMS), or</p></li>
<li><p>program your application to read terminal input in such a
way as to prevent echoing input back to the terminal.</p></li>
</ul></li>
</ul>
<h3 id="S15.6.3">ReGIS Locator Reports</h3>
<p>Locator reports begin with the code(s) of the active non-arrow key or locator
button pressed. Following this code is the current position of the input cursor.
The terminal sends the input cursor position as an absolute bracketed extent in
user coordinates. The report ends with the carriage return character (CR).</p>
<p>The following list shows some examples of locator reports and their meaning.</p>
<ul>
<li><p><strong>One-shot mode</strong></p>
<pre>A[102,200]&lt;CR&gt;</pre>
<p>The user pressed the letter 'A' with the cursor at position 102,200.</p></li>
<li><p><strong>One-shot or multiple mode</strong></p>
<pre>&lt;CSI&gt;241~[102.5,200]&lt;CR&gt;</pre>
<p>The user pressed the left mouse button with the input cursor at position
[102.5,200]. &lt;CSI&gt;241~ is the default sequence sent when
you press the left mouse button.</p></li>
<li><p><strong>Multiple mode</strong></p>
<pre>&lt;CSI&gt;240~[100,100]&lt;CR&gt;</pre>
<p>The terminal received the ReGIS report position interactive command
R(P(I)). &lt;CSI&gt;240~ is the <dfn>null button sequence</dfn>. The null button
sequence indicates this report is the result of an application
request, not a locator button transition. The cursor is at position
[100, 100].</p></li>
</ul>
<h3 id="S15.6.4">Synchonizing Locator Reports Between the Terminal and Application</h3>
<p>The way you synchronize input cursor position reports between the terminal
and your application depends on whether the terminal is in one-shot graphics
input mode, or multiple graphics input mode.</p>
<h4 id="S15.6.4.1">In One-Shot Mode</h4>
<p>In one-shot mode, the terminal cannot send a report until
it receives the ReGIS R(P(I)) command. To synchronize reports, your application
must keep count of the R(P(I)) commands sent to the terminal.</p>
<h4 id="S15.6.4.2">In Multiple Mode</h4>
<p>In multiple mode, the terminal can send a
report at any time. To synchronize reports, the application must be able to recognize
the format of each ReGIS input cursor position report. See "<a href="#S15.6.3">ReGIS
Locator Reports</a>" earlier in this chapter for the report formats.</p>
<h3 id="S15.6.5">Tektronix Graphics Input (GIN) Mode</h3>
<p>Tektronix GIN mode is available only when the terminal is in 4010/4014 mode.
Tektronix GIN mode is similar to ReGIS one-shot mode. The cursor moves and
the terminal sends reports as in ReGIS one-shot mode.</p>
<p>An application can select this mode with the following escape sequence.</p>
<div class="example"><table class="codeseq">
<tbody>
<tr>
<th>ESC</th>
<th>SUB</th>
</tr>
<tr>
<td>1/11</td>
<td>1/10</td>
</tr>
</tbody>
</table></div>
<p>The only input cursor available in Tektronix GIN mode is the crosshair. See
<a href="chapter13.html">Chapter 13</a> for the format of the 4010/4014 mode position report.</p>
<h2 id="S15.7">Using a Locator Device with Dual Sessions</h2>
<p>This section describes how a locator device acts in a dual-session environment.
You may want to review the chapter on dual sessions (Volume 1, Chapter 14)
before you continue.</p>
<h3 id="S15.7.1">Locator Device Attributes in a Dual-Session Environment</h3>
<ul>
<li><p>The locator device and the keyboard share the same input buffer, so
they always send data to the same session. That is, the locator device
and the keyboard are always associated with the active session.</p></li>
<li><p>Each session independently selects graphics input mode. Either session
can use a locator device without affecting the other session.</p></li>
<li><p>The VT300 lets users display data from two sessions at the same
time, using windows. In this environment, the locator cursor
moves freely only in the active session's window. To change the
active session, use the <b>Switch Session</b> key.</p></li>
</ul>
<h2 id="S15.8">Programming Locator Device Buttons (DECLBD)</h2>
<p>You can program the locator device buttons to send codes that are different
from the default codes. <a href="#T15-1">Table 15-1</a> lists the default codes.</p>
<p>Programming locator buttons is similar to programming function keys on the
keyboard (Volume 1, Chapter 11). You use a device control string containing
button definitions.</p>
<p>There are three programmable buttons on Digital's mouse, four on the tablet's
puck, and two on the tablet's stylus. The VT300 lets you program all the buttons
on the device you use. Each button can send a different code when
pressed or released.</p>
<p>The VT300 lets you program up to six characters for each transition (up or
down).</p>
<p>The terminal does not save your locator button codes in nonvolatile RAM
(NVR). When you turn off or reset the terminal, you lose any locator button
codes you defined. Unlike user-defined keys (UDKs), you cannot program the
locator buttons from set-up.</p>
<h3 id="S15.8.1">DECLBD Device Control String</h3>
<p>You use the following device control string to define the function of locator
buttons.</p>
<p class="example"><b>DCS Pc $ w Ky1/Std1/Stu1 ;...; Kyn/Stdn/Stun ST</b></p>
<p>where</p>
<div class="example"><p><b>DCS</b> (9/0) introduces device control strings. DCS is a C1 control character
that you can also express as ESC P (1/11 5/0) when coding for a 7-bit
environment.</p>
<p><b>Pc</b> is the clear parameter. Pc determines how the locator buttons are cleared.</p>
<table class="dpadded">
<thead>
<tr>
<th>Pc</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>0</strong> or none</td>
<td>Clear all button definitions before loading new values (default).</td>
</tr>
<tr>
<td>1</td>
<td>Clear one button at a time, before loading a new value.</td>
</tr>
</tbody>
</table>
<p class="note">NOTE: You can only use 6 characters per button transition (pressed or released).</p>
<p><b>$ w (2/4, 7/7)</b> are the intermediate and final characters that identify this
device control string as a DECLBD string.</p>
<p><b>Ky1/Std/Stu ; ...</b> are the button definition strings.</p>
<div class="example"><p><b>Ky1</b> is the number of the button you are defining.</p>
<table class="padded">
<thead>
<tr>
<th class="first">Ky1</th>
<th>Button</th>
<th>Device</th>
</tr>
</thead>
<tbody>
<tr>
<td class="first">1</td>
<td>Left</td>
<td>Mouse, puck, or stylus barrel</td>
</tr>
<tr>
<td class="first">2</td>
<td>Middle</td>
<td>Mouse, puck, or stylus tip</td>
</tr>
<tr>
<td class="first">3</td>
<td>Right</td>
<td>Mouse or puck</td>
</tr>
<tr>
<td class="first">4</td>
<td>Fourth</td>
<td>Puck only</td>
</tr>
</tbody>
</table>
<p><b>/</b> (2/15) is the slash character. This character separates the button
selector number, up button value, and down button value in each
button definition.</p>
<p><b>Std</b> is the <em>down</em> string value. This value represents the code the selected
locator button sends when pressed. The value is a string of
hex pairs, each representing one 8-bit character.</p>
<p>You can use hex values in the following ranges.</p>
<p>3/0 through 3/9 (0 through 9)<br/>
4/1 through 4/6 (A through F)<br/>
6/1 through 6/6 (a through f)</p>
<p>When you combine these hex values, you can represent any 8-bit
code. You can use up to 6 characters (6 hex pairs) for each Std
value.</p>
<p><b>Stu</b> is the <em>up</em> string value. This value represents the code the selected
locator button sends when released. You code this value the
same as Std above.</p>
<p><b>;</b> (3/11) is a separator character. This character separates each button
definition string.</p></div>
<p><b>ST</b> (9/12) is the string terminator and indicates the end of the DCS. ST is
a C1 control character that you can also express as ESC \ (1/11, 5/12)
when coding for a 7-bit environment.</p></div>
<p><strong>Notes on DECLBD</strong></p>
<ul>
<li><p>When you use the DECLBD function in an application, you may
want to clear all the button definitions. Then you can define the buttons
as used in that application.</p></li>
<li><p>When you redefine a locator button, the old definition is lost.</p></li>
<li><p>Locator button definitions are not stored in nonvolatile RAM (NVR).
When you turn off or reset the terminal, you lose your definitions.</p></li>
</ul>
<p><strong>Examples of Locator Button Definitions</strong></p>
<ul>
<li><p>You can use the following sequence to clear the locator buttons.</p>
<div class="example"><table class="codeseq">
<tbody>
<tr>
<th>DCS</th>
<th>0</th>
<th>$</th>
<th>w</th>
<th>ST</th>
</tr>
<tr>
<td>9/0</td>
<td>3/0</td>
<td>2/4</td>
<td>7/7</td>
<td>9/12</td>
</tr>
</tbody>
</table><br/></div></li>
<li><p>Suppose you want to define locator button 1 on Digital's mouse. You
want the button to send a carriage return (CR) when released, and
the default PF1 key code, <b>SS3 P</b>, when pressed. You want to do
this without clearing any other buttons. The first part of your
DECLBD sequence would look like this.</p>
<div class="example"><table class="codeseq">
<tbody>
<tr>
<th>DCS</th>
<th>1</th>
<th>$</th>
<th>w</th>
<th>1</th>
<th>/</th>
</tr>
<tr>
<td>9/0</td>
<td>3/1</td>
<td>2/4</td>
<td>7/7</td>
<td>3/1</td>
<td>2/15</td>
</tr>
</tbody>
</table><br/></div>
<p>The 1 after the w character indicates that this sequence defines locator
button 1 on the mouse. The hex code for the carriage return
character is D.</p>
<p>The hex code for the default PF1 key control function is as follows.</p>
<p class="example">SS3 = 8F hex<br/>P = 50 hex</p>
<p>The rest of the DECLBD sequence after the first slash would look
like this.</p>
<div class="example"><table class="codeseq">
<tbody>
<tr>
<th>D</th>
<th>/</th>
<th>8F50</th>
<th>ST</th>
</tr>
<tr>
<td>button<br/>released</td>
<td>2/15</td>
<td>button<br/>pressed</td>
<td>9/12</td>
</tr>
</tbody>
</table><br/></div>
<p>The complete string would look like this.</p>
<p class="example"><b>DCS 1 $ w 1 / D / 8F50 ST</b></p></li>
</ul>
<h2 id="S15.9">Summary</h2>
<p><a href="#T15-2">Table 15-2</a> is a summary of the control functions and commands described in
this chapter.</p>
<table id="T15-2" class="majortable">
<caption>Table 15-2 Locator Command Summary</caption>
<thead>
<tr>
<th>Name</th>
<th>Command</th>
<th>Function</th>
</tr>
</thead>
<tbody>
<tr>
<th colspan="3">ReGIS</th>
</tr>
<tr>
<td>One-shot graphics input mode</td>
<td><strong>R(I0)</strong></td>
<td><ol>
<li>Selects one-shot mode.</li>
<li>In multiple mode, exits multiple mode and selects one-shot mode.</li>
</ol></td>
</tr>
<tr>
<td>Multiple graphics input mode</td>
<td><strong>R(I1)</strong></td>
<td>Selects multiple mode.</td>
</tr>
<tr>
<td>Request cursor position report</td>
<td><strong>R(P(I))</strong></td>
<td><p>In one-shot or multiple mode, requests a cursor position report from the terminal.</p>
<p>In one shot mode, the terminal sends the report when you press a locator button.</p>
<p>In multiple mode, the terminal sends the report immediately. The terminal also sends a report when you press a locator button.</p></td>
</tr>
</tbody>
<tbody>
<tr>
<th colspan="3">4010/4014 Mode</th>
</tr>
<tr>
<td>GIN mode</td>
<td><strong>ESC SUB</strong></td>
<td>Selects graphics input mode.</td>
</tr>
</tbody>
<tbody>
<tr>
<th colspan="3">Programming Locator Device Buttons (DECLBD)</th>
</tr>
<tr>
<td colspan="3"><p class="example"><strong>DCS Pc $ w Ky1/Std1/Stu1 ; ... ; Kyn/Stdn/Stun ST</strong></p>
<p>where</p>
<table class="example">
<tbody>
<tr>
<td>Pc</td>
<td> = </td>
<td>clear parameter.</td>
</tr>
<tr>
<td>0 or none</td>
<td> = </td>
<td>clear all button definitions before loading new values (default).</td>
</tr>
<tr>
<td>1</td>
<td> = </td>
<td>clear one button at a time, before loading a new value.</td>
</tr>
</tbody>
</table>
<p class="note">NOTE: You can only use 6 characters per button transition (pressed or
released).</p>
<div class="example"><p><b>Ky1/Std/Stu ; ...</b> are the button definition strings.</p>
<table class="dpadded">
<tbody>
<tr>
<td>Ky1</td>
<td>=</td>
<td>number of the button you are defining.</td>
</tr>
<tr>
<td colspan="3"><table class="padded">
<thead>
<tr>
<th class="first">Ky1</th>
<th>Button</th>
<th>Device</th>
</tr>
</thead>
<tbody>
<tr>
<td class="first">1</td>
<td>Left</td>
<td>Mouse, puck, or stylus barrel</td>
</tr>
<tr>
<td class="first">2</td>
<td>Middle</td>
<td>Mouse, puck, or stylus tip</td>
</tr>
<tr>
<td class="first">3</td>
<td>Right</td>
<td>Mouse or puck</td>
</tr>
<tr>
<td class="first">4</td>
<td>Fourth</td>
<td>Puck only</td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td>Std</td>
<td>=</td>
<td><p>the code the selected locator button sends when pressed.
The value is a string of hex pairs, each representing
one 8-bit character.</p>
<p>You can use hex values in the following ranges.</p>
<p>3/0 through 3/9 (0 through 9)<br/>
4/1 through 4/6 (A through F)<br/>
6/1 through 6/6 (a through f)</p></td>
</tr>
<tr>
<td>Stu</td>
<td>=</td>
<td>the code the selected locator button sends when released.
You code this value the same as Std above.</td>
</tr>
</tbody>
</table></div></td>
</tr>
</tbody>
</table>
<footer>
<nav class="sections"><a href="chapter14.html">Chapter 14</a><a href="contents.html">Contents</a><a href="chapter16.html">Chapter 16</a></nav>
</footer>
</body>
</html>
@@ -0,0 +1,19 @@
# SPDX-License-Identifier: Apache-2.0
set(BOARD esp32c3_devkitm)
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(vtbt)
target_sources(app PRIVATE src/main.c)
target_sources(app PRIVATE src/beeper.c)
target_sources(app PRIVATE src/bluetooth.c)
target_sources(app PRIVATE src/leds.c)
target_sources(app PRIVATE src/uart.c)
target_sources(app PRIVATE src/metronome.c)
target_sources(app PRIVATE src/lk201.c)
target_sources(app PRIVATE src/keyboard.c)
target_compile_options(app PRIVATE -Wall -Werror -Wextra)
+7
View File
@@ -0,0 +1,7 @@
menu "Zephyr"
source "Kconfig.zephyr"
endmenu
module = APP
module-str = APP
source "subsys/logging/Kconfig.template.log_config"
+202
View File
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+82
View File
@@ -0,0 +1,82 @@
# Bluetooth to LK201 bridge for DEC video terminals
<img src="./images/vtbt.jpg" width="30%"/> <img src="./images/vtbt_with_devkit.jpg" width="30%"/>
This repository contains Zephyr RTOS firmware code and KiCad hardware files for
a device which interfaces a DEC VT to a Bluetooth keyboard via an emulated
LK201 interface.
The vtbt board has a socket for an ESP32-C3-DevKitM-1 which provides the
microcontroller and Bluetooth functionality (as well as 3.3V regulation). The
vtbt provides power from the keyboard interface's 12V supply, performs RS-423
level conversion for the serial interface and has the four LEDs and magnetic
buzzer found in a real LK201 because Bluetooth keyboards are unlikely to have
those.
I built this after I spent great effort to obtain a VT420 but then neglected to
use it due to frustrations with the infamous LK401 keyboard. Once I got the
vtbt capable of "self-hosting", I used it with my VT420 to finish developing
the firmware over a serial console. I found that the terminal actually provides
a very enjoyable and relaxing experience with a decent keyboard!
## What works
Everything documented in the VCB02 Video Subsystem Technical manual is
implemented including:
* Beeps, keyclicks, beep and keyclick volumes
* The four LK201 LED indicators
* Per-key-division auto-repeat, up-down, down-only modes
* All mode-setting operations for changing modes and auto-repeat timings
## What doesn't work
I've only tested the vtbt with DEC VT420 terminals.
The key mapping is set up for the VT420's default "<> Key Sends `~" and "`~ Key
Sends ESC" settings. It may need adjustment for other terminals or
configurations.
Similarly, Alt keys, which are disabled by default on the VT420, are not
supported, but support could be added.
Compose keys have not been tested.
## Usage
1. Build and flash the firmware to an ESP32-C3-DevKitM-1 connected over USB.
From a Zephyr environment:
```west flash```
2. Mount the ESP32-C3-DevKitM-1 on the vtbt with the USB port facing the vtbt's
modular connector and the ESP32-C3 and antenna on the side with the LEDs.
3. Connect the vtbt to a DEC terminal with a rollover-wired 4P4C module cable
(like a phone handset cable).
4. Turn on the DEC terminal. The vtbt will display the terminal's power-up
self-test sequence on its four LEDs followed by a beep.
5. Connect to a Bluetooth keyboard.
The firmware indicates Bluetooth status via the ESP32-C3-DevKitM-1's RGB
LED.
Blue means it is searching for a Bluetooth keyboard.
Green means it has found a keyboard and is awaiting authorization. To
authorize, type 123456<Enter> on the keyboard.
Orange means it is connected to a keyboard and processing keyboard events.
The firmware stores bonded devices and automatically reconnects to them.
## Development
The vtbt's modular connector blocks the ESP32-C3-DevKitM-1's USB port, but for
quicker iterations a pair of pin headers as spacers will make it taller.
vtemu.py in this repository can be used as a basic emulation of a DEC terminal
for testing.
@@ -0,0 +1,2 @@
CONFIG_WS2812_STRIP_SPI=y
CONFIG_SPI=y
@@ -0,0 +1,108 @@
/*
* Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/dt-bindings/led/led.h>
#include <zephyr/dt-bindings/pwm/pwm.h>
&uart0 {
current-speed = <4800>;
};
&spi2 {
/* Workaround to support WS2812 driver */
line-idle-low;
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <6400000>;
/* WS2812 */
chain-length = <1>; /* arbitrary; change at will */
spi-cpha;
spi-one-frame = <0xf0>; /* 11110000: 625 ns high and 625 ns low */
spi-zero-frame = <0xc0>; /* 11000000: 312.5 ns high and 937.5 ns low */
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
};
};
&pinctrl {
spim2_default: spim2_default {
group2 {
pinmux = <SPIM2_MOSI_GPIO8>;
};
};
ledc0_default: ledc0_default {
group1 {
pinmux = <LEDC_CH0_GPIO3>;
output-enable;
};
};
};
/ {
aliases {
led-strip = &led_strip;
};
chosen {
zephyr,vt-uart = &uart0;
};
// chosen {
// /delete-property/ zephyr,console;
// };
uart_tx_enable: uart_tx_enable {
compatible = "uart-tx-enable";
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
};
leds {
compatible = "gpio-leds";
led0: led0 {
gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
};
led1: led1 {
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
};
led2: led2 {
gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
};
led3: led3 {
gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
};
};
aliases {
pwm-0 = &ledc0;
pwm-beeper0 = &pwm_beeper;
};
pwmbeepers {
compatible = "pwm-leds";
pwm_beeper: pwm_led_gpio0_3 {
label = "PWM BEEPER0";
/* ~2 KHz */
pwms = <&ledc0 0 40000000 PWM_POLARITY_NORMAL>;
};
};
};
&ledc0 {
pinctrl-0 = <&ledc0_default>;
pinctrl-names = "default";
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
channel0@0 {
reg = <0x0>;
timer = <0>;
};
};
Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

File diff suppressed because it is too large. Load diff
@@ -0,0 +1,10 @@
"Symbol";"Value";"Unit";
"TraceParts.PartNumber";"90-06062020-071364";"";
"REFERENCE";"0955016449";"";
"TraceParts.PartTitle";"Modular Jack, Right-Angle, Surface Mount, 4/4, Low Profile, Tube";"";
"TraceParts.InstanceId";"90-06062020-0713642N3XX9WWY2MK673V115V3T3RA";"";
"SUPPLIER";"Molex";"";
"DESIGN";"Modular Jack, Right-Angle, Surface Mount, 4/4, Low Profile, Tube";"";
"TRACEPARTS";"TRACEPARTS";"";
"TraceParts.PartLanguage";"en";"";
"TraceParts.PartVersion";"1.0.1";"";
@@ -0,0 +1,318 @@
(kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor)
(symbol "955016449" (pin_names (offset 0.254)) (in_bom yes) (on_board yes)
(property "Reference" "J" (id 0) (at 8.89 6.35 0)
(effects (font (size 1.524 1.524)))
)
(property "Value" "955016449" (id 1) (at 0 0 0)
(effects (font (size 1.524 1.524)))
)
(property "Footprint" "CONN_95501-6449_MOL" (id 2) (at 0 0 0)
(effects (font (size 1.27 1.27) italic) hide)
)
(property "Datasheet" "955016449" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27) italic) hide)
)
(property "ki_keywords" "955016449" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_locked" "" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_fp_filters" "CONN_95501-6449_MOL" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "955016449_1_1"
(polyline
(pts
(xy 10.16 0)
(xy 5.08 0)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 10.16 -2.54)
(xy 5.08 -2.54)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 10.16 -5.08)
(xy 5.08 -5.08)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 10.16 -7.62)
(xy 5.08 -7.62)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 10.16 0)
(xy 8.89 0.846666)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 10.16 -2.54)
(xy 8.89 -1.693334)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 10.16 -5.08)
(xy 8.89 -4.233334)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 10.16 -7.62)
(xy 8.89 -6.773334)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 10.16 0)
(xy 8.89 -0.846666)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 10.16 -2.54)
(xy 8.89 -3.386666)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 10.16 -5.08)
(xy 8.89 -5.926666)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 10.16 -7.62)
(xy 8.89 -8.466666)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 5.08 2.54)
(xy 5.08 -10.16)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 5.08 -10.16)
(xy 12.7 -10.16)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 12.7 -10.16)
(xy 12.7 2.54)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 12.7 2.54)
(xy 5.08 2.54)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(pin unspecified line (at 0 0 0) (length 5.08)
(name "1" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin unspecified line (at 0 -2.54 0) (length 5.08)
(name "2" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin unspecified line (at 0 -5.08 0) (length 5.08)
(name "3" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
(pin unspecified line (at 0 -7.62 0) (length 5.08)
(name "4" (effects (font (size 1.27 1.27))))
(number "4" (effects (font (size 1.27 1.27))))
)
)
(symbol "955016449_1_2"
(polyline
(pts
(xy 7.62 0)
(xy 5.08 0)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.62 -2.54)
(xy 5.08 -2.54)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.62 -5.08)
(xy 5.08 -5.08)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.62 -7.62)
(xy 5.08 -7.62)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.62 0)
(xy 8.89 0.846666)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.62 -2.54)
(xy 8.89 -1.693334)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.62 -5.08)
(xy 8.89 -4.233334)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.62 -7.62)
(xy 8.89 -6.773334)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.62 0)
(xy 8.89 -0.846666)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.62 -2.54)
(xy 8.89 -3.386666)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.62 -5.08)
(xy 8.89 -5.926666)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.62 -7.62)
(xy 8.89 -8.466666)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 5.08 2.54)
(xy 5.08 -10.16)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 5.08 -10.16)
(xy 12.7 -10.16)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 12.7 -10.16)
(xy 12.7 2.54)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 12.7 2.54)
(xy 5.08 2.54)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(pin unspecified line (at 0 0 0) (length 5.08)
(name "1" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin unspecified line (at 0 -2.54 0) (length 5.08)
(name "2" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin unspecified line (at 0 -5.08 0) (length 5.08)
(name "3" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
(pin unspecified line (at 0 -7.62 0) (length 5.08)
(name "4" (effects (font (size 1.27 1.27))))
(number "4" (effects (font (size 1.27 1.27))))
)
)
)
)
@@ -0,0 +1,36 @@
(footprint "CONN_95501-6449_MOL" (version 20211014) (generator pcbnew)
(layer "F.Cu")
(tags "955016449 ")
(attr smd)
(fp_text reference "REF**" (at 0 8.9737 unlocked) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value CONN_95501-6449_MOL (at 0 8.9737 unlocked) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user "${REFERENCE}" (at 0 8.9737 unlocked) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -5.9182 -9.3853) (end -5.9182 12.4027) (layer "F.CrtYd") (width 0.1524))
(fp_line (start -5.9182 12.4027) (end 5.9182 12.4027) (layer "F.CrtYd") (width 0.1524))
(fp_line (start 5.9182 12.4027) (end 5.9182 -9.3853) (layer "F.CrtYd") (width 0.1524))
(fp_line (start 5.9182 -9.3853) (end -5.9182 -9.3853) (layer "F.CrtYd") (width 0.1524))
(fp_circle (center 6.4262 8.9737) (end 6.8072 8.9737) (layer "F.SilkS") (width 0.508) (fill none))
(fp_circle (center 6.4262 8.9737) (end 6.8072 8.9737) (layer "B.SilkS") (width 0.508) (fill none))
(fp_circle (center 1.905 10.8787) (end 2.286 10.8787) (layer "F.Fab") (width 0.508) (fill none))
(fp_line (start -5.7912 9.2583) (end -2.61874 9.2583) (layer "F.SilkS") (width 0.1524))
(fp_line (start 5.7912 9.2583) (end 5.7912 -9.2583) (layer "F.SilkS") (width 0.1524))
(fp_line (start 5.7912 -9.2583) (end -5.7912 -9.2583) (layer "F.SilkS") (width 0.1524))
(fp_line (start -5.7912 -9.2583) (end -5.7912 9.2583) (layer "F.SilkS") (width 0.1524))
(fp_line (start -5.6642 9.1313) (end 5.6642 9.1313) (layer "F.Fab") (width 0.0254))
(fp_line (start 5.6642 9.1313) (end 5.6642 -9.1313) (layer "F.Fab") (width 0.0254))
(fp_line (start 5.6642 -9.1313) (end -5.6642 -9.1313) (layer "F.Fab") (width 0.0254))
(fp_line (start -5.6642 -9.1313) (end -5.6642 9.1313) (layer "F.Fab") (width 0.0254))
(fp_line (start 2.61874 9.2583) (end 5.7912 9.2583) (layer "F.SilkS") (width 0.1524))
(pad "1" smd rect (at 1.905 8.9737) (size 0.762 6.35) (layers "F.Cu" "F.Paste" "F.Mask"))
(pad "2" smd rect (at 0.635 8.9737) (size 0.762 6.35) (layers "F.Cu" "F.Paste" "F.Mask"))
(pad "3" smd rect (at -0.635 8.9737) (size 0.762 6.35) (layers "F.Cu" "F.Paste" "F.Mask"))
(pad "4" smd rect (at -1.905 8.9737) (size 0.762 6.35) (layers "F.Cu" "F.Paste" "F.Mask"))
(pad "" np_thru_hole circle (at -3.81 -1.251301 90) (size 3.2512 3.2512) (drill 3.2512) (layers *.Cu *.Mask))
(pad "" np_thru_hole circle (at 3.81 -1.251301 90) (size 3.2512 3.2512) (drill 3.2512) (layers *.Cu *.Mask))
)
@@ -0,0 +1,170 @@
(footprint "ESP32-C3-DevKitM-1_minimal" (version 20221018) (generator pcbnew)
(layer "F.Cu")
(property "Sheetfile" "vtbt.kicad_sch")
(property "Sheetname" "")
(property "ki_description" "ESP32-C3-MINI-1 family is an ultra-low-power MCU-based SoC solution that supports 2.4 GHz Wi-Fi and Bluetooth®Low Energy (Bluetooth LE).")
(property "ki_keywords" "esp32-c3")
(attr through_hole)
(fp_text reference "U1" (at 22.352 39.116) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)))
(tstamp a5229f27-48b0-44cd-85af-2f9309802da6)
)
(fp_text value "ESP32-C3-DevKitM-1_minimal" (at 11.4 17.2 -90) (layer "F.SilkS")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp 8a2412ae-7f75-4048-9845-03ccec64c6bd)
)
(fp_text user "GPIO7" (at 21.59 17.78 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 02197d64-01cd-4cbc-84e3-5ba796384c9a)
)
(fp_text user "GPIO0~" (at 1.27 20.32 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 17d10918-4c8f-4904-893f-98427c4120b1)
)
(fp_text user "5V" (at 1.27 33.02 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 1c2a7e2c-106c-4f67-a008-9e9bb0fe51c4)
)
(fp_text user "GND" (at 21.59 15.24 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 24ddb3f4-098b-4f3b-b450-3ff3ddc061ac)
)
(fp_text user "GPIO5~" (at 21.59 22.86 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 26e65a2c-fd3d-4c7c-a18f-e16223a31a3a)
)
(fp_text user "GND" (at 1.27 12.7 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 289f723e-e803-4b47-87e8-6d95a909c4b8)
)
(fp_text user "GPIO8" (at 21.59 12.7 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 2b637ccf-a7cb-4dab-ab3d-7af642d6de3c)
)
(fp_text user "GPIO1~" (at 1.27 22.86 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 2ff3f751-f902-4f75-9fb7-708f2fda89de)
)
(fp_text user "3V3" (at 1.27 5.08 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 4c05d6ad-93e7-45ae-a5e5-d5affbb3faa4)
)
(fp_text user "GND" (at 1.27 17.78 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 4ef75710-3fc7-4972-be3c-7f39f1e060b8)
)
(fp_text user "3V3" (at 1.3 2.54 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 51ddbfbd-2b5f-40ac-9120-3e45ff10936b)
)
(fp_text user "GND" (at 21.59 0 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 5ba2ee03-c434-41bc-bf2b-86d7fbb4f1b2)
)
(fp_text user "RST" (at 1.27 15.24 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 5e3a40c7-605f-41cd-a270-229256fcb17f)
)
(fp_text user "GPIO19/USB_D-" (at 21.59 33.02 unlocked) (layer "F.SilkS")
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 5e645460-a0b3-453d-9b8e-27ad8f1034a6)
)
(fp_text user "GPIO10" (at 1.27 25.4 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 6c535123-abb3-40cd-9478-d1be1ebd54a4)
)
(fp_text user "GPIO4~" (at 21.59 25.4 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 71bb4e8d-bff1-484a-aed3-1c10a74117de)
)
(fp_text user "GND" (at 1.27 35.56 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 7955ab7b-69a4-4b6a-84ca-e912eb3353f4)
)
(fp_text user "GPIO21/U0TXD" (at 21.59 2.54 unlocked) (layer "F.SilkS")
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 91726c0a-cf51-473a-817d-b390b547f0c9)
)
(fp_text user "GND" (at 21.59 35.56 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp a7d24cd4-b1ba-4549-a776-bef82176b8fc)
)
(fp_text user "GND" (at 21.59 27.94 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp b0c907f6-b937-4dce-8033-15348ef9e3a0)
)
(fp_text user "GPIO6" (at 21.59 20.32 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp b8d9590d-6b48-44af-8cfa-ee8fa2e765e1)
)
(fp_text user "GND" (at 1.27 0 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp c05baa34-416a-4097-899e-2fbe5a8f0308)
)
(fp_text user "GPIO18/USB_D+" (at 21.59 30.48 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp cbde1815-bfe0-48d5-a7c9-cc391c38ac00)
)
(fp_text user "GPIO9" (at 21.59 10.16 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp e67984ba-ef3e-4b6f-b40f-8a7720e78eac)
)
(fp_text user "GPIO3~" (at 1.27 10.16 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp e77e495d-ad7b-49ee-a667-d97b9f9a11e8)
)
(fp_text user "GND" (at 1.27 27.94 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp e9178434-0fcc-4832-bbee-4ec2521108de)
)
(fp_text user "5V" (at 1.27 30.48 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp f0a831c6-071a-4341-b22b-e25c8af69bef)
)
(fp_text user "GPIO2~" (at 1.27 7.62 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp f37331f5-938f-4573-a08b-1a7be4fca2ed)
)
(fp_text user "GND" (at 21.59 7.62 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp f99a2932-99de-4f9a-9ee2-226b4bbd8a79)
)
(fp_text user "GPIO20/U0RXD" (at 21.59 5.08 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp fc5138c9-16ee-47fd-abc1-cde66ebe77c4)
)
(fp_text user "REF**" (at 11.43 27.686) (layer "F.Fab") hide
(effects (font (size 1 1) (thickness 0.15)))
(tstamp 2d750dfe-ca5a-4e07-8f9d-9cd2472cb484)
)
(pad "1" thru_hole rect (at 0 0 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp ed6ab563-f2c7-49e5-9d25-6110ffee8c7c))
(pad "2" thru_hole oval (at 0 2.54 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 9531d37c-f4b6-4aae-b140-ee7a199e6b01))
(pad "3" thru_hole oval (at 0 5.08 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 1abc2928-475b-4a33-97db-62d46d05909a))
(pad "4" thru_hole oval (at 0 7.62 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp e97ec3f6-b052-40d7-95c7-7400a0e370aa))
(pad "5" thru_hole oval (at 0 10.16 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp d9f4d117-89e0-4132-bd57-655124eec133))
(pad "6" thru_hole oval (at 0 12.7 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp ec13a4f5-cc14-40a4-b59f-9686573a1e77))
(pad "7" thru_hole oval (at 0 15.24 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp f201d33b-9b8f-42dc-95ab-a99ac56860cc))
(pad "8" thru_hole oval (at 0 17.78 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp d48a781a-225f-46b0-a3ad-adaf3df547cc))
(pad "9" thru_hole oval (at 0 20.32 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp fe595ee8-1ba2-4d71-936b-5b75fdbd1ed7))
(pad "10" thru_hole oval (at 0 22.86 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 6e244bd3-a80a-4056-bb59-654c26bf6e70))
(pad "11" thru_hole oval (at 0 25.4 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 807e0e6d-3614-4d8d-a292-b48bd2e0e506))
(pad "12" thru_hole oval (at 0 27.94 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 9250c379-c5cc-4af2-b8dd-4c8651ca5e74))
(pad "13" thru_hole oval (at 0 30.48 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp c2b2bef1-01f0-4e78-a464-6c76b3e3bda6))
(pad "14" thru_hole oval (at 0 33.02 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 8f27653a-7acd-484f-ac02-646cb42c1d33))
(pad "15" thru_hole oval (at 0 35.56 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp c951feba-1b10-4ddb-b40d-723dfac11f3c))
(pad "16" thru_hole oval (at 22.86 35.56 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 853509f0-8d20-4bf2-a72b-b72ce94f5a46))
(pad "17" thru_hole oval (at 22.86 33.02 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp e9b9303b-b57f-4a94-be36-e901beb5a613))
(pad "18" thru_hole oval (at 22.86 30.48 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 2b512480-7daa-4013-a2c7-f41ab3300cdf))
(pad "19" thru_hole oval (at 22.86 27.94 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 46f04b7e-55f4-4437-a4bb-dbc6672567ac))
(pad "20" thru_hole oval (at 22.86 25.4 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 0ab82eb4-ed05-4827-8a9d-373c6e4a6f6d))
(pad "21" thru_hole oval (at 22.86 22.86 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp a353b35e-4211-4ec8-b4a1-b6ceeca040d4))
(pad "22" thru_hole oval (at 22.86 20.32 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 151ccf23-ae94-4365-bbd8-fd5496c06cf0))
(pad "23" thru_hole oval (at 22.86 17.78 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 76cbc266-6fb9-4e28-a279-a670ba38cc65))
(pad "24" thru_hole oval (at 22.86 15.24 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp dbeaa27d-8eac-4d30-b47c-f0e234b55dab))
(pad "25" thru_hole oval (at 22.86 12.7 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 776fb045-8fe1-49d0-b425-7c98b07d9651))
(pad "26" thru_hole oval (at 22.86 10.16 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp b9bea529-955e-46ec-8f45-f3c313bc653a))
(pad "27" thru_hole oval (at 22.86 7.62 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 28a65c7a-ba24-450a-aa6e-b3e902a0e447))
(pad "28" thru_hole oval (at 22.86 5.08 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 7f60d443-1d9c-4d15-b19f-37ab2a69c376))
(pad "29" thru_hole oval (at 22.86 2.54 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 4a55c3fb-7eb2-4128-9f29-f67eb3789103))
(pad "30" thru_hole oval (at 22.86 0 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 23de8a74-5a6c-4d60-9e15-0c4be1bb5d03))
)
@@ -0,0 +1,170 @@
(footprint "ESP32-C3-DevKitM-1" (version 20221018) (generator pcbnew)
(layer "F.Cu")
(property "Sheetfile" "vtbt.kicad_sch")
(property "Sheetname" "")
(property "ki_description" "ESP32-C3-MINI-1 family is an ultra-low-power MCU-based SoC solution that supports 2.4 GHz Wi-Fi and Bluetooth®Low Energy (Bluetooth LE).")
(property "ki_keywords" "esp32-c3")
(attr through_hole)
(fp_text reference "U1" (at 22.352 39.116) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)))
(tstamp a5229f27-48b0-44cd-85af-2f9309802da6)
)
(fp_text value "ESP32-C3-DevKitM-1" (at 11.4 17.2 -90) (layer "F.SilkS")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp 8a2412ae-7f75-4048-9845-03ccec64c6bd)
)
(fp_text user "GPIO7" (at 21.59 17.78 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 02197d64-01cd-4cbc-84e3-5ba796384c9a)
)
(fp_text user "GPIO0~" (at 1.27 20.32 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 17d10918-4c8f-4904-893f-98427c4120b1)
)
(fp_text user "5V" (at 1.27 33.02 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 1c2a7e2c-106c-4f67-a008-9e9bb0fe51c4)
)
(fp_text user "GND" (at 21.59 15.24 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 24ddb3f4-098b-4f3b-b450-3ff3ddc061ac)
)
(fp_text user "GPIO5~" (at 21.59 22.86 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 26e65a2c-fd3d-4c7c-a18f-e16223a31a3a)
)
(fp_text user "GND" (at 1.27 12.7 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 289f723e-e803-4b47-87e8-6d95a909c4b8)
)
(fp_text user "GPIO8" (at 21.59 12.7 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 2b637ccf-a7cb-4dab-ab3d-7af642d6de3c)
)
(fp_text user "GPIO1~" (at 1.27 22.86 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 2ff3f751-f902-4f75-9fb7-708f2fda89de)
)
(fp_text user "3V3" (at 1.27 5.08 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 4c05d6ad-93e7-45ae-a5e5-d5affbb3faa4)
)
(fp_text user "GND" (at 1.27 17.78 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 4ef75710-3fc7-4972-be3c-7f39f1e060b8)
)
(fp_text user "3V3" (at 1.3 2.54 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 51ddbfbd-2b5f-40ac-9120-3e45ff10936b)
)
(fp_text user "GND" (at 21.59 0 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 5ba2ee03-c434-41bc-bf2b-86d7fbb4f1b2)
)
(fp_text user "RST" (at 1.27 15.24 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 5e3a40c7-605f-41cd-a270-229256fcb17f)
)
(fp_text user "GPIO19/USB_D-" (at 21.59 33.02 unlocked) (layer "F.SilkS")
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 5e645460-a0b3-453d-9b8e-27ad8f1034a6)
)
(fp_text user "GPIO10" (at 1.27 25.4 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 6c535123-abb3-40cd-9478-d1be1ebd54a4)
)
(fp_text user "GPIO4~" (at 21.59 25.4 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 71bb4e8d-bff1-484a-aed3-1c10a74117de)
)
(fp_text user "GND" (at 1.27 35.56 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp 7955ab7b-69a4-4b6a-84ca-e912eb3353f4)
)
(fp_text user "GPIO21/U0TXD" (at 21.59 2.54 unlocked) (layer "F.SilkS")
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp 91726c0a-cf51-473a-817d-b390b547f0c9)
)
(fp_text user "GND" (at 21.59 35.56 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp a7d24cd4-b1ba-4549-a776-bef82176b8fc)
)
(fp_text user "GND" (at 21.59 27.94 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp b0c907f6-b937-4dce-8033-15348ef9e3a0)
)
(fp_text user "GPIO6" (at 21.59 20.32 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp b8d9590d-6b48-44af-8cfa-ee8fa2e765e1)
)
(fp_text user "GND" (at 1.27 0 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp c05baa34-416a-4097-899e-2fbe5a8f0308)
)
(fp_text user "GPIO18/USB_D+" (at 21.59 30.48 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp cbde1815-bfe0-48d5-a7c9-cc391c38ac00)
)
(fp_text user "GPIO9" (at 21.59 10.16 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp e67984ba-ef3e-4b6f-b40f-8a7720e78eac)
)
(fp_text user "GPIO3~" (at 1.27 10.16 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp e77e495d-ad7b-49ee-a667-d97b9f9a11e8)
)
(fp_text user "GND" (at 1.27 27.94 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp e9178434-0fcc-4832-bbee-4ec2521108de)
)
(fp_text user "5V" (at 1.27 30.48 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp f0a831c6-071a-4341-b22b-e25c8af69bef)
)
(fp_text user "GPIO2~" (at 1.27 7.62 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify left))
(tstamp f37331f5-938f-4573-a08b-1a7be4fca2ed)
)
(fp_text user "GND" (at 21.59 7.62 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp f99a2932-99de-4f9a-9ee2-226b4bbd8a79)
)
(fp_text user "GPIO20/U0RXD" (at 21.59 5.08 unlocked) (layer "F.SilkS") hide
(effects (font (size 1 1) (thickness 0.15)) (justify right))
(tstamp fc5138c9-16ee-47fd-abc1-cde66ebe77c4)
)
(fp_text user "REF**" (at 11.43 27.686) (layer "F.Fab") hide
(effects (font (size 1 1) (thickness 0.15)))
(tstamp 2d750dfe-ca5a-4e07-8f9d-9cd2472cb484)
)
(pad "1" thru_hole rect (at 0 0 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp ed6ab563-f2c7-49e5-9d25-6110ffee8c7c))
(pad "2" thru_hole oval (at 0 2.54 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 9531d37c-f4b6-4aae-b140-ee7a199e6b01))
(pad "3" thru_hole oval (at 0 5.08 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 1abc2928-475b-4a33-97db-62d46d05909a))
(pad "4" thru_hole oval (at 0 7.62 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp e97ec3f6-b052-40d7-95c7-7400a0e370aa))
(pad "5" thru_hole oval (at 0 10.16 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp d9f4d117-89e0-4132-bd57-655124eec133))
(pad "6" thru_hole oval (at 0 12.7 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp ec13a4f5-cc14-40a4-b59f-9686573a1e77))
(pad "7" thru_hole oval (at 0 15.24 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp f201d33b-9b8f-42dc-95ab-a99ac56860cc))
(pad "8" thru_hole oval (at 0 17.78 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp d48a781a-225f-46b0-a3ad-adaf3df547cc))
(pad "9" thru_hole oval (at 0 20.32 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp fe595ee8-1ba2-4d71-936b-5b75fdbd1ed7))
(pad "10" thru_hole oval (at 0 22.86 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 6e244bd3-a80a-4056-bb59-654c26bf6e70))
(pad "11" thru_hole oval (at 0 25.4 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 807e0e6d-3614-4d8d-a292-b48bd2e0e506))
(pad "12" thru_hole oval (at 0 27.94 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 9250c379-c5cc-4af2-b8dd-4c8651ca5e74))
(pad "13" thru_hole oval (at 0 30.48 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp c2b2bef1-01f0-4e78-a464-6c76b3e3bda6))
(pad "14" thru_hole oval (at 0 33.02 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 8f27653a-7acd-484f-ac02-646cb42c1d33))
(pad "15" thru_hole oval (at 0 35.56 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp c951feba-1b10-4ddb-b40d-723dfac11f3c))
(pad "16" thru_hole oval (at 22.86 35.56 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 853509f0-8d20-4bf2-a72b-b72ce94f5a46))
(pad "17" thru_hole oval (at 22.86 33.02 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp e9b9303b-b57f-4a94-be36-e901beb5a613))
(pad "18" thru_hole oval (at 22.86 30.48 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 2b512480-7daa-4013-a2c7-f41ab3300cdf))
(pad "19" thru_hole oval (at 22.86 27.94 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 46f04b7e-55f4-4437-a4bb-dbc6672567ac))
(pad "20" thru_hole oval (at 22.86 25.4 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 0ab82eb4-ed05-4827-8a9d-373c6e4a6f6d))
(pad "21" thru_hole oval (at 22.86 22.86 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp a353b35e-4211-4ec8-b4a1-b6ceeca040d4))
(pad "22" thru_hole oval (at 22.86 20.32 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 151ccf23-ae94-4365-bbd8-fd5496c06cf0))
(pad "23" thru_hole oval (at 22.86 17.78 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 76cbc266-6fb9-4e28-a279-a670ba38cc65))
(pad "24" thru_hole oval (at 22.86 15.24 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp dbeaa27d-8eac-4d30-b47c-f0e234b55dab))
(pad "25" thru_hole oval (at 22.86 12.7 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 776fb045-8fe1-49d0-b425-7c98b07d9651))
(pad "26" thru_hole oval (at 22.86 10.16 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp b9bea529-955e-46ec-8f45-f3c313bc653a))
(pad "27" thru_hole oval (at 22.86 7.62 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 28a65c7a-ba24-450a-aa6e-b3e902a0e447))
(pad "28" thru_hole oval (at 22.86 5.08 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 7f60d443-1d9c-4d15-b19f-37ab2a69c376))
(pad "29" thru_hole oval (at 22.86 2.54 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 4a55c3fb-7eb2-4128-9f29-f67eb3789103))
(pad "30" thru_hole oval (at 22.86 0 270) (size 1.2 2) (drill 0.8) (layers "*.Cu" "*.Mask") (tstamp 23de8a74-5a6c-4d60-9e15-0c4be1bb5d03))
)
@@ -0,0 +1,124 @@
(kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor)
(symbol "LT1032CSW-PBF" (pin_names (offset 0.254)) (in_bom yes) (on_board yes)
(property "Reference" "U" (id 0) (at 35.56 10.16 0)
(effects (font (size 1.524 1.524)))
)
(property "Value" "LT1032CSW-PBF" (id 1) (at 35.56 7.62 0)
(effects (font (size 1.524 1.524)))
)
(property "Footprint" "SO-16_SW_LIT" (id 2) (at 0 0 0)
(effects (font (size 1.27 1.27) italic) hide)
)
(property "Datasheet" "LT1032CSW-PBF" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27) italic) hide)
)
(property "ki_keywords" "LT1032CSW#PBF" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_locked" "" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_fp_filters" "SO-16_SW_LIT SO-16_SW_LIT-M SO-16_SW_LIT-L" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "LT1032CSW-PBF_0_1"
(polyline
(pts
(xy 7.62 5.08)
(xy 7.62 -22.86)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.62 -22.86)
(xy 63.5 -22.86)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 63.5 -22.86)
(xy 63.5 5.08)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 63.5 5.08)
(xy 7.62 5.08)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(pin power_in line (at 0 0 0) (length 7.62)
(name "VEE" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin no_connect line (at 0 -2.54 0) (length 7.62)
(name "NC" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin no_connect line (at 0 -5.08 0) (length 7.62)
(name "NC" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
(pin unspecified line (at 0 -7.62 0) (length 7.62)
(name "ON/*OFF" (effects (font (size 1.27 1.27))))
(number "4" (effects (font (size 1.27 1.27))))
)
(pin no_connect line (at 0 -10.16 0) (length 7.62)
(name "NC" (effects (font (size 1.27 1.27))))
(number "5" (effects (font (size 1.27 1.27))))
)
(pin no_connect line (at 0 -12.7 0) (length 7.62)
(name "NC" (effects (font (size 1.27 1.27))))
(number "6" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at 0 -15.24 0) (length 7.62)
(name "GND" (effects (font (size 1.27 1.27))))
(number "7" (effects (font (size 1.27 1.27))))
)
(pin no_connect line (at 0 -17.78 0) (length 7.62)
(name "NC" (effects (font (size 1.27 1.27))))
(number "8" (effects (font (size 1.27 1.27))))
)
(pin no_connect line (at 71.12 -17.78 180) (length 7.62)
(name "NC" (effects (font (size 1.27 1.27))))
(number "9" (effects (font (size 1.27 1.27))))
)
(pin no_connect line (at 71.12 -15.24 180) (length 7.62)
(name "NC" (effects (font (size 1.27 1.27))))
(number "10" (effects (font (size 1.27 1.27))))
)
(pin no_connect line (at 71.12 -12.7 180) (length 7.62)
(name "NC" (effects (font (size 1.27 1.27))))
(number "11" (effects (font (size 1.27 1.27))))
)
(pin unspecified line (at 71.12 -10.16 180) (length 7.62)
(name "RESPONSECONTROL" (effects (font (size 1.27 1.27))))
(number "12" (effects (font (size 1.27 1.27))))
)
(pin no_connect line (at 71.12 -7.62 180) (length 7.62)
(name "NC" (effects (font (size 1.27 1.27))))
(number "13" (effects (font (size 1.27 1.27))))
)
(pin no_connect line (at 71.12 -5.08 180) (length 7.62)
(name "NC" (effects (font (size 1.27 1.27))))
(number "14" (effects (font (size 1.27 1.27))))
)
(pin unspecified line (at 71.12 -2.54 180) (length 7.62)
(name "STROBE" (effects (font (size 1.27 1.27))))
(number "15" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at 71.12 0 180) (length 7.62)
(name "VCC" (effects (font (size 1.27 1.27))))
(number "16" (effects (font (size 1.27 1.27))))
)
)
)
)
@@ -0,0 +1,128 @@
(kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor)
(symbol "MAX3181EEUK+T" (pin_names (offset 0.254)) (in_bom yes) (on_board yes)
(property "Reference" "U" (id 0) (at 35.56 10.16 0)
(effects (font (size 1.524 1.524)))
)
(property "Value" "MAX3181EEUK+T" (id 1) (at 35.56 7.62 0)
(effects (font (size 1.524 1.524)))
)
(property "Footprint" "21-0057F_MXM" (id 2) (at 0 0 0)
(effects (font (size 1.27 1.27) italic) hide)
)
(property "Datasheet" "MAX3181EEUK+T" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27) italic) hide)
)
(property "ki_keywords" "MAX3181EEUK+T" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_locked" "" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_fp_filters" "21-0057F_MXM 21-0057F_MXM-M 21-0057F_MXM-L" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "MAX3181EEUK+T_0_1"
(polyline
(pts
(xy 7.0993 0.5207)
(xy 6.0579 0)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.0993 -0.5207)
(xy 6.0579 0)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 64.0207 -4.5593)
(xy 65.0621 -5.08)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 64.0207 -5.6007)
(xy 65.0621 -5.08)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 64.0207 -2.54)
(xy 65.0621 -2.0193)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 64.0207 -2.54)
(xy 65.0621 -3.0607)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.62 5.08)
(xy 7.62 -10.16)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 7.62 -10.16)
(xy 63.5 -10.16)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 63.5 -10.16)
(xy 63.5 5.08)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(polyline
(pts
(xy 63.5 5.08)
(xy 7.62 5.08)
)
(stroke (width 0.127) (type default) (color 0 0 0 0))
(fill (type none))
)
(pin output line (at 0 0 0) (length 7.62)
(name "*INVALID" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at 0 -2.54 0) (length 7.62)
(name "GND" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin output line (at 71.12 -5.08 180) (length 7.62)
(name "ROUT" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
(pin input line (at 71.12 -2.54 180) (length 7.62)
(name "RIN" (effects (font (size 1.27 1.27))))
(number "4" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at 71.12 0 180) (length 7.62)
(name "VCC" (effects (font (size 1.27 1.27))))
(number "5" (effects (font (size 1.27 1.27))))
)
)
)
)
@@ -0,0 +1,28 @@
(footprint CONV_PXO7805-500-S (layer F.Cu) (tedit 65F7AB42)
(descr "")
(fp_text reference REF** (at 1.905 -3.429 0) (layer F.SilkS)
(effects (font (size 1.4 1.4) (thickness 0.15)))
)
(fp_text value CONV_PXO7805-500-S (at 13.462 6.731 0) (layer F.Fab)
(effects (font (size 1.4 1.4) (thickness 0.15)))
)
(pad 1 thru_hole rect (at 0.0 0.0) (size 1.508 1.508) (drill 1.0) (layers *.Cu *.Mask) (solder_mask_margin 0.102))
(pad 2 thru_hole circle (at 2.54 0.0) (size 1.508 1.508) (drill 1.0) (layers *.Cu *.Mask) (solder_mask_margin 0.102))
(pad 3 thru_hole circle (at 5.08 0.0) (size 1.508 1.508) (drill 1.0) (layers *.Cu *.Mask) (solder_mask_margin 0.102))
(fp_line (start -2.59 -0.74) (end 7.68 -0.74) (layer F.Fab) (width 0.127))
(fp_line (start 7.68 -0.74) (end 7.68 5.26) (layer F.Fab) (width 0.127))
(fp_line (start 7.68 5.26) (end -2.59 5.26) (layer F.Fab) (width 0.127))
(fp_line (start -2.59 5.26) (end -2.59 -0.74) (layer F.Fab) (width 0.127))
(fp_line (start -2.59 5.26) (end -2.59 -0.74) (layer F.SilkS) (width 0.127))
(fp_line (start 7.68 5.26) (end -2.59 5.26) (layer F.SilkS) (width 0.127))
(fp_line (start 7.68 -0.74) (end 7.68 5.26) (layer F.SilkS) (width 0.127))
(fp_line (start 6.1475 -0.74) (end 7.68 -0.74) (layer F.SilkS) (width 0.127))
(fp_line (start -2.59 -0.74) (end -1.0675 -0.74) (layer F.SilkS) (width 0.127))
(fp_line (start -2.84 -1.004) (end 7.93 -1.004) (layer F.CrtYd) (width 0.05))
(fp_line (start 7.93 -1.004) (end 7.93 5.51) (layer F.CrtYd) (width 0.05))
(fp_line (start 7.93 5.51) (end -2.84 5.51) (layer F.CrtYd) (width 0.05))
(fp_line (start -2.84 5.51) (end -2.84 -1.004) (layer F.CrtYd) (width 0.05))
(fp_circle (center -3.21 0.0) (end -3.11 0.0) (layer F.SilkS) (width 0.2))
(fp_circle (center -3.21 0.0) (end -3.11 0.0) (layer F.Fab) (width 0.2))
)
@@ -0,0 +1,24 @@
BY ACCESSING OR USING THESE SYMBOLS & FOOTPRINTS ("MODELS"), YOU ARE ACKNOWLEDGING THAT YOU HAVE READ, FULLY UNDERSTAND AND AGREE TO THESE TERMS AND CONDITIONS (the "Agreement"), WHICH CONSTITUTE A BINDING AGREEMENT BETWEEN YOU AND SnapMagic Search, INC., ENTERED INTO ON THE DATE OF SUCH OCCURRENCE (the "Effective Date"). IF YOU ARE ACCESSING OR USING THESE FILES ON BEHALF OF AN ENTITY, YOU REPRESENT THAT YOU HAVE THE RIGHT, AUTHORITY, AND CAPACITY TO BIND SUCH ENTITY TO THIS AGREEMENT AND HEREBY DO SO. IF YOU DO NOT AGREE WITH ANY OF THE TERMS OR CONDITIONS OF THIS AGREEMENT, YOU MUST NOT USE ANY PART OF THESE MODELS.
1. Design License
You and your sub-licensees are hereby licensed to design, manufacture, use and distribute, circuit board designs and circuit boards formed by combining Models provided by SnapMagic Search with other circuit elements of your choosing. You may then convey such combinations under licensing terms of your choice. 
Individual Models remain the intellectual property of SnapMagic Search, Inc. You shall not (and shall not permit or encourage any third party to) to do any of the following :
(a) sell, assign, lease, lend, rent, issue, sublicense, make available, or otherwise distribute to any third party, or publicly perform, display or communicate, the Models (for example, by uploading Models to another website or software application);

(b) remove, alter, or conceal, any copyright, trademark, or other proprietary rights notice or legend displayed or contained in the individual Models.
For further clarity, once integrated into a schematic design or PCB layout, Models may be modified freely for the purpose of designing a circuit board. 
2. Limitation of Liability
IN NO EVENT WILL SnapMagic Search OR OUR SUBSIDIARIES, AGENTS, SUCCESSORS, THIRD PARTY PROVIDERS, AND/OR ANY OF THE FOREGOING ENTITIES' RESPECTIVE DIRECTORS, OFFICERS, EMPLOYEES, AGENTS, REPRESENTATIVES, CUSTOMERS, SUPPLIERS, OR LICENSORS BE RESPONSIBLE OR LIABLE UNDER, OR OTHERWISE IN CONNECTION WITH THIS AGREEMENT, FOR:
(a) ANY CONSEQUENTIAL, INDIRECT, SPECIAL, INCIDENTAL, OR PUNITIVE DAMAGES;
(b) ANY LOSS OF PROFITS, LOSS OF BUSINESS, LOSS OF REVENUE, OR LOSS OF ANTICIPATED SAVINGS;
(c) ANY LOSS OF, OR DAMAGE TO, DATA, REPUTATION, OR GOODWILL; AND/OR
(d) THE COST OF PROCURING ANY SUBSTITUTE GOODS OR SERVICES.
THE COMBINED AGGREGATE LIABILITY OF SnapMagic Search AND ALL SnapMagic Search CONTENT AFFILIATES UNDER, OR OTHERWISE IN CONNECTION WITH, THIS AGREEMENT SHALL NOT EXCEED THE TOTAL AMOUNT OF FEES RECEIVED BY SnapMagic Search FROM YOU IN THE PREVIOUS TWELVE (12) MONTHS. THE FOREGOING EXCLUSIONS AND LIMITATIONS SHALL APPLY: (a) EVEN IF SnapMagic Search OR ANY SnapMagic Search CONTENT AFFILIATE HAS BEEN ADVISED, OR SHOULD HAVE BEEN AWARE, OF THE POSSIBILITY OF LOSSES, DAMAGES, OR COSTS; (b) EVEN IF ANY REMEDY IN THIS AGREEMENT FAILS OF ITS ESSENTIAL PURPOSE; AND (c) REGARDLESS OF THE THEORY OR BASIS OF LIABILITY (INCLUDING WITHOUT LIMITATION BREACH OF CONTRACT, TORT, NEGLIGENCE, AND STRICT LIABILITY).
@@ -0,0 +1,98 @@
(kicad_symbol_lib (version 20220914) (generator kicad_symbol_editor)
(symbol "PXO7805-500-S" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
(property "Reference" "PS" (at -15.24 5.842 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
)
(property "Value" "PXO7805-500-S" (at -15.24 -7.62 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
)
(property "Footprint" "PXO7805-500-S:CONV_PXO7805-500-S" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "Datasheet" "" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "PARTREV" "08/22/2022" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MANUFACTURER" "CUI" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "STANDARD" "Manufacturer Recommendations" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MAXIMUM_PACKAGE_HEIGHT" "8.61mm" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "SNAPEDA_PN" "PXO7803-500-S" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(symbol "PXO7805-500-S_0_0"
(rectangle (start -15.24 -5.08) (end 15.24 5.08)
(stroke (width 0.254) (type default))
(fill (type background))
)
(pin input line (at -20.32 2.54 0) (length 5.08)
(name "VIN" (effects (font (size 1.016 1.016))))
(number "1" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at 20.32 -2.54 180) (length 5.08)
(name "GND/-VOUT" (effects (font (size 1.016 1.016))))
(number "2" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at 20.32 2.54 180) (length 5.08)
(name "VOUT/GND" (effects (font (size 1.016 1.016))))
(number "3" (effects (font (size 1.016 1.016))))
)
)
)
(symbol "PXO7805-500-S_positive" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
(property "Reference" "PS" (at -15.24 5.842 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
)
(property "Value" "PXO7805-500-S" (at -15.24 -7.62 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
)
(property "Footprint" "PXO7805-500-S:CONV_PXO7805-500-S" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "Datasheet" "" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "PARTREV" "08/22/2022" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MANUFACTURER" "CUI" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "STANDARD" "Manufacturer Recommendations" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MAXIMUM_PACKAGE_HEIGHT" "8.61mm" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "SNAPEDA_PN" "PXO7803-500-S" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(symbol "PXO7805-500-S_positive_0_0"
(rectangle (start -15.24 -5.08) (end 15.24 5.08)
(stroke (width 0.254) (type default))
(fill (type background))
)
(pin input line (at -20.32 2.54 0) (length 5.08)
(name "VIN" (effects (font (size 1.016 1.016))))
(number "1" (effects (font (size 1.016 1.016))))
)
)
(symbol "PXO7805-500-S_positive_1_0"
(pin power_in line (at 0 -10.16 90) (length 5.08)
(name "GND" (effects (font (size 1.016 1.016))))
(number "2" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at 20.32 2.54 180) (length 5.08)
(name "VOUT" (effects (font (size 1.016 1.016))))
(number "3" (effects (font (size 1.016 1.016))))
)
)
)
)
@@ -0,0 +1,147 @@
(kicad_symbol_lib (version 20220914) (generator kicad_symbol_editor)
(symbol "PXO7805-500-S" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
(property "Reference" "PS" (at -15.24 5.842 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
)
(property "Value" "PXO7805-500-S" (at -15.24 -7.62 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
)
(property "Footprint" "PXO7805-500-S:CONV_PXO7805-500-S" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "Datasheet" "" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "PARTREV" "08/22/2022" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MANUFACTURER" "CUI" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "STANDARD" "Manufacturer Recommendations" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MAXIMUM_PACKAGE_HEIGHT" "8.61mm" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "SNAPEDA_PN" "PXO7803-500-S" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(symbol "PXO7805-500-S_0_0"
(rectangle (start -15.24 -5.08) (end 15.24 5.08)
(stroke (width 0.254) (type default))
(fill (type background))
)
(pin input line (at -20.32 2.54 0) (length 5.08)
(name "VIN" (effects (font (size 1.016 1.016))))
(number "1" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at 20.32 -2.54 180) (length 5.08)
(name "GND/-VOUT" (effects (font (size 1.016 1.016))))
(number "2" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at 20.32 2.54 180) (length 5.08)
(name "VOUT/GND" (effects (font (size 1.016 1.016))))
(number "3" (effects (font (size 1.016 1.016))))
)
)
)
(symbol "PXO7805-500-S_negative" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
(property "Reference" "PS" (at -15.24 5.842 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
)
(property "Value" "PXO7805-500-S" (at -15.24 -7.62 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
)
(property "Footprint" "PXO7805-500-S:CONV_PXO7805-500-S" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "Datasheet" "" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "PARTREV" "08/22/2022" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MANUFACTURER" "CUI" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "STANDARD" "Manufacturer Recommendations" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MAXIMUM_PACKAGE_HEIGHT" "8.61mm" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "SNAPEDA_PN" "PXO7803-500-S" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(symbol "PXO7805-500-S_negative_0_0"
(rectangle (start -15.24 -5.08) (end 15.24 5.08)
(stroke (width 0.254) (type default))
(fill (type background))
)
(pin input line (at -20.32 2.54 0) (length 5.08)
(name "VIN" (effects (font (size 1.016 1.016))))
(number "1" (effects (font (size 1.016 1.016))))
)
)
(symbol "PXO7805-500-S_negative_1_0"
(pin power_in line (at 20.32 2.54 180) (length 5.08)
(name "-VOUT" (effects (font (size 1.016 1.016))))
(number "2" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at 0 -10.16 90) (length 5.08)
(name "GND" (effects (font (size 1.016 1.016))))
(number "3" (effects (font (size 1.016 1.016))))
)
)
)
(symbol "PXO7805-500-S_positive" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
(property "Reference" "PS" (at -15.24 5.842 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
)
(property "Value" "PXO7805-500-S" (at -15.24 -7.62 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
)
(property "Footprint" "PXO7805-500-S:CONV_PXO7805-500-S" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "Datasheet" "" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "PARTREV" "08/22/2022" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MANUFACTURER" "CUI" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "STANDARD" "Manufacturer Recommendations" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MAXIMUM_PACKAGE_HEIGHT" "8.61mm" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "SNAPEDA_PN" "PXO7803-500-S" (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(symbol "PXO7805-500-S_positive_0_0"
(rectangle (start -15.24 -5.08) (end 15.24 5.08)
(stroke (width 0.254) (type default))
(fill (type background))
)
(pin input line (at -20.32 2.54 0) (length 5.08)
(name "VIN" (effects (font (size 1.016 1.016))))
(number "1" (effects (font (size 1.016 1.016))))
)
)
(symbol "PXO7805-500-S_positive_1_0"
(pin power_in line (at 0 -10.16 90) (length 5.08)
(name "GND" (effects (font (size 1.016 1.016))))
(number "2" (effects (font (size 1.016 1.016))))
)
(pin power_in line (at 20.32 2.54 180) (length 5.08)
(name "VOUT" (effects (font (size 1.016 1.016))))
(number "3" (effects (font (size 1.016 1.016))))
)
)
)
)
File diff suppressed because it is too large. Load diff
@@ -0,0 +1 @@
<!DOCTYPE HTML><html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="refresh" content="0; url=https://www.snapeda.com/about/import/#"> <script type="text/javascript">window.location.href="https://www.snapeda.com/about/import/#" </script> <title>Page Redirection</title> </head> <body> If you are not redirected automatically, follow this <a href="https://www.snapeda.com/about/import/#">link to the import guide</a>. </body></html>
Loaded 100 of 129 files, more files were not shown because too many files have changed in this diff. Show more