A signal generator based on a Raspberry Pi Pico
The signal generator can generate square, triangular, saw-tooth, and sine waves of a 3.3 V amplitude and a variable frequency. The signal is generated by the microcontroller using PWM and then smoothed out using an RC low-pass filter with a cutoff frequency of 5 kHz.
Component | Value |
---|---|
R1 | 270 Ω |
C1 | 0.1 µF |
RV1 | 10 kΩ |
-
make
; -
cmake
; -
gcc
,g++
; -
arm-none-eabi-gcc-cs
or equivalent for ARM cross-compilation; -
arm-none-eabi-newlib
or equivalent; -
Raspberry Pi Pico C/C++ SDK;
Edit Source/CMakeLists.txt
to include the pico_sdk_init.cmake
from your Pico C/C++ SDK folder
include(~/Path/pico-sdk/pico_sdk_init.cmake)
Run the Source/build.sh
script to build the firmware (and chmod +x ./Source/build.sh
the first time). You can run a clean build by deleting the ./Source/build
directory first.
cd ./Source
./build.sh
The firmware binary will be in ./Source/build/SignalGenerator.uf2
.