首页 | 本学科首页   官方微博 | 高级检索  
     

基于PIC单片机PWM模式的音乐播放系统设计
引用本文:高玉敏,宋建华.基于PIC单片机PWM模式的音乐播放系统设计[J].测控技术,2014,33(9):72-75.
作者姓名:高玉敏  宋建华
作者单位:中航工业北京航空制造工程研究所,北京,100024
摘    要:针对51单片机I/O定时翻转电平驱动蜂鸣器方法存在的缺点,以PIC单片机为核心控制元件,利用内部PWM硬件资源,实现了简易音乐播放系统设计。通过改变PWM端口输出脉冲信号频率及脉宽,驱动蜂呜器发出不同音调,并结合单片机内部定时器中断控制音调高低及节拍长度,此外可通过4×4矩阵键盘实现简单音乐弹奏。实验结果表明,该系统硬件电路简单,软件占用CPU时间少,易控制音乐音调及节拍,音色纯正,具有一定的实用与参考价值。

关 键 词:PWM  音乐播放  定时器中断

Design of Music Playing System Based on the PWM Mode of PIC Microcontroller
GAO Yu-min , SONG Jian-hua.Design of Music Playing System Based on the PWM Mode of PIC Microcontroller[J].Measurement & Control Technology,2014,33(9):72-75.
Authors:GAO Yu-min  SONG Jian-hua
Abstract:A simple music playing system based on the PWM mode of PIC microcontroller is designed to replace the method which using 51 microcontroller I/O timing logic high-low level reversal to drive buzzer.The system can give forth vary tones by changing frequency and pulse width of the PWM signal,the inflection and duration of the tone is controlled by the timer interrupt of microcontroller,and the system can play various music by typing the 4×4 matrix keyboard.Experimental results show that the system hardware circuit is simple,software occupies less CPU time,the tone and duration of the music can be controlled easily,moreover,it sounds pure.The system has some practical and reference value.
Keywords:PWM  music playing  timer interrupt
本文献已被 CNKI 万方数据 等数据库收录!
点击此处可从《测控技术》浏览原始摘要信息
点击此处可从《测控技术》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号