Raspberry Pi Pico firmware for closed-loop control of a BIO-RAD 3000Xi high-voltage power supply. Runs on both cores: Core 0 drives the DAC ramp and control loop; Core 1 handles the USB serial console.
Requires the Pico SDK.
export PICO_SDK_PATH=/path/to/pico-sdk
cmake -S . -B build
cmake --build buildOutput: build/picoemp.uf2
Hold BOOTSEL on the Pico while connecting USB, then copy biorad.uf2
to the mounted RPI-RP2 drive. To reflash from the serial console, use the
b command to reboot into bootloader mode.
| File | Purpose |
|---|---|
main.c |
Core 0 main loop: DAC ramp, control loop, FIFO dispatch |
serial.c/h |
Core 1 USB serial console and command parser |
control_loop.c/h |
Closed-loop voltage regulation, ramp, fault handling |
cal.c/h |
PWM→volts calibration table, flash persistence |
psu_monitor.c/h |
PIO-based PWM period measurement (voltage + current) |
dac.c/h |
SPI DAC driver |
biorad.c/h |
GPIO pin definitions and helpers |
freq_measure.pio |
PIO program: rise-to-rise period counter |
dac_sequencer.pio |
PIO program: SPI DAC sequencer |
trigger_basic.pio |
PIO program: fast external trigger |