1、电子科学与技术专业课程设计 1 基于陀螺仪的智能基于陀螺仪的智能 mp3mp3 播放器播放器 摘要摘要 基于陀螺仪的智能 MP3 播放器设计,是在传统 MP3 播放器的基础上对它的娱乐、休闲、智能 上进行改进。在硬件上是采用 stc12c5a60s2 作为主控 MCU,可以实现对音频格式文件进行解码、模 拟音量调整、音频放大、存储、串口调试、屏幕显示等功能。并且利用陀螺仪智能控制 mp3 上一曲 或者下一曲和音量的加减。这种新功能的添加在一定程度上简化了 MP3 的操作,增加了 MP3 的娱乐 性,让它更受欢迎。 关键词:关键词:单片机 陀螺仪 智能 MP3 Based on the gyro
2、scope intelligent design of MP3 player, it is on the basis of traditional MP3 player for its entertainment, leisure, intelligence on improvement. A stc12c5a60s2 on hardware is used as the main control MCU, can realize to simulate the audio format file decoding, the volume adjustment, audio amplifica
3、tion, storage, serial debugging, screen display, etc. And using gyroscope intelligent control on the mp3 song or the next song and the volume of add and subtract. This new feature added to a certain extent, simplifies the operation of the MP3, increased the MP3 entertaining, make it more popular. Ke
4、y words: Single chip microcomputer gyroscope intelligent MP3 基于陀螺仪的智能 MP3 播放器 2 第一章第一章 设计的目的意义设计的目的意义 MP3 作为一种娱乐休闲设备正在慢慢的被智能手机和掌上电脑等所代替。为了能够不被时代所淘 汰,本项目从它的娱乐、休闲、智能上进行了改进。使其在基于陀螺仪的基础上设计出智能 mp3 播 放器,能够用陀螺仪控制 MP3。这让我们在使用 MP3 的时候不仅仅可以休闲,还可以娱乐。让 MP3 更受欢迎。 第二章 设计要求 1、主控 MCU,可以实现对音频格式文件进行解码、模拟音量调整、音频放大、存储、
5、串口调试、 屏幕显示等功能可读取 SD、U 盘内音乐文件 2、MP3 模块可读取 SD、U 盘内音乐文件,文件格式除 mp3 外,还可播放 mid,wav,wma 文件格 式 3、陀螺仪可实现体感式开关控制,如向左翻转 90为“上一曲” ,向右翻转 90为“下一曲” , 震动为“暂停播放” ,左倾 45为“减小音量等” 第三章 主要器件 序号 类型 数量 1 STC12c5a60s2 1 2 LED1602 1 3 GY-61 ADXL335 模块 1 4 MP3 模块 1 表3-1 主要器件 电子科学与技术专业课程设计 3 (一)(一)STC12C5A60S2STC12C5A60S2 图3-
6、1 STC12C5A60S2/AD/PWM 系列单片机是宏晶科技生产的单时钟/机器周期(1T)的单片机,是高速/低功 耗/超强抗干扰的新一代8051单片机, 指令代码完全兼容传统8051,但速度快8-12倍。 内部集成 MAX810 专用复位电路,2路 PWM,8路高速10位 A/D 转换(250K/S),针对电机控制,强干扰场合。 1) 增强型8051 CPU,1T,单时钟/机器周期,指令代码完全兼容传统8051。 2) 工作电压:STC12C5A60S2系列工作电压:5.5V - 3.3V(5V 单片机) 3) 工作频率范围:0 - 35MHz,相当于普通8051的 0420MHz 4) 应用程序空间8K /16K / 20K / 32K / 40K / 48K / 52K / 60K / 62K 字节 5) 片上集成1280字节 RAM 6) 外部中断 I/O 口7路,传统的下降沿中断或低电平触发中断,并新增支持上升沿中断的 PCA 模 块,Power Down模式可由外部中断唤醒,INT0/P3.2, INT1/P3.3,T0/P3.4,T1/P3.5,RxD/