搜索
bottom↓
回复: 40

AVR32 UC3A0512 做MP3播放器(官方文档及源程序)

[复制链接]

出0入0汤圆

发表于 2008-9-8 09:37:03 | 显示全部楼层 |阅读模式
UC3可以软件解码MP3,官方公布的程序是在EVK1105上实现的,使用的芯片是UC3A0512,这块板目前还没有上市,不过我们现在可以在论坛上发布的OPEN UC3开发板上DIY.

播放器的结构框图如下:


(原文件名:liuxj.jpg)

程序中提供了两种音频输出方式,一种是芯片内部的PWM_DAC,另一种是通过IIS外扩一片TI的AIC23B. 这个芯片零售约4美金,不过可以到
http://focus.ti.com.cn/cn/general/docs/gencontent.tsp?contentId=29859&DCMP=TI-cn_Header_Tracking&HQS=v?OT+hdr_b_samples
申请得到(我刚申请了5片 ^_^).


文档ourdev_406968.pdf(文件大小:236K) (原文件名:doc7817.pdf)
源码ourdev_406969.zip(文件大小:3.81M) (原文件名:AVR32709.zip.zip)

阿莫论坛20周年了!感谢大家的支持与爱护!!

一只鸟敢站在脆弱的枝条上歇脚,它依仗的不是枝条不会断,而是自己有翅膀,会飞。

出0入0汤圆

发表于 2008-9-8 09:49:20 | 显示全部楼层
好东西,赞一个

出0入0汤圆

发表于 2008-9-9 11:17:55 | 显示全部楼层
不知这个方案软解MP3的能力怎么样.以前一个代理商拿过一块某外国公司用UC3A0512做的MP3板,软解能力超差,连240,320Kbps的也解不了

出0入0汤圆

发表于 2008-9-9 11:28:05 | 显示全部楼层
【2楼】 dyt88
不知道你的MP3板是什么样子?好像UC3出来的时间不长吧?可能是优化没做好?
这个方案已经被美国的通用汽车所采用,可以支持IPOD的数据流播放,还有电容触摸按键。应该是非常不错的。
以下是解码能力的描述
MP3
MPEG-1 Audio Layer 3, more commonly referred to as MP3, is a digital audio encoding format
using a form of lossy data compression. Several bit rates are specified in the MPEG-1 Layer 3
standard: 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256 and 320 Kbit/s, and the available
sampling frequencies are 32, 44.1 and 48 KHz. A sample rate of 44.1 KHz is almost always
used. 128 Kbit/s bitrate files are slowly being replaced with higher bitrates like 192 Kbit/s, with
some being encoded up to MP3's maximum of 320 Kbit/s.
A tag in a compressed audio file is a section of the file that contains metadata such as the title,
artist, album, track number or other information about the file's contents.
The chosen MP3 decoder here is MAD (libmad), a high-quality MPEG audio decoder. It currently
supports MPEG-1 and the MPEG-2 extension to Lower Sampling Frequencies, as well as the
so-called MPEG 2.5 format. All three audio layers (Layer I, Layer II, and Layer III a.k.a. MP3) are
fully implemented. MAD does not yet support MPEG-2 multichannel audio (although it should be
backward compatible with such streams).

出0入0汤圆

 楼主| 发表于 2008-9-9 11:33:48 | 显示全部楼层
MP3
使用 Libmad decoder
可解码Bitrate 320Kbit/s 44.1KHz Stereo
ID3 tag 支持到 V2.4

WMA
采用 Microsoft WMA V10
可解码Bitrate 320Kbit/s 44.1KHz Stereo

出0入0汤圆

发表于 2008-9-9 15:24:17 | 显示全部楼层
某外国公司是日本的,具体是松下还是索尼忘了,也是用在汽车上,据称已量产.但我们拿过来测试时效果实在不敢恭维,播放高码率的MP3时时断时续,解码速度完全跟不上.
ATMEL官方现在既然敢出这个Manual,软解能力应该会好些,但也要实测过才知.

出0入0汤圆

发表于 2008-9-9 15:35:20 | 显示全部楼层
收到ATMEL自动发送的通知邮件后,我第一时间去下载这个Application Note和源代码,并把代码Import进AVR32 Studio里,编译链接,发现……

