摘要
基于32位的STM32F103,利用PWM产生的音频信号驱动蜂鸣器演奏乐曲,实现了音乐播放器的应用设计。该播放器能实现从低音到高音的21个音阶,并能根据乐谱演奏完整的曲目。测试结果表明,PWM的输出信号与各音阶对应的声音频率基本一致,方案切实可行。这一方法也可用于电机控制、电子琴设计等方面,具有较好的实用性。
Based on 32-bit STM32F103, using audio signals produced by PWM to drive a buzzer to play music, a music player is de- signed. The player can realize 21 scales from bass to treble and play complete songs according to music scores. Test results show that the output signals of PWM are consistent with the corresponding voice frequency of the scales, and the scheme is feasible. This method can also be used in motor control, keyboard design and so on, showing good practicality.
出处
《单片机与嵌入式系统应用》
2012年第11期63-65,共3页
Microcontrollers & Embedded Systems