RP2040 firmware that reads SSI absolute encoders via two MAX485 modules and streams the position over USB serial. PIO-driven (on the PIO branch), sub-µs jitter.
Find a file
lucavanstraaten a8633962f2 Reimplement SSI read using RP2040 PIO state machine
Replace dual-core FIFO bit-bang approach with a dedicated PIO program:
- Add ssi.pio: PIO assembly for SSI master (side-set CLK, sample DATA)
- Add ssi.pio.h: pioasm-generated C header
- ssi_pio_init(): load program, wire CLK/DATA pins, set clock divider
- ssi_pio_reconfigure_speed(): live clock-divider update between reads
- ssi_pio_read(): push bit-count to TX FIFO, block on RX result word
- Remove dual-core headers, FIFO structs, setup1/loop1, requestSsiRead
- Bit limit reduced to 1..32 (single PIO ISR word)
- TX_DI pin ownership transferred to PIO (no pinMode/digitalWrite)
2026-04-28 21:12:54 +02:00
.vscode Initial commit 2026-04-28 20:48:26 +02:00
include Initial commit 2026-04-28 20:48:26 +02:00
lib Initial commit 2026-04-28 20:48:26 +02:00
src Reimplement SSI read using RP2040 PIO state machine 2026-04-28 21:12:54 +02:00
test Initial commit 2026-04-28 20:48:26 +02:00
.gitignore Initial commit 2026-04-28 20:48:26 +02:00
platformio.ini Initial commit 2026-04-28 20:48:26 +02:00