examples/device/usbtmc/README.md
A USB Test & Measurement Class (USBTMC) instrument with USB488/SCPI support, behaving like a simple programmable instrument.
*IDN? with an identification string (TinyUSB,ModelNumber,SerialNumber,FirmwareVer123456).delay <ms> command adjusts that simulated response delay (0–10000 ms).| Interface | Class driver |
|---|---|
| 0 | USBTMC |
Notable tusb_config.h settings:
#define CFG_TUD_USBTMC 1
#define CFG_TUD_USBTMC_ENABLE_INT_EP 1
#define CFG_TUD_USBTMC_ENABLE_488 1
CMake:
mkdir build && cd build
cmake -DBOARD=raspberry_pi_pico ..
cmake --build .
Make:
make BOARD=raspberry_pi_pico all
The device appears as a USBTMC test-and-measurement instrument. Talk to it with a VISA/SCPI tool (for example PyVISA). The included visaQuery.py opens the instrument and sends *IDN?:
python visaQuery.py