GithubHelp home page GithubHelp logo

mahlburgc / stm32-pwm-music Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.1 MB

Create (mulitple) PWM audio signals to compose your own music on STM32 with Low Layer (LL) Library.

C 99.81% Assembly 0.19%

stm32-pwm-music's Introduction

STM32 PWM Music Module

This repository is used to create PWM audio signals on STM32 MCUs with Low Layer (LL) Library. This implementation is based on a STM32F07B-DISCO board using STM32CubeIDE (Version: 1.10.1) and CubeMX to initialize peripherals. The speaker and music module can be easily moved to any other STM32 implementation.

This implementation uses 3 PWM outputs to create up to 3 different audio signals at the same time. But it's possible to initialize even more PWM outputs, as long as Timers with Capture and Compare PWM Output Channels are available on the MCU. FreeRTOS is used for an easy implementation of playing different soundtracks at the same time, even if this implementation is not thread safe.

Implemented songs:

  • Zelda Overworld Soundtrack
  • Tetris + Tetris Ragtime Edition
  • ACDC - Thunderstruck Intro
  • Super Mario Bros. (just frist few notes)
  • alarm sound (with frequency sweeping)

Circuit Diagram

Circuit with three speakers

Important: The used pins does not met the real pin positions an a STM32 Nucleo board.

stm32-pwm-music's People

Contributors

mahlburgc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.