- scripts/flash-useq-main.sh + scripts/flash-useq-expander.sh: build + flash each uSEQ board via PlatformIO (nix-shell fallback for pio; extra args pass through; BOOTSEL hint). - CV backend: green status now means a CONFIRMED handshake, not just an open port. Any valid device->host frame (the firmware streams INPUT at 20 Hz, or an identify ack) flips it ready/green; a 2.5s watchdog after open surfaces a red 'no response from module' if nothing replies. idle/grey when nothing connected. - Outputs panel CV config: explicit handshake indicator (coloured dot + label — green 'Module handshake OK' / amber waiting / red error / grey not connected). - Docs: firmware README + MAP.md note the scripts.
56 lines
2.2 KiB
Markdown
56 lines
2.2 KiB
Markdown
# uSEQ-CV firmware
|
||
|
||
Turns a [uSEQ](https://www.emutelabinstruments.co.uk/useq/) module (+ its CV
|
||
expander) into a USB→CV/gate converter driven by the Manifold browser app's **CV
|
||
output backend** (or, in future, the MEMLNaut RP2350 firmware directly). This is
|
||
the restored + modernised descendant of the April-2026 "uSEQ-Celium" output mode
|
||
(provenance in `docs/useq-celium/protocol.md`).
|
||
|
||
Both boards are RP2040 (Raspberry Pi Pico / uSEQ hardware) flashed with the
|
||
Arduino-Pico (Earle Philhower) core. The wire protocol (v2) is defined once in
|
||
`shared/protocol.h` and mirrored by `manifold/src/backends/useq-protocol.ts`.
|
||
|
||
```
|
||
shared/protocol.h uSEQ-CV v2 wire protocol (single source of truth)
|
||
main/ uSEQ main module: USB serial → CV1..3 + GATE1..3, I2C → expander
|
||
expander/ uSEQ expander: I2C slave → CV4..11 (8× PWM)
|
||
```
|
||
|
||
## Topology
|
||
|
||
| Channel | Board | Pin(s) | Type |
|
||
|------------|-----------|---------------|---------------|
|
||
| CV1–CV3 | main | 21, 20, 19 | PWM (11-bit) |
|
||
| GATE1–GATE3| main | 18, 17, 16 | digital |
|
||
| CV4–CV11 | expander | 13,14,10,11,8,7,5,3 | PWM (11-bit) |
|
||
|
||
The main board forwards CV4–CV11 to the expander over I2C (addr `0x10`, 400 kHz)
|
||
and rescans every 2 s until the expander is found (hot-attach friendly).
|
||
|
||
## Build / flash
|
||
|
||
Convenience scripts (resolve PlatformIO via `nix-shell` if `pio` isn't on PATH;
|
||
extra args pass through to `pio`, e.g. `--upload-port /dev/ttyACM0`):
|
||
|
||
```bash
|
||
scripts/flash-useq-main.sh # build + flash the main module
|
||
scripts/flash-useq-expander.sh # build + flash the expander
|
||
```
|
||
|
||
If an upload can't auto-reset the board, hold **BOOTSEL** while plugging in USB.
|
||
|
||
Raw PlatformIO, equivalently:
|
||
|
||
```bash
|
||
cd firmware/useq-celium/main && pio run -e main -t upload
|
||
cd firmware/useq-celium/expander && pio run -e expander -t upload
|
||
```
|
||
|
||
(Or open each `.cpp` in the Arduino IDE with the RP2040 "Earle Philhower" core and
|
||
add `firmware/useq-celium/shared` to the include path.)
|
||
|
||
## Protocol smoke
|
||
|
||
Hold the browser's **Identify** button (CV backend config) → both boards run an
|
||
LED sweep, confirming the USB + I2C links end-to-end. Full frame layout:
|
||
`docs/useq-celium/protocol.md`.
|