Skip to content

BogdanTheGeek/ch32fun-audio

Repository files navigation

Audio Playback on a CH32V00X

Example code for playing audio on a CH32V006 using PWM and DMA.

Hardware

Small speaker connected to PC3 though a large capacitor(in series), at least 10uF.

The example PCB is designed for experimentation, therefore it also includes USB, SPI-FLASH and a can use the internal OPAMP as a second order low-pass filter. All of these features are optional. image

Getting Started

  1. Get everything:
git clone --recurse-submodules
  1. Build tools:
make tools
  1. Convert audio file to code:
./tools/wav2code beep-boop.wav > samples.h
  1. Build and flash:
make
  1. Run and interract with the program:
make monitor

Warning

Make sure the audio file is encoded as 16-bit signed PCM, mono, and 32kHz sample rate(this can be adjusted).

About

Example Audio playback with ch32fun

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published