基于PIC单片机PWM模式的音乐播放系统设计  被引量:3

Design of Music Playing System Based on the PWM Mode of PIC Microcontroller

在线阅读下载全文

作  者:高玉敏[1] 宋建华[1] 

机构地区:[1]中航工业北京航空制造工程研究所,北京100024

出  处:《测控技术》2014年第9期72-75,共4页Measurement & Control Technology

摘  要:针对51单片机I/O定时翻转电平驱动蜂鸣器方法存在的缺点,以PIC单片机为核心控制元件,利用内部PWM硬件资源,实现了简易音乐播放系统设计。通过改变PWM端口输出脉冲信号频率及脉宽,驱动蜂呜器发出不同音调,并结合单片机内部定时器中断控制音调高低及节拍长度,此外可通过4×4矩阵键盘实现简单音乐弹奏。实验结果表明,该系统硬件电路简单,软件占用CPU时间少,易控制音乐音调及节拍,音色纯正,具有一定的实用与参考价值。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.

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

分 类 号:TP368.2[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象