(原文件名:avr32 size.jpg)

出0入0汤圆

发表于 2008-9-9 15:50:55 | 显示全部楼层
【6楼】 dyt88  
代码太小??

出0入0汤圆

发表于 2008-9-10 09:13:30 | 显示全部楼层
6楼的text=247336,247336是byte吗?247k吗?

出0入0汤圆

发表于 2008-9-10 09:27:23 | 显示全部楼层
我的编译不过??什么原因?


(原文件名:未命名.JPG)

出0入0汤圆

发表于 2008-9-10 12:13:50 | 显示全部楼层
回楼上,你的实际上已经编译通过了,.elf文件都已经生成.我编译时也出现这个问题.
另,是247K.把液晶模块和TI音频DAC相关代码删掉后,text可减小到196340.

出0入0汤圆

 楼主| 发表于 2008-9-10 16:33:41 | 显示全部楼层
我在邮购部销售的 OPEN UC3开发板把程序移植好了,可以播放MP3了.

出0入0汤圆

发表于 2008-9-10 16:47:04 | 显示全部楼层
明白了,不过avr32程序的代码消耗是不太大。我试了那个io例程也有39.8K。

出0入0汤圆

 楼主| 发表于 2008-9-10 17:14:02 | 显示全部楼层
回复【12楼】 _OTW_
积分:39
派别:
等级:------
来自:
明白了,不过avr32程序的代码消耗是不太大。我试了那个io例程也有39.8K。

那是ELF文件啊,里面包含调试信息的

出0入0汤圆

 楼主| 发表于 2008-9-10 17:18:16 | 显示全部楼层
回复:【2楼】 dyt88
积分:19
派别:
等级:------
来自:
不知这个方案软解MP3的能力怎么样.以前一个代理商拿过一块某外国公司用UC3A0512做的MP3板,软解能力超差,连240,320Kbps的也解不了
 
经我实际测试,UC3A0播放320k bits/s的MP3,一点问题都没有,非常流畅


(原文件名:J$DCR]NGX[ZNJ@USRZI18A9.jpg)

出0入0汤圆

发表于 2008-9-10 21:40:02 | 显示全部楼层
顶一个,

出0入0汤圆

发表于 2008-9-10 23:01:31 | 显示全部楼层
谢谢【13楼】 liuxj 军哥 的回答,那如何的到hex文件,并知道对应的编译大小。

出0入0汤圆

