The Data Acquisition Board for Pi Pico is an analogue front end for the Raspberry Pico. |
What is that module?
It's a library for the data acquisition board. The module includes
- SCPI commands to get the 2 analogue input values
- the initialisation code,
- board detection
- communication with the ADC
Adding support to projects based on the PST.. template design (see Do you want to create your own Pico SCPI device, based on PST.. Pico SCPI USBTMC labLib (and labTool)? ) is easy. A few (really, 5!) lines of code.
Add support for the board to your firmware
Starting point: you have started a project based on the PST template (see again Do you want to create your own Pico SCPI device, based on PST.. Pico SCPI USBTMC labLib (and labTool)? )
- Go to the project base folder.
- Add the submodule
- Amend the CMake file (1 line)
- Add an include (1 line), init code (2 lines), and SCPI commands (1 line)
Here are the details:
In your project base folder, execute these commands to add the module:
git submodule add https://github.com/jancumps/pico_scpi_mod_dataacquisitionboard.git
git add .
git commit -a -m "PSA as submodule"
git push
In ./CMakeList.txt, add this line:
pico_add_subdirectory(pico_scpi_mod_dataacquisitionboard)
This will add the include folder to the path, and take care that the lib sources are built when you build your firmware.
In ./scpi/scpi-def.c, add to the includes:
this to the scpi commands section:
INSTRUMENT_DAB_INP_COMMANDS
initDabUtils();
initDabPins();
That is it. Your instrument now supports the Data Acquisition Board for Pi Pico