Skip to content

xfgryujk/c51-play-music

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

c51-play-music

51单片机播放音乐

相关博客

编译方法

蜂鸣器

  1. 蜂鸣器乐谱放到scripts/beep.json
  2. 运行scripts/tone_to_loop_count.py
  3. 编译beep/beep.uvproj

DA转换

  1. 将音频文件剪辑到大约10秒,重采样到大约5000Hz采样率,保存到scripts/flower dance.wav
  2. 运行scripts/wav_to_code.py
  3. 编译dac/dac.uvproj

PWM

  1. 将音频文件剪辑到大约10秒,重采样到大约5000Hz采样率,保存到scripts/flower dance.wav
  2. 运行scripts/wav_to_pwm.py
  3. 编译pwm/pwm.uvproj