https://github.com/charkster/samd21-usbtmc-ina260
Combine a SAMD21 and a INA260 to create a USBTMC instrument
https://github.com/charkster/samd21-usbtmc-ina260
ina260 pyvisa samd21 usbtmc
Last synced: 4 months ago
JSON representation
Combine a SAMD21 and a INA260 to create a USBTMC instrument
- Host: GitHub
- URL: https://github.com/charkster/samd21-usbtmc-ina260
- Owner: charkster
- License: mit
- Created: 2023-10-26T02:18:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-26T03:26:41.000Z (over 1 year ago)
- Last Synced: 2025-01-13T19:26:53.120Z (5 months ago)
- Topics: ina260, pyvisa, samd21, usbtmc
- Language: C
- Homepage:
- Size: 35.2 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# samd21-usbtmc-ina260
Combine a SAMD21 and a INA260 to create a USBTMC instrument.Adafruit SAMD21 QT PY | Adafruit INA260 | STEMMA QT / QWIIC
:-------------------------:|:-------------------------:|:-------------------------:|
 |  | SDA, SCL, 3.3V and GND signals shared using the STEMMA QT cable (just add pins to INA260 board).
Program the SAMD21 QT_PY board by double-clicking the push-button and drag-n-drop the provided [UF2 file](https://github.com/charkster/samd21-usbtmc-ina260/blob/main/qt_py-samd21-usbtmc-ina260.uf2)Here are the supported SCPI commands:
***IDN?** (query the instrument name, returns 'INA260\nINA260:VOLTAGE? INA260:CURRENT? INA260:POWER?')
***RST** (Sends the Reset command to INA260 over I2C)
**INA260:VOLTAGE?** (query the Bus voltage on INA260)
**INA260:CURRENT?** (query the current flow on INA260, negative means reverse direction)
**INA260:POWER?** (query the power on INA260)
My C string parsing is very crude so the **SCPI** command **must match** what I have listed above (or be in lowercase).
All the major credit goes to [Nathan Conrad (TINYUSB's USBTMC author)](https://github.com/pigrew) and [Alex Taradov's SAMD21 bare metal peripheral control](https://github.com/ataradov/dgw).