发表于 2008-9-11 12:21:56 | 显示全部楼层
mark`~~

出0入0汤圆

发表于 2008-9-11 15:23:27 | 显示全部楼层
今天我用EVK1100试了ATMEL以前提供的U盘MP3和WMA播放程序,用PWM作为DAC输出,感觉播放速度快了一些,比如一首3分30秒的歌,只用3分10秒就播完了。不过看来用UC3A来软解MP3还是行得通的。

出0入0汤圆

 楼主| 发表于 2008-9-11 20:00:41 | 显示全部楼层
回复【16楼】 _OTW_
积分:40
派别:
等级:------
来自:
谢谢【13楼】 liuxj 军哥 的回答,那如何的到hex文件,并知道对应的编译大小。  
   


在菜单project | properties 里有设置
 

出0入0汤圆

发表于 2008-9-11 20:35:27 | 显示全部楼层
记号,有空试试。 谢谢

出0入0汤圆

发表于 2008-9-27 23:30:41 | 显示全部楼层
STUDIO编译不通过,怎么回事?

用GCC可以??

出0入0汤圆

发表于 2008-9-28 13:04:41 | 显示全部楼层
又确定用的是AVR32 Studio??

出0入0汤圆

发表于 2008-9-29 23:01:40 | 显示全部楼层
以下是显示结果:





将压缩包程序载后编译就是这样的,怎么回事? (原文件名:err.JPG) 

出0入0汤圆

发表于 2008-10-9 09:11:57 | 显示全部楼层
mp3 卖50多

mp4 卖90多,2G

mp5 卖180多,超大屏幕



不明白人家为什么能做这么低的价格



mp5的照片



 (原文件名:IMG_8756-.jpg) 

出0入0汤圆

发表于 2008-10-9 10:23:52 | 显示全部楼层
MP5?????

老板,有MP5吗?老板嘘了一声,拉着我穿过大厅到后面的仓库,‘我有个亲戚,在海关……不过这种货不好搞,AK-47其实更好用一些。’

出0入0汤圆

发表于 2008-11-15 17:18:49 | 显示全部楼层
kingofkings 技术火腿(KoK)~~~~   强。。 

出0入0汤圆

发表于 2008-11-15 17:33:04 | 显示全部楼层
什么MP5呀?听JS瞎忽悠。

出0入0汤圆

发表于 2008-11-15 19:00:03 | 显示全部楼层
那些MP4想必都不是真正意义上的MP4播放器,只不过是能播放一种特定格式视频的播放器罢了

出0入0汤圆

发表于 2008-11-16 19:14:23 | 显示全部楼层
MP3解码效果怎样??



不是说能解出来,效果就一定好的



好像以前就有人用440BX做了MP3的解码出来,用定点运算替代浮点运算



效果并不好

出0入70汤圆

发表于 2008-11-21 23:13:40 | 显示全部楼层
Found this project in avrfreaks



========================================================================

uc3b-based mp3-player



For this project a standalone MP3-card was made, although the software should run on EVK1101. It is based on the Helix MP3-decoder.



The board is 14.6 by 60.5 mm and features a mini-jack for headphones, joystick for navigation, a single LED, battery clamps for a single AAA-battery, USB-connector and uSD-connector.



The software is designed to read MP3-files from a FAT file system on the uSD-card, decode and play them in real-time. The user can skip files and regulate the volume using the joystick. The player only supports the MP3-format.



In addition to the UC3, the board features a tiny25-based buck-boost converter that creates 3.3V for the UC3 from the 1.5V AAA-battery or the 5V USB VBUS. The player can run on both.



The player uses two PWM channels for each audio channel to output the audio. The headphones are driven directly by the UC3-pins. A filter on each audio channel is supposed to combine two PWM channels to achieve 16-bit resolution.



The player has several issues, and is mostly a proof of concept. One issue is that the maximum bitrate is about 192kbps @ 48MHz. This could be improved by optimizing the software.



Apart from the UC3 and the tiny25, the only active components are the two transistors for the voltage converter.



The archive contains the following:



- The AVR32 Studio workspace.

- A report describing the functionality, unresolved issues etc.

- The board schematic as a PDF and PCB layout as a Protel pcb-file.

- A bill of materials.

- The source code for the buck-boost converter in assembly. (The program for the tiny25.)

- A few pictures of the board.



Files

 Project files [2284.38 KB] (Nov 21, 2008)







本贴被 PaulDE 编辑过,最后修改时间:2008-11-21,23:15:44.

出0入0汤圆

发表于 2009-4-25 12:59:42 | 显示全部楼层
心动啊!!!!!

出0入0汤圆

发表于 2009-6-17 15:37:57 | 显示全部楼层
不错

出0入0汤圆

发表于 2009-6-19 20:16:49 | 显示全部楼层
好啊
谢谢

出0入0汤圆

发表于 2009-10-22 12:45:50 | 显示全部楼层
楼主忽悠哦,贴个TI申请样片的网址来……

出0入0汤圆

发表于 2009-12-7 15:29:20 | 显示全部楼层
mark

出0入0汤圆

发表于 2010-1-6 14:18:37 | 显示全部楼层
mark

出0入0汤圆

发表于 2010-1-29 16:39:55 | 显示全部楼层
mark

出0入0汤圆

 楼主| 发表于 2010-2-7 13:23:24 | 显示全部楼层
回复【34楼】huatuizh  
楼主忽悠哦,贴个TI申请样片的网址来……
-----------------------------------------------------------------------

哈哈,你错过时间了吧,不过还好,我有做好的板.


(原文件名:DSC01991.JPG)


(原文件名:DSC01992.JPG)

出0入0汤圆

发表于 2010-2-8 17:05:52 | 显示全部楼层
lklkl

出0入0汤圆

发表于 2010-10-5 12:04:45 | 显示全部楼层
不错
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-5-15 16:33

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表